Ohana AI Docs
  • Introduction
  • Getting Started
    • Authentication
  • Implementation
    • Completions
Powered by GitBook
On this page
  1. Implementation

Completions

This api call accepts a single prompt and returns a single text. It is used in places that do not need context.

Completion API

POST /api/chat/completions

Headers

Name
Value

Content-Type

application/json

API-Key

<token>

Body

Name
Type
Description

prompt

string

The prompt you are passing to the LLM Who is the president of Kenya

systemPrompt (optional)

string

Set default system message You are a professional researcher

Response

{
  "success": true,
  "text": "The president of Kenya is ...",
}
{
  "success": false,
  "error": "Unauthenticated: Api Key Missing"
}

PreviousAuthentication

Last updated 3 months ago