API reference · OpenAI
Responses
OpenAI-format inference through your LLMFLUX gateway key.
Endpoint
POST /v1/responses
Send Content-Type: application/json and either Authorization: Bearer YOUR_KEY or x-api-key: YOUR_KEY. Authorization takes precedence. Use a server-side environment variable, never a browser bundle.
Request body
| Field | Behavior |
|---|---|
model | Required gateway selector. An enabled canonical ID or configured alias from GET /v1/models. |
input | OpenAI-format input, validated by the upstream provider. |
stream | Only literal JSON true enables SSE. Otherwise the gateway explicitly sends false upstream. |
Send input as a string or a Responses-format input array. A typical result contains output items and usage; OpenAI SDKs expose output_text as a convenience. Tool support and multimodal input depend on the upstream model. The gateway exposes POST only: response retrieval, deletion, conversations and stateful continuation are not independently implemented here.
Example request
Replace YOUR_MODEL_ID with a compatible live ID. SDK examples read LLMFLUX_MODEL and LLMFLUX_API_KEY from your environment.
One gateway key reaches every enabled provider through this path.
curl https://api.llmflux.dev/v1/responses \
-H "Authorization: Bearer $LLMFLUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"input": "Hello from LLMFLUX",
"stream": false
}'Response and streaming
Successful non-streaming requests return HTTP 200 and the provider JSON payload, not a new gateway response schema. Token usage is recorded against your account. Set stream: true for SSE streaming.
Errors and limits
Inference requires an active key, any required Telegram verification, a positive account balance and available plan allowance. The per-user inference throttle is 120 requests per minute across keys. Bodies are limited to 25 MB. See error codes for handling 401, 402, 403, 404, 429 and provider failures.