Skip to content

Quickstart ​

One API key, one POST, one decision. Here is the shortest path.

1. Get Your API Key ​

  1. Sign in or create an account (the sign-in window has a Create one link for new accounts)
  2. Go to Dashboard → API Keys
  3. Click Create New Key
  4. 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 ​

bash
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.

python
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.

javascript
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 ​

json
{
  "status": "success",
  "evaluation": {
    "risk_score": 0.05,
    "decision": "allow",
    "is_blocked": false,
    "matched_rules": [],
    "decision_time_ms": 12.5
  }
}
FieldTypeDescription
risk_scorefloat0.0 (safe) to 1.0 (dangerous)
decisionstringallow, modify, block, or escalate
is_blockedbooleanWhether content should be blocked
matched_rulesarraySafety rules that matched
decision_time_msfloatProcessing time in milliseconds

4. Handle Decisions ​

Continuing the REST example from step 2:

python
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 ​

Try the API Playground ​

Test the API interactively at creed.space/playground.

Creed Space API documentation. Privacy, Terms and Compliance live on creed.space.