Skip to main content
POST
Create a response from text or an ordered list of input items. SnapGen’s GPT-5.6 and GPT-6 tier models support Responses and Chat Completions. Use the format your client expects; SnapGen forwards the selected protocol to a native route.
string
required
Use an exact model ID returned by GET /v1/models, such as gpt-6.1-sol.
string | array
required
A text prompt or ordered message and tool items. Message items include a role and content. Send conversation history when your application needs it.
string
Instructions for this response, such as the desired style or task constraints.
integer
Caps generated output, including reasoning tokens. Chat Completions uses max_completion_tokens instead.
object
Set GPT reasoning effort with { "effort": "medium" }. Supported effort levels vary by model.
boolean
default:"false"
Set to true to receive named server-sent events.
array
Function tool definitions use type, name, description, and parameters at the same level. This differs from Chat Completions’ nested function format. Your application executes the functions and submits their results.

Send a request

The example shows the fields needed to read text and usage. Responses can also contain reasoning or function-call items. Iterate over message items in output and read content items with type: "output_text"; do not assume the first output item contains text. The OpenAI SDKs expose an output_text helper.

Stream text

Add "stream": true to the request and read SSE events until a terminal response event. For example:
Append the delta field from response.output_text.delta events. On response.completed, read the final response, including its usage. Handle response.incomplete, response.failed, and error events as terminal outcomes instead of assuming every stream completed successfully.

Function tools

Define tools with the Responses format:
When the response includes an output item with type: "function_call", parse its JSON arguments, validate the request, and execute the named function in your application. Continue by sending the original input, relevant response output items, and a result item in the next request’s input:
Use the call_id from the function-call item. Keep reasoning and tool items needed for that turn in the conversation history. SnapGen forwards tool requests; it does not execute your functions or provide built-in hosted tools.

Billing

Billing uses the input, output, and cached-token counts reported in usage. Reasoning tokens count as output. GPT-5.6 and GPT-6 prompts over 272,000 tokens use the selected model’s long-context rate. Check live GPT-5 pricing or live GPT-6 pricing before estimating costs.