GPT-5.5 - Complete API Reference
- Use OpenAI SDK format to call GPT-5.5 model
- Synchronous processing mode, real-time response
- Text conversation: Single or multi-turn contextual dialogue
- System prompts: Customize AI role and behavior
- Multimodal input: Supports text + image mixed input
- Quick start? Check out Quick Start Guide
Authorization
## All APIs require Bearer Token authentication ## **Get API Key:** Visit [API Key Management Page](https://starmagic.ai/app/api-keys) to get your API Key **Add to request header:** ``` Authorization: Bearer YOUR_API_KEY ```
Authorization: Bearer YOUR_API_KEYRequest body
application/jsonModel name for chat completion
"gpt-5.5"List of messages for the conversation, supports multi-turn dialogue and multimodal input (text, images)
[
{
"role": "user",
"content": [
null
]
}
]Whether to stream the response - `true`: Stream response, returns content chunk by chunk in real-time - `false`: Wait for complete response and return all at once
falseSampling temperature, controls randomness of output **Notes**: - Lower values (e.g., 0.2): More deterministic and focused output - Higher values (e.g., 1.5): More random and creative output
0.7Nucleus sampling parameter **Notes**: - Controls sampling from tokens with cumulative probability - For example, 0.9 means sampling from tokens with top 90% cumulative probability - Default: 1.0 (considers all tokens) **Recommendation**: Do not adjust both temperature and top_p simultaneously
0.9Top-K sampling parameter **Notes**: - For example, 10 means only considering the top 10 most probable tokens during each sampling step - Smaller values make output more focused - Default: unlimited
40Response
application/jsonResponse body
Unique identifier for the chat completion
"chatcmpl-20251010015944503180122WJNB8Eid"The model used for completion
"gpt-5.5"Response type
"chat.completion"Unix timestamp when the completion was created
1760032810List of completion choices
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm GPT-5.5, with enhanced reasoning and understanding capabilities. I excel at handling complex problems, multi-step reasoning, and code generation.\\n\\nKey features include:\\n- Stronger logical reasoning\\n- Better context understanding\\n- More accurate code generation"
},
"finish_reason": "stop"
}
]Token usage statistics
{
"prompt_tokens": 13,
"completion_tokens": 1891,
"total_tokens": 1904,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 13,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 1480
},
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": null
}
