메인 콘텐츠로 건너뛰기
POST
/
v1
/
chat
/
completions
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"
      }
    ]
  }'
{
  "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
  }
}
  • OpenAI-compatible Chat Completions API
  • Select the gpt-5.5 model via the model parameter
  • Supports streaming output (SSE)
  • Supports multi-turn conversation, system prompts, and vision input

Authorizations

Authorization
string
필수
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management PageAdd to request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
기본값:"gpt-5.5"
필수
모델 nameExample: "gpt-5.5"
messages
object[]
필수
List of conversation messages in chronological order
stream
boolean
기본값:false
Whether to enable streaming output (Server-Sent Events)
  • true: Stream tokens incrementally
  • false: Return the complete response at once
max_tokens
integer
Maximum number of tokens to generateUses the model’s default limit when not set
temperature
number
기본값:1
Sampling temperature, controls output randomness
  • Range: 0 to 2
  • Lower values produce more deterministic output; higher values produce more varied output
top_p
number
기본값:1
Nucleus sampling probability thresholdRange: 0 to 1. It is not recommended to modify both temperature and top_p at the same time
stop
string | string[]
Stop sequences — generation stops when these strings are encounteredMaximum 4 stop sequences

응답

id
string
Unique identifier for this request
object
string
Object type, always chat.completion
created
integer
Request creation timestamp (Unix)
model
string
The model that was actually used
choices
object[]
List of generated results
  • choices[].message.role: Message role, always assistant
  • choices[].message.content: Generated text content
  • choices[].finish_reason: Stop reason — stop / length / content_filter
  • choices[].index: Result index
usage
object
Token usage statistics for this request
  • usage.prompt_tokens: Input token count
  • usage.completion_tokens: Output token count
  • usage.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"
      }
    ]
  }'
{
  "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
  }
}