Skip to content

Frequently Asked Questions

General

What is SandBase?

SandBase is an AI model gateway that provides unified access to multiple LLM providers (OpenAI, Anthropic, Google, DeepSeek, Meta, and more) through a single API. It also offers cloud sandbox environments for running AI agents and code execution.

Do I need a separate account with each provider?

No. SandBase handles all provider connections for you. You only need a SandBase API key (sk-sb-...) to access any supported model.

What's the difference between SandBase and using providers directly?

FeatureDirect ProviderSandBase
API keys neededOne per providerOne for all
Model switchingChange SDK/config per providerChange model name only
Fallback routingBuild yourselfAutomatic
Unified billingSeparate per providerSingle dashboard
Sandbox environmentsNot availableBuilt-in

Pricing & Billing

How does pricing work?

SandBase uses pay-as-you-go pricing. You purchase credits ($1 = 1 credit) and they're consumed based on token usage. Each model has its own per-token rate. See the Billing Guide for details.

Are there monthly fees or subscriptions?

No. There are no monthly fees, minimum commitments, or subscriptions. You only pay for the tokens you consume. Credits never expire.

How do I add credits?

Go to Dashboard → Billing → Add Credits. You can pay with credit card, Apple Pay, or Google Pay via Stripe. Credits are available immediately.

What happens when I run out of credits?

API requests return HTTP 402 (error type invalid_request_error, message insufficient balance). Top up your account to resume. In-flight streaming requests will complete normally.

Is there a free tier?

New accounts receive a small amount of free credits to try the service. After that, you'll need to add credits to continue.

Models

Which models are available?

SandBase supports 1400+ models including GPT-4o, GPT-4o Mini, o3, o3-mini, Claude Sonnet 4, Claude 3.5 Haiku, Gemini 2.5 Pro, Gemini 2.5 Flash, DeepSeek V3, DeepSeek Reasoner, Llama 4 Maverick, Qwen3-32B, and Seed 1.6. See the Models page for the full list.

Can I use Claude models through the OpenAI SDK?

Yes! That's one of SandBase's key features. Point the OpenAI SDK at SandBase and request any model:

python
from openai import OpenAI

client = OpenAI(base_url="https://api.sandbase.ai/v1", api_key="sk-sb-...")
response = client.chat.completions.create(
    model="claude-sonnet-4",  # Anthropic model via OpenAI SDK
    messages=[{"role": "user", "content": "Hello!"}]
)

How quickly do you add new models?

We typically add new models within 1-2 weeks of their public release. Popular models from major providers are prioritized.

What if a model I need isn't available?

Contact us at [email protected]. We regularly add models based on user demand.

Rate Limits

What are the rate limits?

Default limits for pay-as-you-go accounts: 500 requests/minute and 200,000 tokens/minute. See the Rate Limiting Guide for details.

How do I increase my rate limits?

Contact support for higher limits. Enterprise plans offer custom rate limits.

What happens when I hit a rate limit?

You receive HTTP 429. No Retry-After header is sent, so retry with client-side exponential backoff — the OpenAI and Anthropic SDKs do this automatically with their built-in retry logic.

SDK Compatibility

Which SDKs work with SandBase?

The official OpenAI SDK (Python and Node.js) and Anthropic SDK (Python and Node.js) work out of the box. Just change the base_url / baseURL to https://api.sandbase.ai/v1 (OpenAI) or https://api.sandbase.ai (Anthropic).

Do I need to install a custom SandBase SDK?

No. SandBase is fully compatible with existing SDKs. No custom package needed.

Does streaming work?

Yes. Both OpenAI-format streaming (/v1/chat/completions with stream: true) and Anthropic-format streaming (/v1/messages with stream: true) are fully supported.

Does function calling / tool use work?

Yes. Tools work with all models that support them. The request format is identical to what you'd send directly to OpenAI or Anthropic.

Does the Vercel AI SDK work?

Yes. Use createOpenAI from @ai-sdk/openai with SandBase's base URL. See the JavaScript SDK guide for examples.

Sandboxes

What is a sandbox?

A sandbox is an isolated cloud environment for running code, AI agents, or development tools. Think of it as an on-demand container with pre-installed software.

What templates are available?

7 templates: code_interpreter (Python), claude (Claude Code CLI), codex (OpenAI Codex), hermes (Nous Research self-improving agent), opencode, desktop (VNC GUI), and base (minimal). See Templates for details.

How long can a sandbox run?

Maximum lifetime is 1 hour. Default timeout (auto-shutdown on inactivity) is 300-600 seconds depending on the template. You can extend the timeout with keepalive calls.

Can I pause and resume sandboxes?

Yes. Pausing saves the sandbox state (files, environment) without consuming compute. Resume to continue where you left off. Paused time doesn't count toward the 1-hour lifetime.

How much does a sandbox cost?

Sandbox usage is billed per-second while in running state. Paused sandboxes are free. Pricing varies by template — check the dashboard for current rates.

Can I install custom software in a sandbox?

Yes, in any template. Use exec to run apt-get install or pip install. For the base template, you start with a minimal environment and install whatever you need.

Is there internet access in sandboxes?

Yes. All templates have outbound internet access by default. You can restrict network access via the API if needed.

Authentication

What format are API keys?

SandBase API keys start with sk-sb- followed by a random string. Example: sk-sb-abc123def456...

How do I authenticate requests?

Two methods:

  1. Authorization: Bearer sk-sb-your-key (OpenAI-compatible)
  2. x-api-key: sk-sb-your-key (Anthropic-compatible)

Both work on all endpoints.

Can I have multiple API keys?

Yes. Create multiple keys in Dashboard → API Keys. Each key has the same permissions but can be rotated independently.

How do I rotate an API key?

  1. Create a new key in the dashboard
  2. Update your application to use the new key
  3. Revoke the old key

There's no downtime — both keys work simultaneously until you revoke the old one.

Troubleshooting

I'm getting "model not found" errors

Check that you're using the correct model name. Common mistakes:

  • claude-3-sonnet → should be claude-sonnet-4
  • gpt4o → should be gpt-4o

See the Models page for exact model names.

I'm getting 401 Unauthorized

  • Verify your API key starts with sk-sb-
  • Check that the key hasn't been revoked
  • Ensure the header format is correct: Authorization: Bearer sk-sb-...

I'm getting 402 Insufficient Credits

Your account balance is zero. Add credits in Dashboard → Billing.

Streaming seems slow or choppy

  • Ensure your reverse proxy isn't buffering responses (disable proxy_buffering in nginx)
  • Check that you're not adding artificial delays in your client code
  • Some models (especially reasoning models like o3) have longer Time-To-First-Token

My sandbox timed out unexpectedly

Sandboxes auto-stop after the timeout period of inactivity. Use keepalive calls for long-running tasks, or increase the timeout when creating the sandbox.

Tool calls aren't working with a specific model

Not all models support tools. Check the Capabilities Matrix to verify your model supports the tools capability.