Chat completion
OpenAI-compatible Chat Completions endpoint.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.vivgrid.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.2", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Tell me a story about a blue dinosaur. no more than 10 words" } ], "reasoning_effort": "medium", "max_completion_tokens": 64, "stream": true }'{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1710000000,
"model": "managed",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Once a tiny blue dino danced under starry skies."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 12,
"total_tokens": 36
}
}Empty
Empty
Empty