Inference API
Create Completion
OpenAI Completions v1 compatible endpoint
POST
/
v1
/
completions
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"text": "<string>",
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"total_tokens": 123,
"completion_tokens": 123
}
}
Body
application/json
Response
200
application/json
Generated Text
The response is of type object
.
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"text": "<string>",
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"total_tokens": 123,
"completion_tokens": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.