POST /v1/chat/completions follows the OpenAI Chat Completions API: messages, tools, tool_choice, response_format, temperature, max_tokens, stream and the other OpenAI parameters. Use any model whose type is text.
chat.completion with an ID starting with chatcmpl-. Its usage adds the cost:
Streaming
Setstream: true to receive server-sent events. Each line is data: {chunk}, the whole stream shares one chatcmpl- ID, and it ends with data: [DONE].
The last chunk has an empty choices array and carries usage with the cost. You don’t need stream_options.include_usage.
data: {"error": {...}}.
If your client disconnects mid-stream, generation continues to the end and you are charged for the tokens actually produced, as with OpenAI.
Reliability
If a model’s upstream capacity fails before any output is produced, GEEKIDEA retries on other capacity automatically. You only see503 model_overloaded when every option has failed; it is safe to retry later.