---
title: "New API upstream channel: this key behind your relay"
canonical: https://relayswitch.io/guides/new-api-upstream
generated: 2026-11-02T10:11:07.086Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

Checked 2026-10-31

# New API upstream channel on one key

A self-hosted New API or One API relay needs an upstream per model family. One RelaySwitch key is an upstream for 338 models at once: type OpenAI, one base URL, one key, the ids you sell, and a receipt on every request that passes through.

New API is “a self-hosted AI gateway for applications, agents, and teams” (its README, read 2026-10-31). Its quick start begins: “Add a channel with your upstream API key, available models, and group assignment; run a channel test.” This guide is that channel, with RelaySwitch as the upstream: the fields, a key scoped and capped for the relay alone, what the relay pays per request, and the one rule about reselling.

The same fields apply to One API and its forks, which New API grew out of.

## 01Before the channel: approval

Reselling needs written approval

A relay station hands model access to other people, which the [terms](https://relayswitch.io/terms) call resale: not allowed “unless Uplink Switch LLC has authorized you in writing”. Email [hello@relayswitch.io](mailto:hello@relayswitch.io) to apply; an approval names the account it covers. The [wholesale page](https://relayswitch.io/wholesale) is the reseller landing. Running New API for your own apps and team, where nobody outside receives a key, is not resale.

## 02The channel

In the New API console, open Channels (its docs: “Here you can manage NewAPI's upstream channels”) and add one:

text

1`Type: OpenAI`

2`Name: RelaySwitch`

3`Base URL: https://api.relayswitch.io/v1`

4`Key: sk-relay-...`

5`Models: claude-sonnet-5-5, claude-opus-5-5, gpt-5.5, gemini-3.5-flash, deepseek-v4-pro, glm-5.3`

6`Model mapping: {"claude-sonnet-4-5": "claude-sonnet-5-5", "gpt-4o": "gpt-5.5"}`

7`Group: default`

-   **Type**: OpenAI. Every id here answers the OpenAI chat completions format, the Claude ids included, so one OpenAI-type channel carries the whole list.
-   **Base URL**: `https://api.relayswitch.io/v1`. New API builds the request path from the base; the gateway answers both `/v1/chat/completions` and a doubled `/v1/v1/chat/completions` (checked 2026-10-31), so the URL works with or without the `/v1`. The channel test tells you at once.
-   **Key**: the upstream key from the next section, not your main key.
-   **Models**: the ids you sell, as the Models page prints them. A customer request for an id not in this list is refused by New API before it reaches the upstream.
-   **Model mapping**: the name a customer sends on the left, the catalog id it becomes on the right. Use it to keep an old name alive, or to sell one id under your own label.

Run the channel test. New API's README lists priorities, weights, retries, channel affinity and multiple upstream keys under routing; a second channel on another upstream with a lower priority is the usual failover shape. This key fails over inside itself too: a request that fails upstream is retried on another route at the same price, and a failed request is not charged.

## 03A key for the relay alone, with a cap

Give the relay its own key. The key carries an allowed-model list, so the channel can only call what you sell; a monthly cap and a budget, so a runaway customer stops at a number you chose; and its own rate limits. In the [console](https://app.relayswitch.io/console), open Keys, create `new-api-upstream`, tick the models and set the cap. Or by API with an admin key:

bash

1`# $ADMIN_KEY is an admin key, created once in the console (Keys, "Admin key").`

2`curl https://api.relayswitch.io/v1/keys \`

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

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

5 `-d '{"name": "new-api-upstream", "budget_usd": 20, "rpm": 60, "monthly_cap_usd": 100,`

6 `"allowed_models": ["claude-sonnet-5-5", "claude-opus-5-5", "gpt-5.5"]}'`

7

8`# 201: the full key, once, with its record.`

9`# {"key": "sk-relay-...", "data": {"id": "k7m2...", "budget_micro": 20000000,`

10`# "budget_spent_micro": 0, "budget_remaining_micro": 20000000, ...}}`

At its budget or monthly cap the key answers `402` and every other key on the account keeps running. New API shows the 402 on the channel; top up or raise the cap and the channel resumes. The key API's fields are in the [docs](https://relayswitch.io/docs#key-api).

## 04What the relay pays

Prices per million tokens, read from the live catalog when this page was built, next to the developer's list where the catalog has one. The last column is one request of 2,000 tokens in and 500 out.

| Model | Input | Output | List in / out | One request |
| --- | --- | --- | --- | --- |
| [Claude Sonnet 5.5](https://relayswitch.io/models/claude-sonnet-5-5) | $1.20 | $3.00 | $2.00 / $10.00 | $0.0039 |
| [Claude Opus 5.5](https://relayswitch.io/models/claude-opus-5-5) | $2.80 | $10.00 | $4.00 / $20.00 | $0.0106 |
| [GPT-5.5](https://relayswitch.io/models/gpt-5.5) | $1.80 | $9.00 | $5.00 / $30.00 | $0.0081 |
| [Gemini 3.5 Flash](https://relayswitch.io/models/gemini-3.5-flash) | $1.50 | $9.00 | $1.50 / $9.00 | $0.0075 |
| [DeepSeek V4 Pro 0423](https://relayswitch.io/models/deepseek-v4-pro) | $0.792 | $2.376 | $1.32 / $3.96 | $0.0028 |
| [GLM 5.3](https://relayswitch.io/models/glm-5.3) | $0.3276 | $1.0296 | $1.092 / $3.432 | $0.0012 |

USD, read from the RelaySwitch catalog at build time. What you charge your customers is set in New API's own pricing; this is the upstream cost.

2,000 requests a day of that size on Claude Sonnet 5.5 cost the relay $7.80 a day upstream. Larger top-ups add credit: $200 and over +5%, $500 and over +10%, $1,000 and over +15%, by card and crypto alike (USDT, USDC, BTC, ETH, SOL). Volume beyond that is priced on request through the wholesale page.

## 05A receipt per request

Every request that passes through the channel has a signed receipt with the model, the billed tokens and the charge in USD. The request id is in the response headers; New API's log keeps its own record, and the receipt is the one the upstream signs. Verify it on the [Verify page](https://relayswitch.io/statements/verify).

bash

1`curl https://api.relayswitch.io/v1/requests/REQUEST_ID/receipt \`

2 `-H "Authorization: Bearer $RELAYSWITCH_API_KEY"`

The daily real-model check is public at [https://api.relayswitch.io/v1/proof](https://api.relayswitch.io/v1/proof): 305 of 339 models answered today's canary unchanged (read 2026-11-02T09:48 UTC). A relay operator can point a customer at it instead of arguing about which model is behind an id.

## 06Check it

From the server that runs New API, with the upstream key:

bash

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

bash

1`curl -i https://api.relayswitch.io/v1/chat/completions \`

2 `-H "Authorization: Bearer sk-relay-..." \`

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

4 `-d '{"model": "claude-sonnet-5-5", "messages": [{"role": "user", "content": "Say ok."}]}'`

Both answer and the channel test does not: the base URL has a typo, the key in the channel is not the upstream key, or a model in the channel's list is not in the catalog. An Anthropic-type channel is not needed: the 2 Claude ids above answer the OpenAI format on the same channel.

## 07Sources

The channel description and the routing features are from New API's [README](https://github.com/QuantumNous/new-api) and its [Channels](https://docs.newapi.ai/en/docs/guide/console/channel-management) doc, read 2026-10-31; the doc shows the channel form as screenshots, so the field labels above follow the form as it appears there. Key fields are from the live OpenAPI document; prices from the live catalog at build time.

## Questions

Can I use this key as the upstream for a One API or New API station?

Yes, with written approval for resale: email hello@relayswitch.io, per the terms and the wholesale page. Then one OpenAI-type channel with base URL https://api.relayswitch.io/v1, the upstream key and the ids you sell carries every model on the key.

Which channel type do I pick for the Claude models?

OpenAI. The Claude ids answer the OpenAI chat completions format here, so they sit on the same channel as GPT, Gemini and the open models. An Anthropic-type channel pointed at the same base URL also works for the ids that answer the Messages format, but it is a second channel to maintain.

How do I stop one customer draining the upstream balance?

Two layers: New API’s own per-token quotas and groups on the customer side, and the upstream key’s budget, monthly cap and rate limits on this side. The upstream key answers 402 at its cap while the rest of the account keeps running.

Does the base URL need /v1?

Paste https://api.relayswitch.io/v1. The gateway answers the path New API builds whether it appends /v1/chat/completions to the origin or /chat/completions to a /v1 base (both checked 2026-10-31); the channel test confirms it.

What does the relay pay per request?

The upstream price in the table, per token, from a prepaid balance that starts at $10; larger top-ups add credit ($200 and over +5%, $500 and over +10%, $1,000 and over +15%). What you charge downstream is yours to set in New API.

Related

-   [All guides](https://relayswitch.io/guides)
-   [Wholesale](https://relayswitch.io/wholesale)
-   [The key API](https://relayswitch.io/docs#key-api)
-   [The daily check](https://relayswitch.io/proof)
-   [LiteLLM](https://relayswitch.io/guides/litellm)
-   [Models and prices](https://relayswitch.io/models)
-   [How pricing works](https://relayswitch.io/pricing)
-   [Pay by card or crypto](https://relayswitch.io/pay-with-crypto)
-   [Docs](https://relayswitch.io/docs)

## One upstream for the whole relay

Prepaid from $10 by card or crypto, bonus credit on larger top-ups. Approval first, then a capped key per station.

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

