---
title: "Create your own AI model API: your model id, any base model"
canonical: https://relayswitch.io/custom-models
generated: 2026-11-08T07:18:37.413Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

Custom models

# 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.

bash

1`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?"}]}'`

[Create a custom model](https://app.relayswitch.io/console/presets)[See the three steps](#define)

What it is

## 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.

Three steps

## 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

bash

1`# Define the model once: admin key or the console. API keys can only call it.`

2`curl -X PUT https://api.relayswitch.io/v1/presets/my-bot \`

3 `-H "Authorization: Bearer $ADMIN_KEY" \`

4 `-H "Content-Type: application/json" \`

5 `-d '{`

6 `"model": "claude-sonnet-5-5",`

7 `"models": ["gpt-5.5"],`

8 `"params": {"temperature": 0.4, "max_tokens": 2048},`

9 `"system_prompt": "You are Mira, the support assistant for Acme. Answer in two sentences.",`

10 `"system_prompt_mode": "prepend",`

11 `"description": "Acme support persona"`

12 `}'`

### 2\. Call it from any OpenAI SDK

python

1`from openai import OpenAI`

2`import os`

3

4`client = OpenAI(`

5 `base_url="https://api.relayswitch.io/v1",`

6 `api_key=os.environ["RELAYSWITCH_API_KEY"],`

7`)`

8

9`reply = client.chat.completions.create(`

10 `model="my-bot", # your model id; the prompt, defaults and fallbacks are already on it`

11 `messages=[{"role": "user", "content": "My order has not arrived."}],`

12`)`

13`print(reply.choices[0].message.content)`

14`print(reply.model) # the base model that answered, billed at its own price`

### 3\. It appears in every model picker

bash

1`curl https://api.relayswitch.io/v1/models -H "Authorization: Bearer $RELAYSWITCH_API_KEY"`

2`# ... {"id": "my-bot", "object": "model", ...} beside every catalog model,`

3`# so Cursor, SillyTavern, LibreChat and every other model picker show it.`

Calling 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. |

Price

## 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](https://relayswitch.io/models/claude-opus-5-5) | $2.80 | $10.00 |
| [DeepSeek V4.1 Flash 1017](https://relayswitch.io/models/deepseek-v4.1-flash-1017) | $0.25 | $1.20 |
| [GLM 5.3 Flash](https://relayswitch.io/models/glm-5.3-flash) | $0.09 | $0.15 |
| [GPT-6 Luna](https://relayswitch.io/models/gpt-6-luna) | $0.0625 | $0.20 |
| [Qwen3.8 Max](https://relayswitch.io/models/qwen3.8-max) | $0.80 | $2.40 |
| [Minimax M3.1 Flash](https://relayswitch.io/models/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.

Related

-   [Every model and price](https://relayswitch.io/models)
-   [The uncensored builds](https://relayswitch.io/uncensored)
-   [Fallbacks, presets and throughput routing](https://relayswitch.io/features/routing)
-   [Key budgets](https://relayswitch.io/features/key-budgets)
-   [OpenAI, Anthropic and Vercel AI SDK setup](https://relayswitch.io/guides/sdks)
-   [SillyTavern setup](https://relayswitch.io/guides/sillytavern)
-   [How pay as you go billing works](https://relayswitch.io/pricing)

FAQs

## Custom models: questions

Training, free tiers, prices and limits, answered plainly.

Open the console

A key in under a minute

[Get a key](https://app.relayswitch.io/console)

Or email [hello@relayswitch.io](mailto:hello@relayswitch.io)

### 

### 

### 

### 

### 

### 

### 

### 

### 

## 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.

[See the three steps](#define)[Create a custom model](https://app.relayswitch.io/console/presets)

