Responses
OpenAI-compatible Responses endpoint. Input items, reasoning, function calling, and streaming from a single surface.
The Responses API accepts requests in the OpenAI Responses format. Any
official OpenAI SDK works out of the box - just point baseURL at
https://api.aivene.com/v1 and call responses.create.
POST /v1/responsesSend input (a string, or a list of message and tool items) plus optional
instructions, and the model returns a response object whose output is
a list of items: messages, reasoning, and tool calls. Stream the response
with stream: true to receive typed server-sent events, or get a single
JSON payload otherwise.
Stateless by design
Responses are not stored, so every request must carry the full
conversation. To continue a conversation, append the previous output items
and your new input to input and send it again.
What you can do
- Generate text - from one-shot answers to multi-turn agentic loops.
- Call functions - register
functiontools and let the model decide when to call them. See Tool calling. - Reason - control thinking with
reasoning.effortand get reasoning summaries. See Reasoning. - Read images and files - attach
input_imageandinput_fileparts to ausermessage. See Multimodal. - Get structured output - use
text.formatwithjson_schemato ask the model for JSON that follows your schema.
Choosing a model
Every text model in the catalogue is available on this endpoint, not only
GPT models. The model id you send determines which model serves the
request, and the response echoes that same id. Some features depend on the
model, for example reasoning summaries or tool types other than function.
Browse available models at Models or
GET /v1/models.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/responses | Create response |
Every endpoint expects a bearer token in the Authorization header.
Create keys at Manage API Keys.
Errors
Errors returned before the response starts share one shape:
{ "error": { "message": "...", "type": "invalid_request_error" } }| Status | error.type | Meaning |
|---|---|---|
400 | validation_error | The body failed schema validation. The message names the offending field. |
400 | invalid_request_error | Unknown model, content or a feature the model does not support (for example images, tools or text.format), or max_output_tokens above the model's limit. |
401 | authentication_error | Missing or invalid API key. |
402 | invalid_request_error | Not enough credit for the request, an unpaid balance, or a spend limit was reached. |
403 | permission_denied_error | The account is suspended, an Admin key was used, or the model isn't included in your organization's tier. |
404 | not_found_error | The model is deprecated. The message names its replacement. |
408 | timeout_error | The model did not finish before the request timed out (non-streaming requests). |
429 | rate_limit_error | Your organization hit its rate limit for this model. Back off and retry. |
500 | internal_server_error | Unexpected server error. |
502 / 503 | upstream_error | The model is temporarily unavailable. Safe to retry. |
Errors that happen after a stream has started arrive as an error or
response.failed event instead. See
Streaming events.