Public preview — This API is in public preview. Endpoints, schemas, and limits may change before general availability.
API
Create a response
Full reference for POST /v1/responses — every field, every shape, every default.
Generate a response from a user message. This is the single conversational endpoint on EU GPT.
Endpoint#
POST /v1/responses
Authorization: Bearer eugpt_<token>
Content-Type: application/json
The full interactive reference is at API reference. This page documents the request and response shapes in prose so you can read top-to-bottom.
Request body#
{
model?: string, // default: "auto"
input: string | ContentItem[], // required
stream?: boolean, // default: true
instructions?: string | null,
conversation_id?: string | null, // UUID
project_id?: string | null, // UUID
}
model#
Accepted for OpenAI-SDK compatibility but ignored — the router always selects the model. Pass "auto" (the default and only meaningful value); any concrete id you send has no effect. The model actually used is reported in the response model field. See Models for routing behaviour.
"model": "auto"
input#
The user message. Either a plain string for text-only input, or a list of ContentItems for structured input.
String form:
"input": "Summarise the Q3 audit in three bullets."
Structured form:
"input": [
{
"role": "user",
"content": [
{ "type": "input_text", "text": "Summarise the Q3 audit in three bullets." }
]
}
]
Each ContentItem has:
role(optional) — usually"user". If omitted, treated as user.content— a list ofInputContentparts, each withtype: "input_text"and atextfield.
stream#
Boolean. Defaults to true. When true, the response is Server-Sent Events. When false, the response is a single JSON document.
"stream": false
See Streaming for the trade-offs and Streaming events for the event taxonomy.
instructions#
System prompt for this response. Steers tone, format, persona, language.
"instructions": "Always respond in Dutch. Cite sources when using web_search."
If conversation_id refers to a brand-new conversation, the instructions are also stored as the conversation’s system message. For existing conversations, they apply to this response only.
conversation_id#
UUID of an existing conversation. Append to it. The conversation must be owned by the user that issued the API key.
"conversation_id": "8f14e45f-ceea-467a-a4ed-a9e9a5cb16ee"
Omit (or pass null) for a stateless request. See Conversations.
project_id#
UUID of a project for RAG retrieval. The project’s file corpus is searched and relevant chunks are added to the prompt context.
"project_id": "1c8b9a7f-2d3e-4f5a-9b8c-7d6e5f4a3b2c"
The caller must be a member of the project. Otherwise the response is 403.
Response — non-streaming (stream: false)#
{
id: string, // UUID
object: "response",
created_at: number, // Unix epoch ms
status: "completed",
model: string, // resolved concrete model id
output: ContentItem[], // structured output (tool calls, content parts, …)
output_text: string, // flat concatenated text
}
output_textis the convenience field. For plain-text consumers this is all you need.outputcarries the structured items: text content, tool calls and their outputs, file references. Match the shape of the streamedresponse.output_item.addedevents.
status is always completed when a response body is returned — failures come back as HTTP error responses with the error envelope, not a status field.
Response — streaming (stream: true)#
Content-Type: text/event-stream. Each event has the shape:
event: message
data: { "type": "<event-name>", "sequence_number": <int>, … }
The full event reference is at Streaming events. The minimum sequence is:
response.created
response.output_text.delta (one or more)
response.completed
The terminal event is always response.completed (success) or error (failure mid-stream).
Examples#
Minimal stateless string input#
curl https://chat.eugpt.ai/v1/responses \
-H "Authorization: Bearer $EUGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"Hello, world.","stream":false}'
Multi-turn conversation#
curl https://chat.eugpt.ai/v1/responses \
-H "Authorization: Bearer $EUGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"input": "And what was the previous answer in one sentence?",
"conversation_id": "8f14e45f-ceea-467a-a4ed-a9e9a5cb16ee",
"stream": false
}'
Project-scoped RAG#
curl https://chat.eugpt.ai/v1/responses \
-H "Authorization: Bearer $EUGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "What does the 2024 audit say about server costs?",
"project_id": "1c8b9a7f-2d3e-4f5a-9b8c-7d6e5f4a3b2c",
"stream": false
}'