Public preview: This API is in public preview. Endpoints, schemas, and limits may change before general availability.

API reference

OpenAPI 3.1 reference for the EU GPT API — responses, models, and files.

This is the OpenAPI 3.1 reference for the EU GPT public API: every endpoint with its parameters, request and response schemas, and status codes. Download the spec to generate a client or import it into your API tool.

For a top-to-bottom prose walkthrough, see Create a response and the Files API reference.

EU GPT Public API

v1.0.0
Download openapi.yaml

External-facing API for programmatic access to EU GPT.

Authenticate every request with an API key created in the EU GPT web app:

Authorization: Bearer eugpt_<token>

Keys are managed on the API Keys page of the web app (the menu under your name → API Keys). Keys created there do not expire: revoke and replace them when needed.

Base URL

https://api.eugpt.ai

Authenticatie

apiKeyhttp · bearer

Bearer-formaateugpt_<token>

EU GPT API key. Create one in the web app; pass as Authorization: Bearer eugpt_<token>.

Endpoints

POST/v1/responses

Create a response

Generate an AI response from a user message. Two modes:

  • Streaming (stream: true, default): returns Server-Sent Events with OpenAI-compatible event payloads. Each event is delivered as event: message\r\ndata: <json>\r\n\r\n. The stream ends with response.completed, response.incomplete, or an error event.
  • Non-streaming (stream: false): collects all output and returns a single JSON document.

Conversations are optional. Omit conversation_id for stateless requests; pass an existing UUID to append to a thread that belongs to the authenticated user. Built-in tools (web search, web fetch, calculator, date and time, image description, PDF/Word/PowerPoint creation) run without an approval step. Request fields that are not listed here are ignored.

