curl --request POST \
--url https://toapis.com/v1/responses \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.3-codex-official",
"instructions": "You are a professional code assistant",
"input": "Write a quicksort in Python"
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://toapis.com/v1"
)
response = client.responses.create(
model="gpt-5.3-codex-official",
instructions="You are a professional code assistant",
input="Write a quicksort in Python"
)
print(response.output[0].content[0].text)
{
"id": "<string>",
"object": "<string>",
"status": "<string>",
"output": [
{}
],
"usage": {}
}Responses 형식
응답s API
OpenAI 응답s API format with function calling, built-in tools, and server-side multi-turn context
POST
/
v1
/
responses
curl --request POST \
--url https://toapis.com/v1/responses \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.3-codex-official",
"instructions": "You are a professional code assistant",
"input": "Write a quicksort in Python"
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://toapis.com/v1"
)
response = client.responses.create(
model="gpt-5.3-codex-official",
instructions="You are a professional code assistant",
input="Write a quicksort in Python"
)
print(response.output[0].content[0].text)
{
"id": "<string>",
"object": "<string>",
"status": "<string>",
"output": [
{}
],
"usage": {}
}중국 본토 사용자 안내: 중국 본토 사용자는
https://toapis.cn 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 https://toapis.com 을 https://toapis.cn 로 바꿔 주세요.- Function calling: let models call custom functions
- Built-in tools: use tools such as
web_search_preview - Server-side context: use
previous_response_idinstead of resending the full conversation - Reasoning control: tune thinking depth with
reasoning.effort
모델 marked as 응답s Only, such as
gpt-5-pro-official and gpt-5.3-codex-official, only support this API and do not support Chat Completions. See the model list for details.Authorizations
string
필수
Use Bearer Token authentication.Get your API key from the API Key management page.
Authorization: Bearer YOUR_API_KEY
Body
string
필수
모델 name.Examples:
"gpt-5-pro-official", "gpt-5.3-codex-official", "gpt-5.2-official"string | object[]
필수
User input. Supports simple string input or a message array for multi-turn conversations.
string
System instructions that guide model behavior.
boolean
기본값:false
Whether to enable streaming output.
integer
Maximum number of output tokens.
number
기본값:1
Sampling temperature, from
0 to 2.number
기본값:1
Nucleus sampling threshold, from
0 to 1.string
Previous response ID for server-side multi-turn context.
object
Reasoning configuration.
reasoning.effort can be high, medium, low, or none.object[]
Available tools. Supported tool types include
function and web_search_preview.string
기본값:"auto"
Tool selection policy:
auto, none, or required.응답
string
Unique response ID, usable as
previous_response_id.string
Always
response.string
응답 status:
completed, failed, or in_progress.object[]
Output items, such as
message, function_call, reasoning, or web_search_call.object
Token usage statistics, including input, output, reasoning, and total tokens.
curl --request POST \
--url https://toapis.com/v1/responses \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.3-codex-official",
"instructions": "You are a professional code assistant",
"input": "Write a quicksort in Python"
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://toapis.com/v1"
)
response = client.responses.create(
model="gpt-5.3-codex-official",
instructions="You are a professional code assistant",
input="Write a quicksort in Python"
)
print(response.output[0].content[0].text)