Die API-Referenzdokumentation ist derzeit nur in Englisch verfügbar. Wenn Sie diese Seite in einer anderen Sprache anzeigen, wechseln Sie bitte zur englischen Version — die vollständige Liste der API-Endpunkte wird in der linken Seitenleiste angezeigt.
Basis-URL
Authentifizierung
Alle API-Anfragen erfordern eine Authentifizierung über einen API-Schlüssel oder JWT-Token.API-Schlüssel verwenden
Fügen Sie Ihren API-Schlüssel in denAuthorization-Header ein:
Using JWT Token
The SSE streaming endpoints (/api/react, /api/dag and /api/auto) read the token from the request body, not from the Authorization header. The value can be a JWT access token or an API key:
Antwortformat
Success Response
Most endpoints that return a single resource or an acknowledgement wrap it in this structure (list endpoints and the sign-in endpoints return their payload directly):Error Response
Error responses carry a human-readabledetail, a machine-readable error_code (null for a few generic errors), and error_args with values for the message:
Paginierte Antworten
List-Endpunkte geben paginierte Ergebnisse zurück:Streaming (Server-Sent Events)
Chat endpoints (POST /api/react, POST /api/dag and POST /api/auto) return Server-Sent Events for real-time streaming. Each event has a type field indicating its content:
The conversation title is generated in the background after
end; read it from GET /api/conversations/{id}.
Example SSE Stream
Cursor-based resume
Every persisted SSE event is sent as{"cursor": <int>, "data": {...}}; the cursor increases monotonically within the assistant turn. Clients should track the highest cursor seen. When the connection drops mid-turn (network error, proxy timeout, server restart), the client can re-subscribe without re-running the agent:
cursor > 42 and ends with a terminal event: resume_done frame. Pass cursor: -1 to request a full replay from the beginning.
Error responses:
404 conversation_not_found— conversation id is invalid or not owned by the authenticated user404 no_recent_assistant_message— conversation has no persisted assistant turn to resume from (e.g., a brand-new conversation with no user messages yet)400 invalid_cursor— cursor is not a non-negative integer or-1
useSseResume hook in the playground) auto-retries network disconnects with exponential backoff (300ms → 1s → 3s, max 3 attempts) and distinguishes user-initiated abort from network error to avoid unintended reconnects. See the playground-page.tsx integration for the full pattern.
Resume is stateless — it replays from the assistant message’s stored
sse_events array. If the agent’s turn was interrupted before any assistant message was persisted (e.g., a crash before done), the dangling tool_use block is auto-repaired by DbMemory._repair_dangling_tool_calls on the next turn. Synthetic tool_result rows are persisted with metadata_.synthetic=true and metadata_.reason="interrupted" for audit.Business References
A system that embeds FIM One can tag each conversation with the id of the business object it is about, such as a contract number or a ticket id, and later reopen the latest conversation for that object.business_refis optional text. It is normalized to Unicode NFC, then surrounding whitespace is trimmed; an empty value means no reference. A value longer than 200 characters after normalization, or one containing control characters (C0 or C1), zero-width or other format characters, or the line and paragraph separators U+2028 and U+2029, is refused with422(invalid_business_reffor query parameters). The value is otherwise stored as given: it is not unique, not interpreted, and never passed to the model.- Filters and lookups match exactly and case-sensitively, after the same NFC normalization:
HT-1does not findht-1, while a reference sent in decomposed form finds the one stored in composed form. - A reference belongs to the conversation’s owner. Filters and lookups only ever consider the caller’s own conversations, and administrator lists and exports do not show it. The administrators’ full backup (
GET /api/admin/export/full-backup) leaves it out, so anything rebuilt from that backup has no references. The owner’s data export (GET /api/auth/me/export) includes it.
GET /api/conversations/latest orders by the newest message, falling back to the creation time, and considers active conversations unless status=archived is given. The list keeps its own order (starred first, then newest created).
Ratenbegrenzung
Die Ratenbegrenzung pro Schlüssel ist für eine zukünftige Version geplant. Derzeit gibt es keine durchgesetzten Anfragelimits pro Schlüssel, aber bitte nutzen Sie die API verantwortungsvoll.Pagination
List-Endpunkte unterstützen Pagination über Abfrageparameter:page(Standard: 1) — Seitennummer, beginnend bei 1size(Standard: 20) — Elemente pro Seite, max. 100
Zeitstempel
Alle Zeitstempel sind im ISO 8601-Format mit UTC-Zeitzone:Error Codes
Common error codes and their meanings:
Errors raised by the authentication layer for a bad
Authorization header (Invalid token, Token has expired, Invalid API key, API key is disabled) return 401 with error_code: null; rely on the status code and detail for those. Request validation failures return 422.
API-Spielplatz
Jede Endpunkt-Seite enthält einen interaktiven API-Spielplatz, in dem Sie:- Anfragen direkt von Ihrem Browser aus testen können
- Echte Antworten anzeigen können
- Anfrage-Code in mehreren Sprachen kopieren können
- Sich mit Ihrem API-Schlüssel authentifizieren können
Der API-Spielplatz führt Anfragen von Ihrem Browser aus aus, daher stellen Sie sicher, dass Ihr API-Schlüssel über entsprechende CORS-Berechtigungen verfügt (normalerweise standardmäßig für Same-Origin-Anfragen aktiviert).
SDK-Verfügbarkeit
Obwohl die FIM One API vollständig REST-basiert ist, sind SDKs in beliebten Sprachen verfügbar (oder in Kürze verfügbar):- Python: In Kürze verfügbar
- JavaScript/TypeScript: In Kürze verfügbar
- Go: In Kürze verfügbar
Versioning
The API carries the application version, reported byGET /api/version. Version is not included in the URL path; breaking changes will be signaled through major version bumps and a migration period.
Unterstützung
Bei API-Problemen oder Fragen:- Dokumentation: Siehe detaillierte Leitfäden zu jedem Endpunkt
- GitHub Issues: Melden Sie Fehler unter https://github.com/fim-ai/fim-one/issues
- Discord Community: Treten Sie unserer Community bei, um zu diskutieren