Quick Start

Documentation

Configure your API endpoint and key via environment variables — no code changes needed to integrate Nodebyt.

API Endpoints

Anthropic SDK (Claude Code etc.)

bash
ANTHROPIC_BASE_URL=https://api.nodebyt.com

OpenAI SDK / HTTP

bash
base_url=https://api.nodebyt.com/v1

Windows Setup

Valid for the current terminal session only. Closes when the window closes. Good for quick testing.

powershell
# PowerShell (valid for current session only)
$env:ANTHROPIC_BASE_URL = "https://api.nodebyt.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-api-key"

macOS / Linux Setup

Valid for the current terminal session only. Closes when the window closes. Good for quick testing.

bash
# bash / zsh (valid for current session only)
export ANTHROPIC_BASE_URL="https://api.nodebyt.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"

Claude Code CLI

Anthropic's official CLI — connect to Nodebyt via environment variables, no code changes needed.

Go to API Key Management to download a one-click setup script →

Or set the environment variables manually:

bash
# bash / zsh (valid for current session only)
export ANTHROPIC_BASE_URL="https://api.nodebyt.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"

Then launch with:

bash
claude

Codex CLI

OpenAI's official Codex CLI — uses the /v1/responses endpoint. Note: base_url must include /v1.

Go to API Key Management to download a one-click setup script →

Edit ~/.codex/config.toml:

toml
model_provider = "nodebyt"
model = "gpt-5.3-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.nodebyt]
name = "nodebyt"
base_url = "https://api.nodebyt.com/v1"
wire_api = "responses"
env_key = "NODEBYT_API_KEY"

Then set the API key as an environment variable:

bash
# bash / zsh
export NODEBYT_API_KEY="sk-your-api-key"

Then launch with:

bash
codex

Code Examples

Uses the official Anthropic SDK — reads base_url and api_key automatically from environment variables.

python
from anthropic import Anthropic

# Automatically reads ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN from env
client = Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(message.content[0].text)

Install:pip install anthropic

Streaming

Add stream: true to your request body to enable SSE streaming — ideal for real-time chat UIs.

python
from anthropic import Anthropic

client = Anthropic()

with client.messages.stream(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Write a haiku about Go."}],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

Error Handling

/v1/* endpoints follow OpenAI's error format — responses contain type / code / message.

json
{
  "error": {
    "type": "invalid_request_error",
    "code": "insufficient_quota",
    "message": "余额不足"
  }
}

Common error codes

HTTPMessage
401API key is invalid or missing
402Insufficient balance — please top up
429Rate limited or daily quota exhausted
503All upstream channels unavailable (circuit broken)

Available models

Full model list and pricing on the pricing page — pay as you go, no subscription.

See all models and pricing →
Nodebyt

Nodebyt

The Unified Interface for AI Models

Company

Terms of Service

Privacy Policy

Developer

Quick Start

api.nodebyt.com

Service Status

Contact

support@nodebyt.com

© 2026 Nodebyt. All rights reserved.