Skip to main content
POST
OpenAI GPT models cover chat, coding, reasoning, and agent workflows. The playground on this page uses Responses, which every GPT model supports.

Models

  • gpt-6.1-sol — GPT-6.1 Sol. Supports Responses and Chat Completions.
  • gpt-6.1-terra — GPT-6.1 Terra, a fast model for visual reasoning, computer use, and natural writing. Supports Responses and Chat Completions.
  • gpt-6-astra — GPT-6 Astra, for advanced reasoning, coding, and agent workflows. Supports Responses and Chat Completions.
  • gpt-6-sol — GPT-6 Sol. Supports Responses and Chat Completions.
  • gpt-6-luna — GPT-6 Luna, the low-cost GPT-6 tier. Supports Responses and Chat Completions.
  • gpt-5-6-sol — GPT-5.6 Sol, for frontier coding and agent workflows. Responses only.
  • gpt-5-6-terra — GPT-5.6 Terra. Responses only.
  • gpt-5-6-luna — GPT-5.6 Luna, for high-throughput automation. Responses only.
  • gpt-5.5 — GPT-5.5. Supports Responses and Chat Completions.
  • gpt-5.4 — GPT-5.4. Supports Responses and Chat Completions.
  • gpt-5.2 — GPT-5.2. Supports Responses and Chat Completions.

Examples

  • Basic text response — plain string input with max_output_tokens.
  • Image understanding — structured input with input_text and input_image.
  • Web search — tools with web_search_preview.
  • Streaming response — stream: true, returned as SSE.
To call a model with the Chat Completions format, send the same model id to Chat Completions.

Notes

  • gpt-5-6-sol, gpt-5-6-terra, and gpt-5-6-luna only accept /v1/responses.
  • Tools such as web search depend on the selected model.
  • See LLM Models for every model and the formats it supports.

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication.

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Body

application/json
model
enum<string>
default:gpt-5.5
required

OpenAI model id. gpt-5-6-sol, gpt-5-6-terra, and gpt-5-6-luna only support Responses.

Available options:
gpt-6.1-sol,
gpt-6.1-terra,
gpt-6-astra,
gpt-6-sol,
gpt-6-luna,
gpt-5-6-sol,
gpt-5-6-terra,
gpt-5-6-luna,
gpt-5.5,
gpt-5.4,
gpt-5.2
input
required

Plain text input or an array of structured input items.

Example:

"Write a product tagline in one sentence."

instructions
string

System or developer instructions that guide the model response.

tools
object[]

Tools available to the model. Tool support depends on the selected model.

tool_choice

Controls how the model selects tools.

Example:

"auto"

max_output_tokens
integer

Maximum number of output tokens to generate.

Required range: x >= 1
Example:

200

max_tokens
integer

Legacy compatibility field for maximum output tokens.

Required range: x >= 1
Example:

200

stream
boolean
default:false

Whether to use streaming output in SSE format.

Example:

false

store
boolean

Whether the response should be stored when supported.

Example:

false

reasoning
object

Reasoning configuration, when supported by the selected model.

Example:
text
object

Text output configuration, such as structured output format options when supported.

metadata
object

Custom metadata key-value pairs for your request.

previous_response_id
string

Previous response ID for continuing a conversation.

include
string[]

Additional response fields to include, when supported.

parallel_tool_calls
boolean

Whether the model may call multiple tools in parallel.

truncation
string

Truncation behavior for long context, when supported.

Example:

"auto"

user
string

End-user identifier for abuse monitoring and request tracing.

background
boolean

Whether to run the response in background mode, when supported.

service_tier
string

Service tier selection, when supported.

Example:

"auto"

prompt
object

Prompt object, when supported by the selected model.

temperature
number

Controls output randomness, range 0-2.

Required range: 0 <= x <= 2
Example:

1

top_p
number

Nucleus sampling parameter, range 0-1.

Required range: 0 <= x <= 1
Example:

1

Response

Response created

Response object.

id
string
Example:

"resp_9876543210"

object
string
Example:

"response"

created_at
integer
Example:

1677652288

status
string
Example:

"completed"

model
string
Example:

"gpt-5.5"

output
object[]
usage
object

Token usage statistics.