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.0External-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.aiAuthenticatie
apiKeyhttp · bearerBearer-formaateugpt_<token>
Authorization: Bearer eugpt_<token>.Endpoints
/v1/responsesCreate 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 asevent: message\r\ndata: <json>\r\n\r\n. The stream ends withresponse.completed,response.incomplete, or anerrorevent. - 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 fromGET /v1/modelsto use that model; an unknown id returns400withmodel_not_found. A model that EU GPT has taken off the API is handled as"auto". The response'smodelfield reports the model used.StandaardautoVoorbeeldautoinputstring | ContentItem[]VerplichtEither a plain string (one user message) or a list ofContentItemobjects to attach files. Only the firstinput_textpart is used as the question; useconversation_idfor history.streambooleanStream as SSE (true, default) or return a single JSON response (false).StandaardtrueinstructionsstringNullableSystem prompt for this response, applied with priority over the conversation's or agent's own instructions. On a request withoutconversation_id, also saved with the new conversation.conversation_iduuidNullableAppend to an existing conversation of the authenticated user. Omit for a stateless request; the conversation that such a request creates is not returned.project_iduuidNullableAn agent (project) whose files are searched for this answer. The user must be a member. Applies to requests withoutconversation_id.visiblebooleanShow the conversation that a stateless request creates in the web app's sidebar. Ignored withconversation_id.Standaardfalsemax_output_tokensintegerNullableUpper 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 statusincomplete. The whole budget is reserved from the prepaid balance while the request runs.Voorbeeld1024response_formatobjectNullableAsk for JSON, in the Chat Completions shape:{"type": "json_object"}or{"type": "json_schema", "json_schema": {"name": …, "schema": …, "strict": true}}. Requests withresponse_formatrun without tools.
Responses
200Either an SSE stream (stream: true) or a single JSON response
(stream: false).application/json · text/event-stream▾
stream: true) or a single JSON response
(stream: false).iduuidVerplichtobject"response"Verplichtcreated_atintegerVerplichtUnix epoch seconds.status"completed" | "incomplete"VerplichtmodelstringVerplichtThe model used (resolved from"auto"when needed).outputobject[]VerplichtThe assistant message (type: "message"), followed by the tool calls the model made (type: "function_call").output_textstringVerplichtAll text the model wrote, a convenience for plain-text consumers.generated_filesGeneratedFile[]VerplichtFiles that tools created; download them withGET /v1/files/generated/{key}.incomplete_detailsobjectPresent whenstatusisincomplete.
400The question is empty (detail is Input message is required),
or model names an unknown model (detail.error is
model_not_found).application/json▾
detail is Input message is required),
or model names an unknown model (detail.error is
model_not_found).detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
401Missing, malformed, unknown, expired, or revoked API key.application/json▾
errorobjectVerplicht
402The 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▾
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).detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
403The user is not a member of the requested project (agent).application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
404The referenced conversation or project does not exist for this user.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
422The request body does not match the schema, for example a missing input or a malformed UUID.application/json▾
input or a malformed UUID.detailobject[]Verplicht
500Internal error during response generation.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
503No 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▾
detail.error is
model_unavailable), or the requested model has no price for this
account (pricing_unavailable).detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
/v1/modelsList 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
200The available models.application/json▾
object"list"VerplichtdataModel[]Verplicht
401Missing, malformed, unknown, expired, or revoked API key.application/json▾
errorobjectVerplicht
/v1/filesList files
The files of the authenticated user, including files uploaded in the web app.
Parameters
purposestringqueryOnly return files with this purpose.limitintegerqueryMaximum number of files to return, from 1 to 10,000.order"asc" | "desc"querySort order by upload time.afteruuidqueryA file id; return the files after this one.
Responses
200A page of files.application/json▾
object"list"VerplichtdataFileObject[]Verplichtfirst_idstringNullablelast_idstringNullablehas_morebooleanVerplicht
401Missing, malformed, unknown, expired, or revoked API key.application/json▾
errorobjectVerplicht
/v1/filesUpload 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
filebinaryVerplichtPDF, Word, PowerPoint, Excel (also .doc, .ppt, .xls), EPUB, RTF, HTML, Markdown, CSV, plain text, or an image.purposestringStandaardassistants
Responses
201The uploaded file.application/json▾
iduuidVerplichtobject"file"VerplichtbytesintegerVerplichtcreated_atintegerVerplichtUnix epoch seconds.filenamestringVerplichtpurposestringVerplichtVoorbeeldassistantsstatus"processed" | "uploaded" | "error"Verplichtprocessedwhen ready to use;errorwhen the file could not be read.status_detailsstringNullableWhy the file could not be read, whenstatusiserror.expires_atintegerNullableAlwaysnull; files do not expire.
400The upload has no file name or could not be read.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
401Missing, malformed, unknown, expired, or revoked API key.application/json▾
errorobjectVerplicht
413The file is larger than 10 MB.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
/v1/files/{file_id}Retrieve file metadata
Parameters
file_iduuidpathVerplicht
Responses
200The file.application/json▾
iduuidVerplichtobject"file"VerplichtbytesintegerVerplichtcreated_atintegerVerplichtUnix epoch seconds.filenamestringVerplichtpurposestringVerplichtVoorbeeldassistantsstatus"processed" | "uploaded" | "error"Verplichtprocessedwhen ready to use;errorwhen the file could not be read.status_detailsstringNullableWhy the file could not be read, whenstatusiserror.expires_atintegerNullableAlwaysnull; files do not expire.
404No file with this id for this user.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
/v1/files/{file_id}Delete a file
Parameters
file_iduuidpathVerplicht
Responses
200The file was deleted.application/json▾
iduuidVerplichtobject"file"VerplichtdeletedtrueVerplicht
404No file with this id for this user.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
/v1/files/{file_id}/contentDownload file content
The file's bytes, with the file's own Content-Type and a Content-Disposition header.
Parameters
file_iduuidpathVerplicht
Responses
200The file content.application/octet-stream
404No file with this id for this user.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
/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
keystringpathVerplichtThe generated file's key, in the form<conversation id>/<file name>.
Responses
200A short-lived download link.application/json▾
urluriVerplichtfilenamestringVerplicht
404No generated file with this key for this user.application/json▾
detailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
Schemas
CreateResponseRequest
objectmodelstring"auto"(the default) lets EU GPT pick the model per request. Pass a model id fromGET /v1/modelsto use that model; an unknown id returns400withmodel_not_found. A model that EU GPT has taken off the API is handled as"auto". The response'smodelfield reports the model used.StandaardautoVoorbeeldautoinputstring | ContentItem[]VerplichtEither a plain string (one user message) or a list ofContentItemobjects to attach files. Only the firstinput_textpart is used as the question; useconversation_idfor history.streambooleanStream as SSE (true, default) or return a single JSON response (false).StandaardtrueinstructionsstringNullableSystem prompt for this response, applied with priority over the conversation's or agent's own instructions. On a request withoutconversation_id, also saved with the new conversation.conversation_iduuidNullableAppend to an existing conversation of the authenticated user. Omit for a stateless request; the conversation that such a request creates is not returned.project_iduuidNullableAn agent (project) whose files are searched for this answer. The user must be a member. Applies to requests withoutconversation_id.visiblebooleanShow the conversation that a stateless request creates in the web app's sidebar. Ignored withconversation_id.Standaardfalsemax_output_tokensintegerNullableUpper 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 statusincomplete. The whole budget is reserved from the prepaid balance while the request runs.Voorbeeld1024response_formatobjectNullableAsk for JSON, in the Chat Completions shape:{"type": "json_object"}or{"type": "json_schema", "json_schema": {"name": …, "schema": …, "strict": true}}. Requests withresponse_formatrun without tools.
ContentItem
objectrolestringNullableOptional role hint (e.g."user"); not used.typestringNullablecontentInputText | InputFile[]Verplicht
InputContent
InputText | InputFileInputText
objecttype"input_text"VerplichttextstringVerplicht
InputFile
objecttype"input_file"Verplichtfile_iduuidVerplichtId of a file uploaded withPOST /v1/files.
ResponseObject
objectstream: false.iduuidVerplichtobject"response"Verplichtcreated_atintegerVerplichtUnix epoch seconds.status"completed" | "incomplete"VerplichtmodelstringVerplichtThe model used (resolved from"auto"when needed).outputobject[]VerplichtThe assistant message (type: "message"), followed by the tool calls the model made (type: "function_call").output_textstringVerplichtAll text the model wrote, a convenience for plain-text consumers.generated_filesGeneratedFile[]VerplichtFiles that tools created; download them withGET /v1/files/generated/{key}.incomplete_detailsobjectPresent whenstatusisincomplete.
GeneratedFile
objectcall_idstringThe tool call that created the file.tool_namestringVoorbeeldgenerate_pdfkeystringVerplichtPass toGET /v1/files/generated/{key}.filenamestringVerplichtsizeintegerVerplichtSize in bytes.content_typestringVerplichtVoorbeeldapplication/pdf
SseEventStream
text/event-streamdata: 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
objectobject"list"VerplichtdataModel[]Verplicht
Model
objectidstringVerplichtValue to pass asmodel.Voorbeeldqwen3.5-397b-a17bobject"model"VerplichtcreatedintegerVerplichtAlways0.owned_bystringVerplichtModel developer, oreugptforauto.Voorbeeldqwencontext_windowintegerMaximum input tokens. Absent forauto.max_output_tokensintegerMaximum output tokens per response. Absent forauto.supports_toolsbooleanWhether the model can call tools. Absent forauto.reasoningbooleanWhether the model reasons before answering. Absent forauto.
FileObject
objectiduuidVerplichtobject"file"VerplichtbytesintegerVerplichtcreated_atintegerVerplichtUnix epoch seconds.filenamestringVerplichtpurposestringVerplichtVoorbeeldassistantsstatus"processed" | "uploaded" | "error"Verplichtprocessedwhen ready to use;errorwhen the file could not be read.status_detailsstringNullableWhy the file could not be read, whenstatusiserror.expires_atintegerNullableAlwaysnull; files do not expire.
FileList
objectobject"list"VerplichtdataFileObject[]Verplichtfirst_idstringNullablelast_idstringNullablehas_morebooleanVerplicht
FileDeleted
objectiduuidVerplichtobject"file"VerplichtdeletedtrueVerplicht
Error
objectdetailstring | objectVerplichtA message, or an object with a machine-readableerrorcode and amessage.
AuthenticationError
objecterrorobjectVerplicht
ValidationError
objectdetailobject[]Verplicht