Quickstart
One API key, one POST, one decision. Here is the shortest path.
1. Get Your API Key
- Sign in or create an account (the sign-in window has a Create one link for new accounts)
- Go to Dashboard → API Keys
- Click Create New Key
- Copy and save your key (you won't see it again!)
Important
Store your API key securely. Never commit it to version control or expose it in client-side code.
2. Make Your First Request
Using cURL
curl -X POST "https://api.creed.space/api/v1/safety/evaluate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_text": "Hello, how are you?"}'Using Python
This endpoint has no SDK method, so call the REST API directly. The creed-sdk package covers tool-call decisions instead (see Python SDK). The SDK documented there is 3.1, which is not published: pip install creed-sdk installs 1.0.0 from PyPI.
import requests
response = requests.post(
"https://api.creed.space/api/v1/safety/evaluate",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={"input_text": "Hello, how are you?"},
)
result = response.json()
print(f"Risk score: {result['evaluation']['risk_score']}")
print(f"Decision: {result['evaluation']['decision']}")Using JavaScript/TypeScript
This endpoint has no SDK method, so call the REST API directly. The @creedspace/sdk package covers tool-call decisions instead (see JavaScript SDK). The SDK documented there is 3.1, which is not published: npm install @creedspace/sdk installs 1.0.0 from npm.
const response = await fetch(
'https://api.creed.space/api/v1/safety/evaluate',
{
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ input_text: 'Hello, how are you?' }),
}
);
const result = await response.json();
console.log(`Risk score: ${result.evaluation.risk_score}`);
console.log(`Decision: ${result.evaluation.decision}`);3. Understand the Response
{
"status": "success",
"evaluation": {
"risk_score": 0.05,
"decision": "allow",
"is_blocked": false,
"matched_rules": [],
"decision_time_ms": 12.5
}
}| Field | Type | Description |
|---|---|---|
risk_score | float | 0.0 (safe) to 1.0 (dangerous) |
decision | string | allow, modify, block, or escalate |
is_blocked | boolean | Whether content should be blocked |
matched_rules | array | Safety rules that matched |
decision_time_ms | float | Processing time in milliseconds |
4. Handle Decisions
Continuing the REST example from step 2:
body = response.json()
result = body["evaluation"]
# When the text matches common distress phrases, the response includes a
# crisis_support block (a message plus helplines), whatever the decision.
support = body.get("crisis_support")
if support:
show_support(support["message"], support["resources"])
if result["decision"] == "allow":
# Safe to proceed
process_message(user_message)
elif result["decision"] == "block":
# Withhold the content without accusing the user: block is a risk signal,
# not proof of wrongdoing, and ordinary first-person messages can be blocked.
return (
"We couldn't process this message. If you're going through something "
"difficult, please reach out to someone you trust or a local support line."
)
elif result["decision"] == "escalate":
# Route to human review
queue_for_review(user_message)
else:
# modify: potentially sensitive, so review or sanitise before use
handle_with_context(user_message, result)Block and escalate are not verdicts on the person
block and escalate are risk signals, not findings that someone broke a policy. The evaluator scores agent-dysfunction patterns, and it can block ordinary first-person statements ("I feel...", "I need..."), including someone describing their own distress. If you serve the public, show a neutral message and support resources, never a violation notice.
The evaluator is not a self-harm or crisis detector, so don't rely on it to find people at risk. When a response includes a crisis_support block, show its message and resources to the person. Wherever someone may be struggling, useful signposts are the 988 Suicide & Crisis Lifeline (call or text 988, US), Samaritans (116 123, UK and Ireland) and findahelpline.com (other countries).
Next Steps
- API Reference - Full endpoint documentation
- Error Handling - RFC 7807 error format, retry strategies, circuit breakers
- Rate Limits - Default: 100 req/min per route, no daily cap
- Best Practices - Caching, retries, circuit breakers, middleware patterns
Try the API Playground
Test the API interactively at creed.space/playground.