Configure your API endpoint and key via environment variables — no code changes needed to integrate Nodebyt.
API Endpoints
Anthropic SDK (Claude Code etc.)
ANTHROPIC_BASE_URL=https://api.nodebyt.comOpenAI SDK / HTTP
base_url=https://api.nodebyt.com/v1Valid for the current terminal session only. Closes when the window closes. Good for quick testing.
# PowerShell (valid for current session only)
$env:ANTHROPIC_BASE_URL = "https://api.nodebyt.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-api-key"Valid for the current terminal session only. Closes when the window closes. Good for quick testing.
# bash / zsh (valid for current session only)
export ANTHROPIC_BASE_URL="https://api.nodebyt.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"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 / 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:
claudeOpenAI'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:
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 / zsh
export NODEBYT_API_KEY="sk-your-api-key"Then launch with:
codexUses the official Anthropic SDK — reads base_url and api_key automatically from environment variables.
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
Add stream: true to your request body to enable SSE streaming — ideal for real-time chat UIs.
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)/v1/* endpoints follow OpenAI's error format — responses contain type / code / message.
{
"error": {
"type": "invalid_request_error",
"code": "insufficient_quota",
"message": "余额不足"
}
}Common error codes
| HTTP | Message |
|---|---|
401 | API key is invalid or missing |
402 | Insufficient balance — please top up |
429 | Rate limited or daily quota exhausted |
503 | All upstream channels unavailable (circuit broken) |
Full model list and pricing on the pricing page — pay as you go, no subscription.
See all models and pricing →Nodebyt
The Unified Interface for AI Models
Company
Terms of Service
Privacy Policy
Contact
support@nodebyt.com
© 2026 Nodebyt. All rights reserved.