Send your first request

Evaluate a question using a provider’s HTTP endpoint.

1. Set the connection

Get the full evaluation URL, API key, and model identifier from your provider. DMP does not operate an inference service. Keep API keys in your server environment.

Terminal
1export DMP_ENDPOINT="https://YOUR_PROVIDER/v1/systemone"
2export DMP_API_KEY="YOUR_API_KEY"

Replace YOUR_PROVIDER and YOUR_API_KEY. The System One HTTP binding uses /v1/systemone; use your provider’s documented URL if it differs.

2. Define the decision

Save this as request.json. Replace example-model with an identifier your provider accepts.

request.json
1{
2  "model": "example-model",
3  "state": "The nightly export stopped at 02:14. New reports are missing.",
4  "questions": {
5    "result": {
6      "type": "choice",
7      "instructions": "Which team should investigate?",
8      "criteria": {
9        "operations": "Failed jobs, missing data, or service outages",
10        "accounts": "Access, invitations, or account settings",
11        "other": "Requests outside these categories"
12      }
13    }
14  }
15}

3. Send the request

1curl "$DMP_ENDPOINT" \
2  -H "Authorization: Bearer $DMP_API_KEY" \
3  -H "Content-Type: application/json" \
4  --data @request.json

The JavaScript example expects request to contain the parsed request.json body. Run it in a server environment with native fetch support. The Python example uses the standard library.

4. Read the answer

Look up answers.result using the question name you supplied. In this illustrative response, operations has the highest probability.

response.json
1{
2  "model": "example-model",
3  "answers": {
4    "result": {
5      "type": "choice",
6      "choice": "operations",
7      "probabilities": {
8        "operations": 0.92,
9        "accounts": 0.05,
10        "other": 0.03
11      },
12      "confidence": 0.88
13    }
14  }
15}
Decision Model ProtocolWorking draft · 0.1