Responses API
Generate text using the stateless OpenAI Responses format.
This endpoint follows the OpenAI Responses format and supports text and image inputs, function tools, structured outputs, reasoning, and streaming.
The Responses API is stateless
outerlane does not store conversation state. Sending store: true, previous_response_id, background: true, or conversation returns 400 unsupported_feature. To continue a conversation, resend all earlier message, function_call, and function_call_output items in input.
Example request
curl https://api.outerlane.app/v1/responses \
-H "Authorization: Bearer $OUTERLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6.1-sol",
"instructions": "Answer concisely.",
"input": "What is the capital of South Korea?"
}'Request body
effort to control reasoning effort."auto", "required", "none", or { "type": "function", "name": "..." }true to stream the response.temperature, top_p, and user are forwarded with their OpenAI semantics.
Input items
| Item | Required fields | Description |
|---|---|---|
Message (type: "message" or omitted) | role, content | role is user, assistant, system, or developer |
function_call | call_id, name, arguments | Function call requested by the model. arguments is a string. |
function_call_output | call_id, output | Function result. output is a string. |
Message content arrays accept input_text, output_text, refusal, and input_image. For input_image, provide an https:// or data:image/... URL in image_url. Other inputs, including files and audio, return 400 unsupported_input.
Response
{
"id": "resp_a1b2c3d4e5f6a1b2c3d4e5f6",
"object": "response",
"status": "completed",
"model": "openai/gpt-6.1-sol",
"output": [
{
"id": "msg_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [{ "type": "output_text", "text": "The capital is Seoul.", "annotations": [] }]
}
],
"store": false,
"previous_response_id": null,
"usage": {
"input_tokens": 21,
"input_tokens_details": { "cached_tokens": 0 },
"output_tokens": 6,
"total_tokens": 27
},
"x_outerlane": {
"request_id": "req_a1b2c3d4e5f6a1b2c3d4e5f6",
"input": 21,
"cached": 0,
"output": 6,
"costUsd": 0.000051,
"chargedUsd": 0.000051,
"reasoning_effort": null
}
}storeis alwaysfalseandprevious_response_idis alwaysnull.statusiscompletedorincomplete. If a token limit or content filter interrupts output,incomplete_details.reasonismax_output_tokensorcontent_filter.usage.input_tokensincludes cache hits. Seeusage.input_tokens_details.cached_tokensfor the cached portion.
Streaming
With stream: true, events arrive in the order below. sequence_number increments by one per event.
response.created,response.in_progress- Text:
response.output_item.added→response.content_part.added→response.output_text.delta(orresponse.refusal.deltafor refusals) →response.output_text.done→response.content_part.done→response.output_item.done - Function call:
response.output_item.added→response.function_call_arguments.delta→response.function_call_arguments.done→response.output_item.done response.completedorresponse.incomplete. The event includes billing metadata inresponse.x_outerlane.