Deine erste Entscheidung integrieren
Übernimm Modell und Konfiguration aus dem Playground. Erstelle einen Key, kopiere den Code und prüfe den ersten Aufruf.
1. Modell auswählen
respan/span-012. API-Key erstellen
API-Key erstellen →10 Startguthabenpunkte · ein Guthaben für Web und API
3. Auf deinem Server ausführen
Setze DECISION_API_KEY in deiner Serverumgebung. Ersetze YOUR_API_KEY durch deinen Key. Nicht im Browsercode oder Repository speichern.
export DECISION_API_KEY="YOUR_API_KEY"
curl --fail-with-body 'https://decisionapi.org/v1/systemone' \
-H "Authorization: Bearer $DECISION_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"model": "respan/span-01",
"state": {
"input": [
{
"role": "user",
"content": "Please explain your refund policy."
}
],
"output": {
"role": "assistant",
"content": "You can request a refund within 30 days."
}
},
"questions": {
"helpful": {
"type": "noul",
"instructions": "Does the assistant answer the user question?",
"criteria": {
"true": "Answers the question",
"false": "Does not answer the question"
}
}
}
}'