GPT-5.5 Chat
GPT-5.5 with enhanced general reasoning, coding, and multimodal capabilities
중국 본토 사용자 안내: 중국 본토 사용자는 https://toapis.cn 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 https://toapis.com 을 https://toapis.cn 로 바꿔 주세요.
- OpenAI-compatible Chat Completions API
- Select the
gpt-5.5model via themodelparameter - Supports streaming output (SSE)
- Supports multi-turn conversation, system prompts, and vision input
Authorizations
Authorizationstring헤더필수All endpoints require Bearer Token authentication
Get your API Key from the API Key Management Page
Add to request header:
Authorization: Bearer YOUR_API_KEYBody
modelstring본문필수기본값: gpt-5.5모델 name
Example: "gpt-5.5"
messagesobject[]본문필수List of conversation messages in chronological order
messages[n]
rolestring본문필수Message role — system, user, or assistant
contentstring본문필수Message content — string or array of content blocks (supports images)
streamboolean본문기본값: falseWhether to enable streaming output (Server-Sent Events)
true: Stream tokens incrementallyfalse: Return the complete response at once
max_tokensinteger본문Maximum number of tokens to generate
Uses the model's default limit when not set
temperaturenumber본문기본값: 1Sampling temperature, controls output randomness
- Range:
0to2 - Lower values produce more deterministic output; higher values produce more varied output
top_pnumber본문기본값: 1Nucleus sampling probability threshold
Range: 0 to 1. It is not recommended to modify both temperature and top_p at the same time
stopstring | string[]본문Stop sequences — generation stops when these strings are encountered
Maximum 4 stop sequences
응답
idstringUnique identifier for this request
objectstringObject type, always chat.completion
createdintegerRequest creation timestamp (Unix)
modelstringThe model that was actually used
choicesobject[]List of generated results
choices[].message.role: Message role, alwaysassistantchoices[].message.content: Generated text contentchoices[].finish_reason: Stop reason —stop/length/content_filterchoices[].index: Result index
usageobjectToken usage statistics for this request
usage.prompt_tokens: Input token countusage.completion_tokens: Output token countusage.total_tokens: Total token count
요청 예시
curl --request POST \
--url https://toapis.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": "Hello, please introduce yourself"
}
]
}'curl --request POST \
--url https://toapis.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"messages": [
{
"role": "system",
"content": "You are a professional code assistant"
},
{
"role": "user",
"content": "Write a quicksort in Python"
}
],
"stream": true
}'curl --request POST \
--url https://toapis.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://www.gstatic.com/webp/gallery/1.jpg"
}
}
]
}
],
"max_tokens": 300
}'from openai import OpenAI
client = OpenAI(
api_key="your-ToAPIs-key",
base_url="https://toapis.com/v1"
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "user", "content": "Hello, please introduce yourself"}
]
)
print(response.choices[0].message.content)from openai import OpenAI
client = OpenAI(
api_key="your-ToAPIs-key",
base_url="https://toapis.com/v1"
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{
"type": "image_url",
"image_url": {"url": "https://www.gstatic.com/webp/gallery/1.jpg"}
}
]
}
],
max_tokens=300
)
print(response.choices[0].message.content)from openai import OpenAI
client = OpenAI(
api_key="your-ToAPIs-key",
base_url="https://toapis.com/v1"
)
stream = client.chat.completions.create(
model="gpt-5.5",
messages=[
{"role": "system", "content": "You are a professional code assistant"},
{"role": "user", "content": "Write a quicksort in Python"}
],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-ToAPIs-key",
baseURL: "https://toapis.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Hello, please introduce yourself" }],
});
console.log(response.choices[0].message.content);응답 예시
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1703884800,
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm GPT-5.5, the latest model in OpenAI's fifth-generation series. I have enhanced capabilities in reasoning, code generation, and multimodal understanding. How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 42,
"total_tokens": 55
}
}{
"error": {
"code": "invalid_request_error",
"message": "The 'messages' field is required.",
"param": "messages",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"type": "authentication_error"
}
}