Assistants
AI assistant endpoints
https://app.meingpt.com/api/assistants/v1/Get available assistants
Retrieves all assistants available to the authenticated user
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| assistants | Array<object> |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
https://app.meingpt.com/api/assistants/v1/{assistantId}/runRun an assistant
Executes an assistant with the provided messages and returns the assistant's response with tool calls and reasoning. Alternatively, you can use `multipart/form-data` to include files. In that case, send `messages` as a JSON string and upload files via `files`.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
Request Body · application/json
| Feld | Typ | Beschreibung |
|---|---|---|
| messages* | Array<ChatMessage> | |
| chat_id | string | ID of an existing conversation, taken from the `chat_id` of an earlier response. The stored history is used automatically. If omitted, a new conversation starts. |
| prompt | string |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| text | string | The assistant's response text |
| model | string | The model used for generation |
| messages | Array<object> | The assistant's response messages including tool calls and reasoning |
| usage | object | |
| citations | Array<string> | Citations from tool usage |
| chat_id | string | ID of an existing conversation, taken from the `chat_id` of an earlier response. The stored history is used automatically. If omitted, a new conversation starts. |
| files | Array<object> |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
Why an assistant run is rejected with 403
An API key runs assistants on behalf of its owner. An assistant working in the web interface is therefore not enough: with the API, the key owner's access and usage tier count. There is no separate activation for assistant runs, they use the same switch as the completions API.
Note
If the API answers 403, these are the possible causes:
- Usage tier API budget: If the key owner's usage tier has an API limit of €0.00, or the limit is used up, the API rejects runs whose assistant model is paid (message
Your workspace API usage limit has been reached…). Free models are exempt, so a call with a free model can work while the same assistant with a paid model is rejected. A workspace admin assigns a usage tier with an API budget underSettings > Members, see Usage limits. - Assistant not available: The assistant is not available to the key's owner, meaning it was neither created by them nor shared with them, one of their teams or the workspace (message
Assistant not available).GET /assistants/v1/lists the assistants available to the key owner. - Model not enabled: The assistant's model is not enabled in the workspace (message
Model '…' is not enabled for this organization.).
Timing for Synchronous API Calls
An assistant run via the API is synchronous and provides no separate status or polling endpoint. The request stays open until the assistant finishes or an infrastructure timeout occurs, typically around five minutes. This is independent of your own HTTP client's timeout — if your client's timeout is shorter, it aborts the connection first and you never see the assistant's response, even though the run may have kept going server-side. Configure your client's timeout to cover the expected run duration. Processing large or multiple files, complex tool calls, or large outputs can push a run into this window. Plan accordingly for long-running calls, or trigger them asynchronously via an external automation (e.g. Make) that checks completion separately.
Attaching files to an assistant run
You can attach files to an assistant run. The size limit is 50 MB per file; details are in the API reference. Up to 10 files per call are possible. The files belong to the run's conversation, see Continuing a conversation. Files that should apply to every run of the assistant are managed through the Assistant Files API.
Note
Connectors (e.g. Outlook, SharePoint, Confluence) attached to an assistant are available on an assistant run via the external API. They resolve against the connections of the user account owning the API key being used — that account has to have connected the service itself. This holds for every personal connection (OAuth connectors and your own MCP servers): another member's connection is never used, so an assistant whose connector is not connected under the API key's account simply runs without it. The exception are team-shared custom MCP servers authenticating through fixed headers stored with the server: those act as a service account and work for every caller, exactly as they do in chat.
Built-in tools follow their own, stricter rule:
Attention
Certain built-in tools are also not automatically available on an assistant run via the external API, even if they're visible for the same assistant in interactive chat: web search, the Code Sandbox, slide generation, artifacts (documents), and image generation are, in chat, partly enabled only through a chat-wide toggle rather than being permanently saved on the assistant. Via the API, they're only available if explicitly attached as a tool on the assistant itself (the "Tools" tab in the assistant editor). Data pools, files uploaded directly to the assistant, and the Meetings knowledge source are not affected by this - they're stored on the assistant itself and work via the API the same way they do in chat.
Note
Data pools (data sources / RAG) attached to an assistant are available on an assistant run via the external API too. This requires that the user account owning the API key being used has been granted access to that data pool (see the "Access control" section in the data pools document) — independent of who the assistant itself was shared with. You check or change a data pool's sharing settings under Settings → Data sources, an area only visible to workspace admins. If you are not an admin yourself, ask an admin to check the sharing settings for the affected data pool, even if you created the assistant yourself.
Reading the model's reasoning content
For models that produce a visible thinking step (the "Reasoning tag" models — see Models), that reasoning is included in the messages array of the run response, not in text. It shows up as one or more content parts with type: "reasoning" inside an assistant message, alongside type: "text" and any tool-call parts:
{
"role": "assistant",
"content": [
{ "type": "reasoning", "text": "..." },
{ "type": "text", "text": "..." }
]
}To extract it, iterate over messages, keep the entries with role: "assistant", and collect the text of every content part where type is "reasoning".
The Completions API returns the thinking step in a reasoning_content field instead.
Whether reasoning parts are present, and how detailed they are, depends on the model and its reasoning effort - some models reason internally without emitting a visible trace at all. Set the effort per run with reasoning_effort (none, minimal, low, medium or high). If the assistant's model doesn't offer the chosen level, or the value is unknown, it uses its default.
Continuing a conversation with chat_id
Every assistant run is saved in a chat. The response contains its chat_id (with stream: true, in the done event). If you send that chat_id with your next call, the assistant continues the conversation: the server gives the model the stored history, and you send only the new message (messages or prompt).
- Without
chat_id, every call starts a new conversation. - When you set
chat_id, do not resend the earlier history, or it will be read twice. - The
chat_idmust belong to the user who owns the API key. Otherwise the API rejects the call. - With
multipart/form-data, passchat_idas a form field. - Files you send with a run belong to that conversation and are not visible to other conversations of the assistant. They are not added to the assistant's own files.
Example request body:
{
"chat_id": "<chat_id from the previous response>",
"messages": [{ "role": "user", "content": "And how does that compare to last year?" }]
}Streaming the answer
With stream: true (for multipart/form-data, a stream field with the value true), the answer arrives as Server-Sent Events while the assistant is still working. Each event is a data: {...} line with a type:
type | Content |
|---|---|
text-delta | text: the next piece of the answer |
reasoning-delta | text: the next piece of the reasoning, for models with a visible thinking step |
tool-call, tool-result, tool-error | toolCallId, toolName: a tool is being called, has answered, or has failed (the run continues) |
done | the same fields as the response without stream; usage holds the token count as inputTokens, outputTokens and totalTokens, and citations is left out |
error | code, message: the run failed after the stream had started |
Errors before the first event, such as an invalid parameter or an unavailable assistant, come back as JSON with a matching HTTP status, as without stream. If your client disconnects, the run still finishes and is saved to the chat.
Finding the AssistantId
- Go to edit mode for your assistant
- In the URL, you'll find the AssistantId after
/assistants/