Request bodyVerplicht

  • modelstring
    "auto" (the default) lets EU GPT pick the model per request. Pass a model id from GET /v1/models to use that model; an unknown id returns 400 with model_not_found. A model that EU GPT has taken off the API is handled as "auto". The response's model field reports the model used.
    StandaardautoVoorbeeldauto
  • inputstring | ContentItem[]Verplicht
    Either a plain string (one user message) or a list of ContentItem objects to attach files. Only the first input_text part is used as the question; use conversation_id for history.
  • streamboolean
    Stream as SSE (true, default) or return a single JSON response (false).
    Standaardtrue
  • instructionsstringNullable
    System prompt for this response, applied with priority over the conversation's or agent's own instructions. On a request without conversation_id, also saved with the new conversation.
  • conversation_iduuidNullable
    Append to an existing conversation of the authenticated user. Omit for a stateless request; the conversation that such a request creates is not returned.
  • project_iduuidNullable
    An agent (project) whose files are searched for this answer. The user must be a member. Applies to requests without conversation_id.
  • visibleboolean
    Show the conversation that a stateless request creates in the web app's sidebar. Ignored with conversation_id.
    Standaardfalse
  • max_output_tokensintegerNullable
    Upper bound on the number of tokens the model may generate for this response. Omit for no explicit cap (the model's own maximum applies). Values above the model's maximum are clamped to it. When the budget runs out, the response has status incomplete. The whole budget is reserved from the prepaid balance while the request runs.
    Voorbeeld1024
  • response_formatobjectNullable
    Ask for JSON, in the Chat Completions shape: {"type": "json_object"} or {"type": "json_schema", "json_schema": {"name": …, "schema": …, "strict": true}}. Requests with response_format run without tools.

Responses

200
Either an SSE stream (stream: true) or a single JSON response (stream: false).
application/json · text/event-stream▾
  • iduuidVerplicht
  • object"response"Verplicht
  • created_atintegerVerplicht
    Unix epoch seconds.
  • status"completed" | "incomplete"Verplicht
  • modelstringVerplicht
    The model used (resolved from "auto" when needed).
  • outputobject[]Verplicht
    The assistant message (type: "message"), followed by the tool calls the model made (type: "function_call").
  • output_textstringVerplicht
    All text the model wrote, a convenience for plain-text consumers.
  • generated_filesGeneratedFile[]Verplicht
    Files that tools created; download them with GET /v1/files/generated/{key}.
  • incomplete_detailsobject
    Present when status is incomplete.
400
The question is empty (detail is Input message is required), or model names an unknown model (detail.error is model_not_found).
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
401
Missing, malformed, unknown, expired, or revoked API key.
application/json▾
  • errorobjectVerplicht
402
The prepaid balance cannot cover the request. detail.error is wallet_insufficient_funds (too little or no credit), auto_topup_failed (auto top-up is off after a declined card or a reversed payment), or auto_topup_cap_reached (auto top-up reached its monthly limit).
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
403
The user is not a member of the requested project (agent).
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
404
The referenced conversation or project does not exist for this user.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
422
The request body does not match the schema, for example a missing input or a malformed UUID.
application/json▾
  • detailobject[]Verplicht
500
Internal error during response generation.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
503
No model is available through the API right now (detail.error is model_unavailable), or the requested model has no price for this account (pricing_unavailable).
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
GET/v1/models

List models

The models accepted as model by POST /v1/responses. The first entry is always auto, which lets EU GPT pick a model per request.

Responses

200
The available models.
application/json▾
  • object"list"Verplicht
  • dataModel[]Verplicht
401
Missing, malformed, unknown, expired, or revoked API key.
application/json▾
  • errorobjectVerplicht
GET/v1/files

List files

The files of the authenticated user, including files uploaded in the web app.

Parameters

  • purposestringquery
    Only return files with this purpose.
  • limitintegerquery
    Maximum number of files to return, from 1 to 10,000.
  • order"asc" | "desc"query
    Sort order by upload time.
  • afteruuidquery
    A file id; return the files after this one.

Responses

200
A page of files.
application/json▾
  • object"list"Verplicht
  • dataFileObject[]Verplicht
  • first_idstringNullable
  • last_idstringNullable
  • has_morebooleanVerplicht
401
Missing, malformed, unknown, expired, or revoked API key.
application/json▾
  • errorobjectVerplicht
POST/v1/files

Upload a file

Upload a document (up to 10 MB) as multipart/form-data. The request returns once the file has been read, so status is final: processed when the file is ready to use, error when it could not be read (the reason is in status_details).

Request bodyVerplicht

  • filebinaryVerplicht
    PDF, Word, PowerPoint, Excel (also .doc, .ppt, .xls), EPUB, RTF, HTML, Markdown, CSV, plain text, or an image.
  • purposestring
    Standaardassistants

Responses

201
The uploaded file.
application/json▾
  • iduuidVerplicht
  • object"file"Verplicht
  • bytesintegerVerplicht
  • created_atintegerVerplicht
    Unix epoch seconds.
  • filenamestringVerplicht
  • purposestringVerplicht
    Voorbeeldassistants
  • status"processed" | "uploaded" | "error"Verplicht
    processed when ready to use; error when the file could not be read.
  • status_detailsstringNullable
    Why the file could not be read, when status is error.
  • expires_atintegerNullable
    Always null; files do not expire.
400
The upload has no file name or could not be read.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
401
Missing, malformed, unknown, expired, or revoked API key.
application/json▾
  • errorobjectVerplicht
413
The file is larger than 10 MB.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
GET/v1/files/{file_id}

Retrieve file metadata

Parameters

  • file_iduuidpathVerplicht

Responses

200
The file.
application/json▾
  • iduuidVerplicht
  • object"file"Verplicht
  • bytesintegerVerplicht
  • created_atintegerVerplicht
    Unix epoch seconds.
  • filenamestringVerplicht
  • purposestringVerplicht
    Voorbeeldassistants
  • status"processed" | "uploaded" | "error"Verplicht
    processed when ready to use; error when the file could not be read.
  • status_detailsstringNullable
    Why the file could not be read, when status is error.
  • expires_atintegerNullable
    Always null; files do not expire.
404
No file with this id for this user.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
DELETE/v1/files/{file_id}

Delete a file

Parameters

  • file_iduuidpathVerplicht

Responses

200
The file was deleted.
application/json▾
  • iduuidVerplicht
  • object"file"Verplicht
  • deletedtrueVerplicht
404
No file with this id for this user.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
GET/v1/files/{file_id}/content

Download file content

The file's bytes, with the file's own Content-Type and a Content-Disposition header.

Parameters

  • file_iduuidpathVerplicht

Responses

200
The file content.
application/octet-stream
404
No file with this id for this user.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.
GET/v1/files/generated/{key}

Download a generated file

Turn the key of a file that a tool generated (from generated_files or a response.file.generated event) into a download link that works for 60 seconds without an API key.

Parameters

  • keystringpathVerplicht
    The generated file's key, in the form <conversation id>/<file name>.

Responses

200
A short-lived download link.
application/json▾
  • urluriVerplicht
  • filenamestringVerplicht
404
No generated file with this key for this user.
application/json▾
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.

Schemas

CreateResponseRequest

object
  • modelstring
    "auto" (the default) lets EU GPT pick the model per request. Pass a model id from GET /v1/models to use that model; an unknown id returns 400 with model_not_found. A model that EU GPT has taken off the API is handled as "auto". The response's model field reports the model used.
    StandaardautoVoorbeeldauto
  • inputstring | ContentItem[]Verplicht
    Either a plain string (one user message) or a list of ContentItem objects to attach files. Only the first input_text part is used as the question; use conversation_id for history.
  • streamboolean
    Stream as SSE (true, default) or return a single JSON response (false).
    Standaardtrue
  • instructionsstringNullable
    System prompt for this response, applied with priority over the conversation's or agent's own instructions. On a request without conversation_id, also saved with the new conversation.
  • conversation_iduuidNullable
    Append to an existing conversation of the authenticated user. Omit for a stateless request; the conversation that such a request creates is not returned.
  • project_iduuidNullable
    An agent (project) whose files are searched for this answer. The user must be a member. Applies to requests without conversation_id.
  • visibleboolean
    Show the conversation that a stateless request creates in the web app's sidebar. Ignored with conversation_id.
    Standaardfalse
  • max_output_tokensintegerNullable
    Upper bound on the number of tokens the model may generate for this response. Omit for no explicit cap (the model's own maximum applies). Values above the model's maximum are clamped to it. When the budget runs out, the response has status incomplete. The whole budget is reserved from the prepaid balance while the request runs.
    Voorbeeld1024
  • response_formatobjectNullable
    Ask for JSON, in the Chat Completions shape: {"type": "json_object"} or {"type": "json_schema", "json_schema": {"name": …, "schema": …, "strict": true}}. Requests with response_format run without tools.

ContentItem

object
  • rolestringNullable
    Optional role hint (e.g. "user"); not used.
  • typestringNullable
  • contentInputText | InputFile[]Verplicht

InputContent

InputText | InputFile

InputText

object
  • type"input_text"Verplicht
  • textstringVerplicht

InputFile

object
  • type"input_file"Verplicht
  • file_iduuidVerplicht
    Id of a file uploaded with POST /v1/files.

ResponseObject

object
Returned when stream: false.
  • iduuidVerplicht
  • object"response"Verplicht
  • created_atintegerVerplicht
    Unix epoch seconds.
  • status"completed" | "incomplete"Verplicht
  • modelstringVerplicht
    The model used (resolved from "auto" when needed).
  • outputobject[]Verplicht
    The assistant message (type: "message"), followed by the tool calls the model made (type: "function_call").
  • output_textstringVerplicht
    All text the model wrote, a convenience for plain-text consumers.
  • generated_filesGeneratedFile[]Verplicht
    Files that tools created; download them with GET /v1/files/generated/{key}.
  • incomplete_detailsobject
    Present when status is incomplete.

GeneratedFile

object
  • call_idstring
    The tool call that created the file.
  • tool_namestring
    Voorbeeldgenerate_pdf
  • keystringVerplicht
    Pass to GET /v1/files/generated/{key}.
  • filenamestringVerplicht
  • sizeintegerVerplicht
    Size in bytes.
  • content_typestringVerplicht
    Voorbeeldapplication/pdf

SseEventStream

text/event-stream
Server-Sent Events stream. Each event is one of the OpenAI-compatible types below; payloads are JSON in the data: line. Lines end with \r\n, and : ping comments arrive every 15 seconds. Event types: - response.created: first event, with response metadata. - response.output_item.added: the assistant message, or a tool call (function_call) starting. - response.content_part.added: the text part of the message begins. - response.output_text.delta: incremental text chunks. - response.output_text.done: a stretch of text finalised. - response.output_item.done: a tool call finished, with its output and status. - response.file.generated: a tool created a file. - response.model.fallback: another model took over. - response.completed: success, with output_text and sources. - response.incomplete: the answer reached max_output_tokens. - error: the response failed, with code and message.

ModelList

object
  • object"list"Verplicht
  • dataModel[]Verplicht

Model

object
  • idstringVerplicht
    Value to pass as model.
    Voorbeeldqwen3.5-397b-a17b
  • object"model"Verplicht
  • createdintegerVerplicht
    Always 0.
  • owned_bystringVerplicht
    Model developer, or eugpt for auto.
    Voorbeeldqwen
  • context_windowinteger
    Maximum input tokens. Absent for auto.
  • max_output_tokensinteger
    Maximum output tokens per response. Absent for auto.
  • supports_toolsboolean
    Whether the model can call tools. Absent for auto.
  • reasoningboolean
    Whether the model reasons before answering. Absent for auto.

FileObject

object
  • iduuidVerplicht
  • object"file"Verplicht
  • bytesintegerVerplicht
  • created_atintegerVerplicht
    Unix epoch seconds.
  • filenamestringVerplicht
  • purposestringVerplicht
    Voorbeeldassistants
  • status"processed" | "uploaded" | "error"Verplicht
    processed when ready to use; error when the file could not be read.
  • status_detailsstringNullable
    Why the file could not be read, when status is error.
  • expires_atintegerNullable
    Always null; files do not expire.

FileList

object
  • object"list"Verplicht
  • dataFileObject[]Verplicht
  • first_idstringNullable
  • last_idstringNullable
  • has_morebooleanVerplicht

FileDeleted

object
  • iduuidVerplicht
  • object"file"Verplicht
  • deletedtrueVerplicht

Error

object
  • detailstring | objectVerplicht
    A message, or an object with a machine-readable error code and a message.

AuthenticationError

object
  • errorobjectVerplicht

ValidationError

object
  • detailobject[]Verplicht