VrexAPI Docs

Authentication

Learn how to authenticate with the Vrex API using API keys and Bearer tokens.

API Keys

The Vrex API uses Bearer token authentication. Every request must include your API key in the Authorization header. Keys are prefixed with sk-.

Generate and manage your API keys from the API Keys dashboard. You can create multiple keys per account and revoke them individually at any time.

curl -X POST https://getvrex.com/api/v1/tts \
  -H "Authorization: Bearer sk-abc123..." \
  -H "Content-Type: application/json" \
  -d '{ "text": "Hello", "voice_id": "en-US-neural-1" }'

Keep your API key secret. Never expose it in client-side code or public repositories.

Rate Limiting

All API keys are limited to 10 requests per minute using a sliding window algorithm. Every response includes headers that tell you your current limit status:

HeaderDescription
X-RateLimit-LimitMax requests allowed per minute for your plan
X-RateLimit-RemainingRequests remaining in the current window
Retry-AfterSeconds to wait before retrying (only present on 429 responses)

429 — Rate Limited

When you exceed your rate limit, the API returns a 429 response. Wait for the number of seconds in Retry-After before retrying.

429Rate limit exceeded
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Retry after 12 seconds"
  }
}

Error Response Format

All API errors follow a consistent shape regardless of the error type. This makes it easy to handle errors uniformly across your application:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}

The code field is a stable machine-readable string. See the Error Codes reference for the full list.

API Documentation — Vrex