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/responses

Send 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 function tools and let the model decide when to call them. See Tool calling.
  • Reason - control thinking with reasoning.effort and get reasoning summaries. See Reasoning.
  • Read images and files - attach input_image and input_file parts to a user message. See Multimodal.
  • Get structured output - use text.format with json_schema to 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

MethodEndpointDescription
POST/v1/responsesCreate 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" } }
Statuserror.typeMeaning
400validation_errorThe body failed schema validation. The message names the offending field.
400invalid_request_errorUnknown 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.
401authentication_errorMissing or invalid API key.
402invalid_request_errorNot enough credit for the request, an unpaid balance, or a spend limit was reached.
403permission_denied_errorThe account is suspended, an Admin key was used, or the model isn't included in your organization's tier.
404not_found_errorThe model is deprecated. The message names its replacement.
408timeout_errorThe model did not finish before the request timed out (non-streaming requests).
429rate_limit_errorYour organization hit its rate limit for this model. Back off and retry.
500internal_server_errorUnexpected server error.
502 / 503upstream_errorThe 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.