API Documentation

Integrate RIDER prompt optimization directly into your applications via the REST API.
Ultra tier exclusive
Quick start
1
Get your API token

Log in to your dashboard and copy your Bearer token from account settings. API access requires an Ultra subscription.

2
Set the Authorization header

Include your token in every request:

Authorization: Bearer YOUR_API_TOKEN
3
Send your first request

POST your prompt to /optimize and receive the evolved prompt in the response.

Authentication

All API requests must include a valid Bearer token in the Authorization header. Tokens are obtained by logging in via POST /auth/login.

Access tokens expire after 30 minutes. Use the refresh token endpoint to obtain a new access token without re-authenticating.

Rate limits
Free
3 / day
Pro
50 / day
Ultra
Unlimited

When the limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header.

Endpoints
POST/optimize

Submit a prompt for optimization. RIDER automatically improves the prompt through multiple rounds of refinement to find the optimal version.

Parameters
  • mode: "blitz" (~20s), "standard" (~40s), "ultra" (~60s)
  • Models: openai/gpt-4.1-mini, google/gemini-2.5-flash, anthropic/claude-haiku-4.5
  • Max prompt length: 10,000 characters
Request body
json
{
  "prompt": "Summarize the following text in 3 bullet points",
  "mode": "standard",
  "model": "openai/gpt-4.1-mini"
}
Response
json
{
  "id": "a1b2c3d4-...",
  "status": "completed",
  "mode": "standard",
  "original_prompt": "Summarize the following text in 3 bullet points",
  "optimized_prompt": "You are a precise summarization engine. Given the text below, produce exactly 3 bullet points that capture the key insights. Each bullet must be a single sentence of no more than 20 words. Focus on actionable takeaways, not background context.",
  "fitness": 0.92,
  "improvement_pct": 34.7,
  "api_calls": 48,
  "model_used": "openai/gpt-4.1-mini",
  "error_message": null,
  "created_at": "2026-03-20T10:30:00Z",
  "completed_at": "2026-03-20T10:30:42Z"
}
Code examples
POST/optimize
cURL
curl -X POST https://api.riderapi.com/optimize \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Summarize the following text in 3 bullet points",
    "mode": "standard",
    "model": "openai/gpt-4.1-mini"
  }'
GET/optimize/history
cURL
curl https://api.riderapi.com/optimize/history?skip=0&limit=10 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Error codes
CodeStatusDescription
200OKRequest successful
202AcceptedOptimization started and completed synchronously
401UnauthorizedMissing or invalid Bearer token
403ForbiddenTier does not allow the requested mode
422Validation ErrorInvalid request body (missing fields, bad values)
429Too Many RequestsDaily rate limit exceeded. Check Retry-After header.
500Server ErrorInternal error during optimization
Unlock API access

API access is exclusive to Ultra tier subscribers. Get unlimited optimizations, priority processing, and full programmatic control.

Go Ultra