AI Gateway for Production

One API.
Every AI Model.

Failover, rate limiting, webhooks, websockets, and structured data. Everything you need.

$ curl https://api.modelriver.com/v1/ai/async \
  -H "Authorization: Bearer YOUR_MR_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": "Explain AI"}],
    "workflow": "book_review"
  }'

Everything you need

Production-grade features built in

Auto Failover

Automatic provider switching when rate limits or errors occur. Zero downtime.

Rate Limiting

Per-user, per-IP, and per-project rate limiting. Protect your API from abuse.

Streaming

WebSocket live updates for real-time responses. Instant feedback as content generates.

Webhooks

Background jobs with automatic retry. Process AI requests asynchronously.

Structured Data

JSON schema validation for consistent outputs. Define once, enforce everywhere.

Analytics

Real-time dashboards with request logs, token usage, and performance metrics.

Integrate in seconds

One request. Infinite possibilities.

REQUEST
{
  "messages": [
    {
      "role": "user",
      "content": "Explain AI"
    }
  ],
  "workflow": "book_review",
  "task_id": "task_789",
  "user_id": "user_456"
}
IN PROGRESS
{
  "message": "success",
  "status": "IN_PROGRESS",
  "channel_id": "abc-123",
  "customer_data": {
    "task_id": "task_789",
    "user_id": "user_456"
  },
  "ws_token": "token-xyz",
  "websocket_url": "wss://..."
}
SUCCESS
{
  "message": "success",
  "status": "SUCCESS",
  "channel_id": "abc-123",
  "customer_data": {
    "task_id": "task_789",
    "user_id": "user_456"
  },
  "data": {
    "choices": [...]
  },
  "meta": {
    "workflow": "book_review",
    "duration_ms": 1234
  }
}

Start building today

1,000 free requests (total). No credit card required.

Get Early Access