Connect your first decision

Keep your model and configuration from the playground. Create a key, copy the code, and check your first call.

1. Choose a model

respan/span-01

2. Create an API key

Create API key →

100 welcome credits · one balance for web & API

3. Run from your server

Set DECISION_API_KEY in your server environment. Replace YOUR_API_KEY with your key; keep it out of browser code and version control.

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"
      }
    }
  }
}'