Create a chat completion
Generate an OpenAI-compatible chat response.
Create a chat completion
curl -X POST "https://router.chbcloud.com/v1/chat/completions" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{}'Successful response.
{
"id": "string",
"model": "string",
"usage": {},
"choices": [
{}
]
}Generates a response from message history using the OpenAI Chat Completions format. Supports streaming, multimodal content, tool calls, and model-specific controls when the selected route supports them.
Use the InnoPaaS AppKey as a Bearer token. Create or manage keys in Console. API key guide
Authorization
AuthorizationBody
application/jsonmodelExact model ID returned by the model list operation.
toolsTools available to the model.
streamWhether to stream partial output.
falsemessagesConversation history. FIM models may instead use prefix and suffix.
Show child attributesHide child attributes
messages[].roleMessage role.
messages[].contentText or multimodal message content.
max_completion_tokensMaximum number of completion tokens.
1Response
application/jsonSuccessful response.
idResponse ID for troubleshooting.
modelModel that produced the response.
usageInput, output, and total token usage.
choicesGenerated choices.
{
"id": "string",
"model": "string",
"usage": {},
"choices": [
{}
]
}