Quickstart
Set a spend cap. Submit a run. Inspect the receipt.
The Decisionproof API turns AI runs into budget-bounded, auditable, settlement-safe operations. Every run reserves a spend cap upfront, captures a result artifact on success, and settles cost only against that receipt. The snippets below assume an active paid private beta subscription.
Prerequisites
- An active paid private beta subscription (see pricing)
- An API key — create one from your dashboard (format:
dpp_live_{key}; up to 3 keys per workspace during beta) - Any HTTP client: curl, Python requests, Node.js fetch, etc.
Base URL
https://api.decisionproof.io.kr
Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer dpp_live_your_key_here
Submit a run
The API is asynchronous:
- POST to
/v1/runs— receive202 Acceptedwith arun_id - Poll
/v1/runs/{run_id}untilstatusiscompletedorfailed - Download the result from
presigned_url
cURL
curl -X POST https://api.decisionproof.io.kr/v1/runs \
-H "Authorization: Bearer dpp_live_your_key_here" \
-H "Idempotency-Key: my-unique-key-123" \
-H "Content-Type: application/json" \
-d '{
"pack_type": "decision",
"inputs": {
"question": "Should we proceed with Plan A?",
"context": {"budget": 50000, "timeline": "Q2"}
},
"max_cost_usd": "0.0500"
}'
Python
import requests, time
response = requests.post(
"https://api.decisionproof.io.kr/v1/runs",
headers={
"Authorization": "Bearer dpp_live_your_key_here",
"Idempotency-Key": "my-unique-key-123",
"Content-Type": "application/json"
},
json={
"pack_type": "decision",
"inputs": {
"question": "Should we proceed with Plan A?",
"context": {"budget": 50000, "timeline": "Q2"}
},
"max_cost_usd": "0.0500"
}
)
assert response.status_code == 202
receipt = response.json()
run_id = receipt["run_id"]
poll_url = f"https://api.decisionproof.io.kr{receipt['poll']['href']}"
Node.js
const response = await fetch("https://api.decisionproof.io.kr/v1/runs", {
method: "POST",
headers: {
"Authorization": "Bearer dpp_live_your_key_here",
"Idempotency-Key": "my-unique-key-123",
"Content-Type": "application/json"
},
body: JSON.stringify({
pack_type: "decision",
inputs: { question: "Should we proceed with Plan A?" },
max_cost_usd: "0.0500"
})
});
if (response.status !== 202) throw new Error(`Expected 202, got ${response.status}`);
const receipt = await response.json();
const runId = receipt.run_id;
Response (202 Accepted):
{
"run_id": "run_abc123def456",
"status": "queued",
"poll": {
"href": "/v1/runs/run_abc123def456",
"recommended_interval_ms": 1500,
"max_wait_sec": 90
},
"reserved_usd": "0.0500"
}
The per-run cost cap during the paid private beta is US$5.00. Reserve what you expect; you'll be charged only the settled cost once the result artifact and its receipt metadata are captured.
Poll for status
Poll until status is completed or failed:
Python polling loop
while True:
time.sleep(1.5)
r = requests.get(poll_url, headers={"Authorization": "Bearer dpp_live_your_key_here"})
run = r.json()
if run["status"] in ("completed", "failed"):
break
if run["status"] == "completed":
print("Result URL:", run["output"]["presigned_url"])
Get results
When status is completed, the response includes
output.presigned_url — a short-lived S3 URL. Download it directly:
curl -o result.json "https://s3.amazonaws.com/..."
Error handling
All errors follow RFC 9457 Problem Details:
{
"type": "https://api.decisionproof.io.kr/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or expired API key."
}
Key status codes:
401— invalid or expired API key402— entitlement inactive (subscription expired or not active)422— invalid request body429— rate limit exceeded (Retry-Afterheader included)