Create response

POST/v1/responses

Create a model response. Use this endpoint for OpenAI-compatible Responses models.

Authentication

Authorization Bearer

API key as bearer token in Authorization header.

Headers

Authorizationstring

Required. Bearer API key.

Content-Typestring

Request body content type.

Request Body

backgroundboolean

Whether to run the response in the background. Explicit true is not supported.

context_managementobject[]

Context management configuration.

context_management.type"compaction"

Context management entry type.

context_management.compact_thresholdnumber

Token threshold for compaction.

conversationstring | object

Conversation ID or conversation object. Stateful conversations are not supported.

conversation.idstring

Conversation ID.

includestring[]

Additional output data to include. Values must match the requested model and enabled features.

inputstring | ResponseInputItem[]

Text, image, file, or structured input items.

input.typestring

Input item type.

input.role"user" | "assistant" | "system" | "developer"

Message role.

input.contentstring | ResponseInputContent[]

Text or content parts.

input.idstring

Input item ID when referencing an existing item.

input.call_idstring

Tool or function call ID.

input.outputstring | object[]

Output for function, computer, or tool call results.

input.status"in_progress" | "completed" | "incomplete"

Input item status when present.

instructionsstring

System-level instructions.

max_output_tokensnumber

Upper bound for generated tokens, including visible output and reasoning tokens.

max_tool_callsnumber

Maximum total built-in tool calls for the response. Applies when tools are available.

metadataobject

Up to 16 key-value pairs attached to the response.

modelstring

Required. Model ID from /v1/models.

moderationobject

Moderation configuration, when supported.

moderation.modelstring

Moderation model to use.

parallel_tool_callsboolean

Whether parallel tool calls are allowed, when supported.

previous_response_idstring

Previous response ID for multi-turn state. This field is not supported.

promptobject

Reusable prompt template reference. Requires an existing prompt template ID.

prompt.idstring

Prompt template ID.

prompt.variablesobject

Template variable values.

prompt.versionstring

Prompt template version.

prompt_cache_keystring

Cache key used to improve cache hit rates.

prompt_cache_retention"in_memory" | "24h"

Prompt cache retention policy.

reasoningobject

Reasoning configuration.

reasoning.context"auto" | "current_turn" | "all_turns"

Which reasoning items are rendered back on later turns.

reasoning.effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh"

Reasoning effort.

reasoning.generate_summary"auto" | "concise" | "detailed"

Deprecated reasoning summary option.

reasoning.summary"auto" | "concise" | "detailed"

Reasoning summary option.

safety_identifierstring

Stable end-user identifier for safety systems.

service_tier"auto" | "default" | "flex" | "scale" | "priority"

Processing tier.

storeboolean

Must be false or omitted. Explicit true is not supported.

streamboolean

Whether to stream the response using Server-Sent Events.

stream_optionsobject

Streaming options. Applies to streamed responses.

stream_options.include_obfuscationboolean

Whether to include stream obfuscation fields.

temperaturenumber

Sampling temperature between 0 and 2.

textobject

Text response configuration.

text.formatobject

Response format configuration.

text.verbosity"low" | "medium" | "high"

Response verbosity.

tool_choice"none" | "auto" | "required" | object

How the model should select tools. Tool choices depend on the provided tools and model capabilities.

tool_choice.typestring

Tool choice object type.

tool_choice.mode"auto" | "required"

Allowed tools mode.

tool_choice.toolsobject[]

Allowed tool definitions.

tool_choice.namestring

Tool name when forcing a specific tool.

tool_choice.server_labelstring

MCP server label.

toolsobject[]

Tools the model may call while generating a response. Tool types and nested fields depend on model and account capabilities.

tools.typestring

Tool type.

tools.namestring

Tool or function name.

tools.descriptionstring

Tool description.

tools.parametersobject

Function parameters JSON schema.

tools.input_schemaobject

Custom tool input schema.

tools.vector_store_idsstring[]

Vector store IDs for file search.

tools.filtersobject

File search filters.

tools.max_num_resultsnumber

Maximum file search results.

tools.search_context_size"low" | "medium" | "high"

Search context size for web search.

tools.user_locationobject

Approximate user location for web search.

tools.server_labelstring

MCP server label.

tools.server_urlstring

MCP server URL.

tools.allowed_toolsobject | string[]

Allowed MCP tools.

tools.require_approvalstring | object

MCP tool approval policy.

tools.containerobject | string

Container configuration for code tools.

tools.partial_imagesnumber

Number of partial images for image generation streaming.

top_logprobsnumber

