Structured Outputs
JSON schema and JSON object modes for guaranteed structured responses
Function Calling
Connect LLMs to external tools, APIs, and databases
Reasoning Models
Control chain-of-thought depth for DeepSeek-R1 and Qwen3
Context & Metadata
Graceful truncation for long prompts, cost attribution metadata
Basic usage
- Python
- JavaScript
- cURL
Response
Parameters
Core parameters
Structured output & tool parameters
See Structured Outputs and Function Calling for full details.
Forii extensions
Streaming
Stream tokens as they arrive using Server-Sent Events (SSE).- Python
- JavaScript