Quickstart
Get started with Creed Space in 5 minutes.
1. Get Your API Key
- Sign up or log in
- 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
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-sdkpython
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/sdkjavascript
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
}
}| Field | Type | Description |
|---|---|---|
risk_score | float | 0.0 (safe) to 1.0 (dangerous) |
decision | string | permit, forbid, divert, or depends |
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
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
- API Reference - Full endpoint documentation
- Error Handling - Handle errors gracefully
- Rate Limits - Understand your limits
- Best Practices - Integration tips
Try the API Playground
Test the API interactively at creed.space/playground.