API Overview
Base URL
Section titled “Base URL”All API requests are made to:
https://api.getsieve.devAuthentication
Section titled “Authentication”Authenticate by including your API key in the request header. Sieve uses prefixed API keys:
mod_live_— Production keys. Calls are billed and routed through the full moderation pipeline.mod_test_— Test keys. Returns deterministic responses, makes no AI calls, and incurs no charges.
Authorization: Bearer mod_live_abc123...See Authentication for full details.
Rate Limits
Section titled “Rate Limits”Rate limits are enforced per API key and vary by plan:
| Plan | Rate Limit | Monthly Calls |
|---|---|---|
| Free | 10 req/sec | 10,000 |
| Indie ($29/mo) | 50 req/sec | 100,000 |
| Pro ($99/mo) | 200 req/sec | 1,000,000 |
When you exceed the rate limit, the API returns a 429 Too Many Requests response with a Retry-After header.
Test Mode
Section titled “Test Mode”Any request made with a mod_test_ key enters test mode:
- Returns deterministic responses based on known phrases and patterns
- Makes no downstream AI calls (OpenAI, Claude)
- Incurs no billing — test calls are not counted toward your quota
- Useful for integration testing, CI/CD pipelines, and local development
Response Format
Section titled “Response Format”All successful responses return JSON with a consistent structure:
{ "request_id": "req_abc123", "action": "allow", "flagged": false, "categories": { "toxicity": { "score": 0.02, "threshold": 0.7, "flagged": false }, "harassment": { "score": 0.01, "threshold": 0.7, "flagged": false } }, "pipeline_tier": 0, "latency_ms": 3}| Field | Type | Description |
|---|---|---|
request_id | string | Unique identifier for the request, useful for support and debugging. |
action | string | Recommended action: allow, flag, or block. |
flagged | boolean | true if any category exceeded its threshold. |
categories | object | Per-category scores, thresholds, and flags. |
pipeline_tier | integer | Which pipeline tier handled the request (0 = local, 1 = OpenAI, 2 = Claude). |
latency_ms | integer | Total processing time in milliseconds. |
Errors
Section titled “Errors”The API uses standard HTTP status codes. Error responses include a JSON body:
{ "error": { "code": "rate_limit_exceeded", "message": "Rate limit exceeded. Retry after 1 second.", "retry_after": 1 }}| Status | Meaning |
|---|---|
400 | Bad request — invalid or missing parameters. |
401 | Unauthorized — missing or invalid API key. |
429 | Rate limit exceeded. |
500 | Internal server error. |