OpenAI Format - Tool Calling Chat
- Generic Chat Completions API reference with tool calling for all OpenAI-compatible models
- Supports Function Calling: define tools the model can invoke
- Structured output: supports JSON Object / JSON Schema format
- Multimodal input: supports text + image mixed input
- Supports streaming and non-streaming responses
Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Model name, e.g. gpt-5.4, deepseek-chat, etc.
"gpt-5.4"
List of messages in the conversation
Whether to stream the response
Sampling temperature (0-2)
0 <= x <= 2Maximum number of tokens to generate
Nucleus sampling parameter (0-1)
0 <= x <= 1Penalize new tokens based on their frequency in the text so far (-2 to 2)
-2 <= x <= 2Penalize new tokens based on whether they appear in the text so far (-2 to 2)
-2 <= x <= 2A list of tools the model may call
Controls which tool is called by the model
none, auto, required An object specifying the format that the model must output
Up to 4 sequences where the API will stop generating further tokens
How many chat completion choices to generate for each input message