Chat
The OpenAI-compatible Chat Completions endpoint.
POST https://api.topbilling.in/v1/chat/completions accepts the OpenAI Chat Completions request body.
{
"model": "<model-id>",
"messages": [
{"role": "system", "content": "You are terse."},
{"role": "user", "content": "Three words about Chennai."}
],
"max_completion_tokens": 64,
"temperature": 0.7
}
Supported
messageswithsystem,developer,user,assistant,toolroles; text and image parts.max_tokensormax_completion_tokens,temperature,top_p,stop,stream,stream_options.include_usage,tools,tool_choice,parallel_tool_calls,response_format(on models with structured output),user.
Not supported
On the translated lane every other top-level field returns 400 unsupported_parameter with the param named — among them n > 1, logprobs, logit_bias, seed, reasoning_effort and legacy functions. For reasoning, use reasoning.effort on Responses or thinking on Messages. On a model served natively in OpenAI format the body is relayed as sent, so those fields reach the model; n > 1 is refused on both lanes. Nothing is charged for a rejected request. See the compatibility matrix.
Response
Standard shape: id (chatcmpl-…), choices[0].message, finish_reason (stop, length, tool_calls, content_filter) and usage with prompt_tokens, completion_tokens and prompt_tokens_details.cached_tokens. The full parameter list is in the API reference.