Chat/Completions
POST/v1/chat/completions
Chat/Completions
Takes a OpenAI input payload, and then forwards the appropriate request on to the Takeoff server. Note: some OpenAI parameters are not supported, see supported parameters.
See more on the structure of openAI's API here See more on the structure of messages here.
Request​
- application/json
Body
required
Array [
- MOD1
- MOD2
Array [
- MOD1
- MOD2
]
]
logit_bias
object
nullable
messages
object[]
required
content
object
required
oneOf
string
oneOf
Possible values: [text
]
image_url
object
required
Possible values: [image_url
]
Responses​
- 200
- 400
- 422
- 503
Takes in a JSON payload and returns the response all at once.
- application/json
- Schema
- Example (from schema)
Schema
Array [
- MOD1
- MOD2
Array [
]
]
choices
object[]
required
text
object
required
Input Text used for ease of users not to have to use the clunky PayloadText. Mapping provided below to convert InputText to PayloadText.
oneOf
string
string
{
"choices": [
{
"finish_reason": "string",
"index": 0,
"logprobs": "string",
"text": "string"
}
],
"created": 0,
"id": "string",
"model": "string",
"object": "string",
"usage": "string"
}
Bad request
Malformed request body
The server is not ready to process requests yet.