Number of most likely tokens to return at each token position, from 0 to 20.

top_pnumber

Nucleus sampling value.

truncation"auto" | "disabled"

Input truncation strategy.

userstring

Deprecated stable end-user identifier. Prefer safety_identifier and prompt_cache_key.

Parameter compatibility

Some fields are conditional or intentionally unsupported depending on the selected model, enabled features, and whether the request requires stored response state:

  • background: true, conversation, previous_response_id, and store: true are stateful operations and return 501 unsupported_feature.
  • prompt requires an existing prompt template ID.
  • Image and file input parts require model support and valid file_id, URL, or data values.
  • Tool fields are tool-type dependent.
  • include values and top_logprobs must match the requested output features.
  • stream_options is intended for streaming requests.

Response

idstring

Response ID.

created_atnumber

Unix timestamp in seconds.

errorobject|null

Error object when response generation fails.

error.codestring

Error code.

error.messagestring

Error message.

incomplete_detailsobject|null

Details for incomplete responses.

incomplete_details.reason"max_output_tokens" | "content_filter"

Incomplete reason.

instructionsstring | object[] | null

Instructions used for the response.

max_output_tokensnumber|null

Maximum output token setting.

modelstring

Model identifier.

object"response"

Object type.

outputobject[]

Output items.

output.idstring

Output item ID.

output.typestring

Output item type.

output.status"in_progress" | "completed" | "incomplete"

Output item status.

output.rolestring

Role for message output items.

output.contentobject[]

Content parts.

output.call_idstring

Tool or function call ID.

output.namestring

Tool or function name.

output.argumentsstring

Function call arguments.

output.outputstring | object[]

Function or tool output.

output.summaryobject[]

Reasoning summary items.

output.encrypted_contentstring

Encrypted reasoning content when included.

output_textstring

Concatenated text output, when available.

parallel_tool_callsboolean

Whether parallel tool calls were allowed.

previous_response_idstring|null

Previous response ID.

promptobject|null

Prompt template reference.

prompt.idstring

Prompt template ID.

prompt.variablesobject

Prompt variables.

prompt.versionstring

Prompt version.

prompt_cache_keystring

Prompt cache key.

prompt_cache_retention"in_memory" | "24h"

Prompt cache retention policy.

reasoningobject|null

Reasoning configuration used.

reasoning.context"auto" | "current_turn" | "all_turns"

Reasoning context mode.

reasoning.effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh"

Reasoning effort.

reasoning.summary"auto" | "concise" | "detailed" | null

Reasoning summary mode.

safety_identifierstring

Stable end-user identifier.

service_tier"auto" | "default" | "flex" | "scale" | "priority"

Service tier used.

status"completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete"

Response status.

storeboolean

Whether the response was stored.

temperaturenumber

Sampling temperature.

textobject

Text response configuration.

text.formatobject
text.verbosity"low" | "medium" | "high"

Verbosity setting.

tool_choicestring | object

Tool choice used.

toolsobject[]

Tool definitions used.

top_logprobsnumber

Top logprobs setting.

top_pnumber

Nucleus sampling setting.

truncation"auto" | "disabled"

Truncation strategy.

usageobject

Token usage.

usage.input_tokensnumber

Input token count.

usage.input_tokens_detailsobject
usage.output_tokensnumber

Output token count.

usage.output_tokens_detailsobject
usage.total_tokensnumber

Total token count.

userstring

Deprecated end-user identifier.

metadataobject

Metadata attached to the response.

Unsupported stateful operations

Requests that require stored response state return 501 unsupported_feature, including:

  • previous_response_id
  • conversation
  • background: true
  • store: true
  • /v1/responses/{response_id}
  • /v1/responses/{response_id}/input_items
  • /v1/responses/{response_id}/cancel

Request

1curl -X POST https://api.token360.ai/v1/responses \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "gpt-5.5",
6    "input": "Reply with the exact text: Paris.",
7    "max_output_tokens": 32,
8    "reasoning": { "effort": "low" }
9  }'

Response

JSON
1{
2  "id": "resp_...",
3  "object": "response",
4  "created_at": 1783584000,
5  "model": "gpt-5.5-2026-04-23",
6  "status": "completed",
7  "output": [
8    {
9      "type": "message",
10      "role": "assistant",
11      "content": [
12        {
13          "type": "output_text",
14          "text": "Paris."
15        }
16      ]
17    }
18  ],
19  "usage": {
20    "input_tokens": 18,
21    "output_tokens": 4,
22    "total_tokens": 22
23  }
24}
Was this page helpful?