Skip to main content
POST
cURL
Use the Responses API for tool calling with reasoning. Chat Completions function calling requires reasoning_effort: "none".
In raw Responses API JSON, read generated text from output[].content[].text. Some official SDKs expose output_text as a convenience property, but the raw HTTP response may omit it.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

When reasoning effort is not none, omit temperature, top_p, and top_logprobs.

model
enum<string>
required
Available options:
gpt-6-luna
input
required

Text or ordered input items, including text and image content.

instructions
string
reasoning
object
max_output_tokens
integer

Maximum visible-output and reasoning tokens.

Required range: 1 <= x <= 128000
text
object

Text verbosity or Structured Outputs configuration.

tools
object[]
tool_choice
Available options:
none,
auto,
required
stream
boolean
default:false
prompt_cache_key
string
prompt_cache_options
object
include
string[]

Do not request message.output_text.logprobs when reasoning effort is not none.

Response

Response created successfully.

id
string
object
string
Example:

"response"

model
string
Example:

"gpt-6-luna"

status
enum<string>
Available options:
queued,
in_progress,
completed,
incomplete,
failed,
cancelled
output
object[]
output_text
string

Optional SDK convenience field that aggregates text output. In raw HTTP responses, read generated text from output message items at output[].content[].text and do not require this field to be present.

usage
object
error
object | null