Skip to main content
1

1. Get Your API Key

Go to routeway.ai and log in.
  1. Open the API Keys section.
  2. Click Create API Key.
  3. Copy your key and keep it secure (e.g. .env or secrets manager).
Never share your API key. Anyone with it can use your quota and access your account.
2

2. Set Your API Key

Store your API key as an environment variable.
  • Linux/macOS
  • Windows (Permanent)
  • Windows (Current Shell Only)
export Routeway_API_KEY="your_key_here"
3

3. Make Your First Request

  • Python (openai SDK)
  • cURL
  • NodeJS (openai SDK)
Install the OpenAI SDK:
pip install openai
Then use it:
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.routeway.ai/v1",
    api_key=os.getenv("Routeway_API_KEY")
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {"role": "user", "content": "Write a short story about a robot and a cat."}
    ]
)

print(response.choices[0].message.content)
I