Responses.
The OpenAI Responses dialect on the lx1 catalog — the wire protocol the Codex CLI uses. Send input, receive typed output items, stream with SSE.
Endpoint
/v1/responsesAuthenticate with Authorization: Bearer lx1_.... This is the surface a Codex provider block with wire_api = "responses" talks to — see the Codex CLI guide.
Request parameters
| Parameter | Type | Notes |
|---|---|---|
model | string · required | Any catalog id. |
input | string | array · required | A plain string, or a list of input items (messages, tool results). |
instructions | string | System-level guidance for the run. |
max_output_tokens | integer | Output ceiling. On reasoning models, hidden reasoning counts against it. |
temperature | number | Sampling temperature. |
tools | array | Function tools. See Tool calling. |
stream | boolean | SSE event stream when true. |
On reasoning models a very small max_output_tokens can be consumed entirely by hidden reasoning, leaving an empty output_text. If you see empty outputs, raise the budget — 4,000+ is a safe floor for reasoning models.
Example
curl https://api.layerx1.in/v1/responses \
-H "authorization: Bearer $LAYERX1_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "lx1-gpt-oss-120b",
"input": "Say hi."
}'{
"id": "resp_...",
"object": "response",
"model": "lx1-gpt-oss-120b",
"output": [{
"type": "message",
"role": "assistant",
"content": [{ "type": "output_text", "text": "Hi." }]
}],
"usage": { "input_tokens": 14, "output_tokens": 3 }
}Streaming
With stream: true the response is an SSE event stream — typed events such as response.output_text.delta as text generates, closed by response.completed. The OpenAI SDKs' responses.stream(...) helpers consume it unchanged. See Streaming.
Errors
Standard status codes, OpenAI-shaped bodies. Retry on 429/5xx with backoff and honor retry-after. Full reference: Errors.