Endpoint
POST /api/v1/straico/chat/completions
Beispiel-Request
curl -X POST -H "X-API-Key: dein-api-hub-key" -H "Content-Type: application/json" -d '{"model":"meta-llama/llama-4-maverick","messages":[{"role":"user","content":"Schreibe eine kurze Zusammenfassung."}]}' https://cyber.zap.cloud/api/v1/straico/chat/completions?version=2
Beispiel-Response
{"ok":true,"data":{"choices":[{"message":{"role":"assistant","content":"..."}}],"usage":{"total_tokens":123}},"meta":{"upstream":"straico","upstream_status":200}}
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
version |
string | nein | Bei Models: 0, 1 oder 2. Bei Chat: 0, 1 oder 2. Bei Prompt/Image je nach Endpoint 0 oder 1. |
model / models |
string / array | je nach Endpoint | Ein Modell oder bis zu vier Modelle bei Multi-Model-Endpunkten. |
smart_llm_selector |
string / object | nein | Automatische Modellwahl mit quality, balance oder budget. |
messages |
array | bei Chat ja | Chat-Verlauf im OpenAI-kompatiblen Format. |
prompt |
string | bei Prompt/RAG/Agent ja | Textanfrage an Modell, RAG oder Agent. |
file / files |
file | bei Upload/RAG ja | Dateiupload per multipart/form-data. |
Weitere Endpunkte
| Methode | Pfad | Zweck |
|---|---|---|
GET |
/api/v1/straico/user |
Kontoinformationen wie Name, Coins und Plan. |
GET |
/api/v1/straico/models?version=2 |
Modellliste. v2 liefert OpenAI-kompatible Modelldaten. |
GET |
/api/v1/straico/models/{model_id} |
Details zu einem einzelnen v2-Modell. |
POST |
/api/v1/straico/prompt/completion?version=1 |
Prompt-Completion, optional mit mehreren Modellen. |
POST |
/api/v1/straico/chat/completions?version=2 |
OpenAI-kompatible Chat-Completion. |
POST |
/api/v1/straico/file/upload |
Datei-Upload für Prompt/RAG-Workflows. |
POST |
/api/v1/straico/image/generation?version=1 |
Bildgenerierung. |
POST |
/api/v1/straico/image/tovideo |
Videoerzeugung aus Bild und Beschreibung. |
GET |
/api/v1/straico/tts/voices |
Verfügbare ElevenLabs-Stimmen abrufen. |
POST |
/api/v1/straico/tts/create |
Text-to-Speech erzeugen. |
GET |
/api/v1/straico/agents |
Agents auflisten. |
POST |
/api/v1/straico/agent |
Agent erstellen. |
GET/PUT/DELETE |
/api/v1/straico/agent/{agent_id} |
Agent lesen, ändern oder löschen. |
POST |
/api/v1/straico/agent/{agent_id}/rag |
RAG mit Agent verbinden. |
POST |
/api/v1/straico/agent/{agent_id}/prompt |
Agent mit Prompt ausführen. |
GET |
/api/v1/straico/rags |
RAG-Basen auflisten. |
POST |
/api/v1/straico/rag |
RAG mit Dateien erstellen. |
GET/PUT/DELETE |
/api/v1/straico/rag/{rag_id} |
RAG lesen, erweitern oder löschen. |
POST |
/api/v1/straico/rag/{rag_id}/prompt |
Prompt gegen eine RAG-Basis ausführen. |