Eine Claude-Nachricht erstellen
Claude-Messages-API-kompatibler Endpunkt. Setzen Sie stream=true, um Nachrichten-Streaming-Ereignisse im Claude-Stil zu empfangen. Felder für Anfrage, Antwort und Validierungsfehler folgen dem Claude-Messages-Protokoll; der Router kann bei Infrastrukturfehlern zusätzlich ein bereinigtes Gateway-Fehler-Envelope zurückgeben.
- Typ: stringX
- Felo - Channel Geordnete, durch Kommas getrennte öffentliche Kanalcodes. Lassen Sie diesen Header weg, um default zu verwenden; default muss allein verwendet werden. Im Wallet-Modus durchsucht default die effektive öffentliche Kanalreihenfolge des Modells in umgekehrter Reihenfolge, überspringt nicht veröffentlichte oder nicht verfügbare Kanäle und wählt den Anbieter des ersten verfügbaren Kanals. Der Wert default schließt verfügbare Endpunkte dieses Anbieters mit derselben Upstream-Modell-ID und demselben Service-Tier ein. Explizite Kanäle werden in der vom Client angegebenen Reihenfolge validiert; nur die Anbietergruppe des ersten Kanals wird übermittelt. Kein automatischer Fallback auf andere Anbieter. Legacy-Anbieter-Header können das Kanal-Routing nicht überschreiben.
- Typ: integermax
_tokens min.:1erforderlichInteger numbers.
- Typ: array object[] · ClaudeMessage[] 1…messageserforderlich
- contenterforderlich
- Typ: string
- roleTyp: string enumerforderlichWerte
- user
- assistant
- propertyTyp: anything
Name
- Typ: stringmodelerforderlich
- Typ: objectmetadata
- propertyTyp: anything
Name
- Typ: string | nullservice
_tier Derzeit wird nur default (standard) unterstützt. Weggelassene Werte, null, Aliase und nicht unterstützte Zeichenfolgen fallen auf default zurück; andere Typen liefern HTTP 400. Konfigurierte Kanäle und Preise bleiben unverändert. Text-APIs senden den Standardwert des Anbieters; Decisions- und Generierungs-APIs lassen das Upstream-Feld weg.
- Typ: array string[]stop
_sequences - Typ: booleanstream
- system
- Typ: string
- Typ: numbertemperaturemin.:0max.:1
- Typ: objectthinking
- propertyTyp: anything
Name
- tool
_choice - Typ: string
- Typ: array object[]tools
- propertyTyp: anything
Name
- Typ: anythingproperty
Name
- Typ: integertop
_k min.:0Integer numbers.
- Typ: numbertop
_p min.:0max.:1 - Typ: anythingproperty
Name
- Typ: object · ClaudeMessageResponse200
Claude-Nachricht oder Streaming-Antwort
- Typ: array object[] · ClaudeContentBlock[]contenterforderlich
- typeTyp: string enumerforderlichWerte
- text
- image
- document
- tool
_use - tool
_result - thinking
- contentTyp: string | array
- idTyp: string
- inputTyp: object
- propertyTyp: anything
Name
- nameTyp: string
- sourceTyp: object
- propertyTyp: anything
Name
- textTyp: string
- propertyTyp: anything
Name
- Typ: stringiderforderlich
- Typ: stringmodelerforderlich
- roleKonstante:assistanterforderlich
- Typ: string | nullstop
_reason erforderlich - typeKonstante:messageerforderlich
- Typ: string | nullstop
_sequence - Typ: object · Usageusage
Nutzungsobjekt des Anbieters. Die Felder variieren je nach Endpunkt und Anbieter.
- propertyTyp: anything
Name
- Typ: anythingproperty
Name
- Typ: object · ClaudeErrorResponse400
Claude invalid_request_error oder Anfragevalidierungsfehler des Routers
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse401
Ungültiger oder fehlender Felo-API-Schlüssel
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse402
Unzureichendes Guthaben
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse403
Das Konto ist nicht berechtigt, das Modell zu verwenden. Deaktivierte Modelle werden ebenfalls vor Upstream-Aufrufen abgelehnt. Bereits angenommene Anfragen und Aufgaben werden fortgesetzt.
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse429
Ausgaben- oder Anfragelimit erreicht
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse502
Anfrage an den Upstream-Anbieter fehlgeschlagen
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json - Typ: object · ClaudeErrorResponse503
Anbieter- oder Abrechnungsdienst nicht verfügbar
Claude-Errors-API-kompatibles Fehler-Envelope für Messages-Anfragen.
- Typ: objecterrorerforderlich
- messageTyp: stringerforderlich
- typeTyp: stringerforderlich
- propertyTyp: anything
Name
- typeKonstante:errorerforderlich
- Typ: stringrequest
_id - Typ: anythingproperty
Name
application/json
curl https://openapi.felo.ai/api/v1/messages \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Write a one-sentence greeting."
}
],
"stream": false
}'
{
"id": "string",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "string",
"id": "string",
"name": "string",
"input": {
"additionalProperty": "anything"
},
"content": "string",
"source": {
"additionalProperty": "anything"
},
"additionalProperty": "anything"
}
],
"model": "string",
"stop_reason": null,
"stop_sequence": null,
"usage": {
"additionalProperty": "anything"
},
"additionalProperty": "anything"
}