Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
API ReferenceInferenceResponses

Create a model response (OpenAI Responses)

Generates a model response in the OpenAI Responses shape for the OpenAI SDKs and Codex. Check a model's supported_apis on GET /v1/models first. Stateless: the gateway sends store false and refuses previous_response_id, conversation, background, stored prompts, item references and file inputs (400 unsupported_parameter). Send the full conversation in input on every turn. Client-executed tools (function, custom, namespace, client tool_search) are forwarded; hosted web_search is removed and every other hosted tool is refused (400 unsupported_tool_type). Requires a funded balance. Set "stream" to true for event-typed Server-Sent Events (response.created, response.output_text.delta, response.completed, and so on); a stream carries no [DONE] line. The request body is capped at 10 MiB.

Required permission

Requires the inference.invoke permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl responses create --input <input> --model <model>
POST
/v1/responses

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Request Body

application/json
  1. body

An OpenAI Responses request, served stateless. Opaque: unlisted Responses parameters (temperature, top_p, tool_choice, text, reasoning, ...) are forwarded as sent.

model*string

An OpenRelay public model id.

input*|array<>

The full conversation: a string, or an array of input items (messages, function_call, function_call_output, reasoning, ...).

instructions?string

The system prompt.

max_output_tokens?integer

Upper bound on tokens to generate, reasoning included.

stream?boolean

Stream the response as event-typed Server-Sent Events.

store?boolean

Ignored: the gateway always sends false.

[key: string]?any

Response Body

OK

  1. response

An OpenAI Response object (opaque; additionalProperties carries the rest of the dialect).

id?string
object?"response"
Value in"response"
status?string

completed, incomplete or failed.

model?string

Always the public OpenRelay model id requested.

output?array<>
usage?
openrelay?

What the request is billed, on every online inference response.

[key: string]?any
Example Request
curl -X POST 'https://inference.openrelay.inc/v1/responses' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "input": "string"}'
Example Response
{  "id": "string",  "object": "response",  "status": "string",  "model": "string",  "output": [    {}  ],  "usage": {},  "openrelay": {    "cost_nano_usd": 0,    "priced_at": "string"  }}