Create your own AI model API in a minute
Create your own AI model API without training anything: name a model, pick any base model in the catalog, give it a system prompt, defaults and fallbacks, and call it from any OpenAI SDK as model: "my-bot". Pay per token at the base model's live price, by card or in USDT, USDC, BTC, ETH, SOL. No KYC, no hosting, no subscription.
curl https://api.relayswitch.io/v1/chat/completions -H "Authorization: Bearer sk-relay-..." -H "Content-Type: application/json" -d '{"model": "my-bot", "messages": [{"role": "user", "content": "Hi, who are you?"}]}'A model id you own, on any model in the catalog
Six fields under one name. Change any of them and every client calling the name gets the change on its next request.
- A name you choose
- One to 64 characters: lower-case letters, digits, dots, dashes, underscores. It may not shadow a catalog model or an alias. This is the model id your code sends.
- Any base model
- Every chat model in the catalog, or one of your own aliases: a frontier model, a cheap fast one, or an uncensored build. Change it later and nothing in your code moves.
- Up to 5 fallbacks
- Tried in order when the base model fails or is overloaded. The answer names the model that replied.
- Default parameters
- temperature, top_p, max_tokens, stop and the rest, saved once. Any value the request carries wins over the saved one.
- A system prompt up to 32 KB
- The persona, the rules, the format. Mode prepend puts it ahead of the caller’s system prompt; mode replace makes it the only one.
- Tools, a description, versions
- Optional tool declarations sent with every call, a description for the model picker, and a saved version for every change. Up to 100 custom models per organization.
Define it, call it, pick it
One PUT from an admin key, or the Custom models page in the console. Then the name works everywhere the key works.
1. Define the model
# Define the model once: admin key or the console. API keys can only call it.curl -X PUT https://api.relayswitch.io/v1/presets/my-bot \ -H "Authorization: Bearer $ADMIN_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-5-5", "models": ["gpt-5.5"], "params": {"temperature": 0.4, "max_tokens": 2048}, "system_prompt": "You are Mira, the support assistant for Acme. Answer in two sentences.", "system_prompt_mode": "prepend", "description": "Acme support persona" }'2. Call it from any OpenAI SDK
from openai import OpenAIimport os client = OpenAI( base_url="https://api.relayswitch.io/v1", api_key=os.environ["RELAYSWITCH_API_KEY"],) reply = client.chat.completions.create( model="my-bot", # your model id; the prompt, defaults and fallbacks are already on it messages=[{"role": "user", "content": "My order has not arrived."}],)print(reply.choices[0].message.content)print(reply.model) # the base model that answered, billed at its own price3. It appears in every model picker
curl https://api.relayswitch.io/v1/models -H "Authorization: Bearer $RELAYSWITCH_API_KEY"# ... {"id": "my-bot", "object": "model", ...} beside every catalog model,# so Cursor, SillyTavern, LibreChat and every other model picker show it.Four ways to send the name
OpenAI Chat Completions, OpenAI Responses and the Anthropic Messages format all take it as the model.
| model | What it does |
|---|---|
my-bot | The bare name. Works in any client that lets you type a model id. |
@preset/my-bot | The explicit form, for a namespace that can never collide. |
@my-bot | The short form of the same. |
<model>@preset/my-bot | Keep the custom model’s prompt, defaults and fallbacks but answer with another base model for this one call. |
What your model costs: the base model’s price, nothing added
A custom model is billed at the live per-token price of the model that answered. Six bases from the catalog today.
| Base model | Input | Output |
|---|---|---|
| Claude Opus 5.5 | $2.80 | $10.00 |
| DeepSeek V4.1 Flash 1017 | $0.25 | $1.20 |
| GLM 5.3 Flash | $0.09 | $0.15 |
| GPT-6 Luna | $0.0625 | $0.20 |
| Qwen3.8 Max | $0.80 | $2.40 |
| Minimax M3.1 Flash | $0.105 | $0.42 |
USD per million tokens, read from the catalog at render. Every chat model in the catalog can be a base; prepaid balance from $10 by card or in USDT, USDC, BTC, ETH, SOL.
Custom models: questions
Training, free tiers, prices and limits, answered plainly.
Your model, your name, one key
Sign in with an email, top up from $10 by card or in USDT, USDC, BTC, ETH, SOL, define a model, call it. No KYC, no subscription.