Skip to content

Quickstart

Get started with Creed Space in 5 minutes.

1. Get Your API Key

  1. Sign up or log in
  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

bash
pip install creed-sdk
python
from creed_sdk import CreedSpace

client = CreedSpace(api_key="YOUR_API_KEY")
result = client.safety.evaluate("Hello, how are you?")

print(f"Risk score: {result.risk_score}")
print(f"Decision: {result.decision}")

Using JavaScript/TypeScript

bash
npm install @creed-space/sdk
javascript
import { CreedSpace } from '@creed-space/sdk';

const client = new CreedSpace({ apiKey: 'YOUR_API_KEY' });
const result = await client.safety.evaluate('Hello, how are you?');

console.log(`Risk score: ${result.riskScore}`);
console.log(`Decision: ${result.decision}`);

3. Understand the Response

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

4. Handle Decisions

python
result = client.safety.evaluate(user_message)

if result.decision == "permit":
    # Safe to proceed
    process_message(user_message)
elif result.decision == "forbid":
    # Block the content
    return "This message violates our content policy."
elif result.decision == "divert":
    # Route to human review
    queue_for_review(user_message)
else:  # "depends"
    # Requires additional context
    handle_with_context(user_message, result)

Next Steps

Try the API Playground

Test the API interactively at creed.space/playground.

Constitutional AI for Safer Interactions