Chat
Create a chat completion
Changed onGenerate a chat completion from a sequence of messages. Returns a ChatCompletion object, or a server-sent events stream of ChatCompletionChunk deltas when stream=true. Supports tool calling, structured output via response_format, and reasoning controls.
post/v1/chat/completions
Request
- Base URLhttps://api.inceptionlabs.ai
- URLhttps://api.inceptionlabs.ai/v1/chat/completions
- AuthHTTP bearer
Request body
Response
Successful response. Returns a JSON object when stream=false, or a server-sent events stream of ChatCompletionChunk objects (terminated by data: [DONE]) when stream=true.
Example response
{
"id": "chatcmpl-7a2b3c4d5e",
"object": "chat.completion",
"created": 1745798400,
"model": "mercury-2.5",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "A diffusion language model is a type of language model that uses diffusion to generate text."
}
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 8,
"total_tokens": 20,
"reasoning_tokens": 0,
"cached_input_tokens": 0
}
}Changes
- info
endpoint added
- info