Skip to main content
Developer Resources

API Documentation

Complete reference for integrating with Routeon. OpenAI-compatible endpoints with drop-in replacement support.

Quick Start

1from openai import OpenAI
2
3# Initialize client with Routeon base URL
4client = OpenAI(
5 base_url="https://api.routex.dev/v1",
6 api_key="sk-your-api-key"
7)
8
9# Create chat completion
10response = client.chat.completions.create(
11 model="gpt-4",
12 messages=[
13 {"role": "system", "content": "You are a helpful assistant."},
14 {"role": "user", "content": "Hello!"}
15 ],
16 temperature=0.7,
17 max_tokens=1024
18)
19
20print(response.choices[0].message.content)

User Guide

A step-by-step walkthrough for using Routeon as a developer or team.

01.Sign up for an account

Create your Routeon account, verify your email, and sign in to the developer console to begin.

Create Account

02.Create an API key

Go to API Keys in the console, create a key with a descriptive name, and store it securely in an environment variable.

API Key Security

03.Make your first API request

Use any OpenAI-compatible SDK or cURL by pointing the base URL to Routeon and including your API key.

Try the Playground

04.Monitor usage and logs

Visit the Usage dashboard to view request volume, token consumption, costs, and latency trends.

Usage & Logs

05.Recharge and set budgets

Add prepaid credits and configure budgets at tenant, project, or key level to control spending.

Rate Limits

Authentication

Routeon uses Bearer token authentication for API access. Include your API key in the Authorization header of every request.

Authorization: Bearer sk-your-api-key

Bearer Token

For API access from applications and services

Session

For browser-based access to management APIs

Service Status

Public gateway endpoints and health probes. All endpoints are versioned under /v1 and follow standard HTTP semantics.

Gateway API

Core chat completion, FIM, and message endpoints. OpenAI and Anthropic compatible.

Rate Limits

100
Free tier: 100 RPM
1,000
Pro tier: 1,000 RPM
Custom
Enterprise: Custom

Rate limits are enforced per API key. Check headers: X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset

Error Handling

400Bad Request
401Unauthorized
429Rate Limited
5xxServer Error
Error Response
1{
2 "error": {
3 "type": "invalid_request_error",
4 "message": "Detailed error description",
5 "code": "invalid_api_key"
6 }
7}

Ready to start building?

Sign up for a free account and get started with the API playground.