Skip to main content

Frequently asked questions

Short answers, each complete on its own. For the exact value to send as model, use the Models page; for today's price, each model's page on oceantoken.ai.

What is OceanToken?

OceanToken is one API and one prepaid balance for every leading AI model: text, image, video, speech, transcription, embedding and rerank models from OpenAI, Anthropic, Google, DeepSeek, Qwen, ByteDance and about 60 other publishers. You create one account, add credits, create an API key, and call any model with the same base URL and the same key. Every model's price, context window and capabilities are listed in the catalog before you call it.

Is OceanToken OpenAI-compatible? Which SDKs work?

Yes. The OceanToken API speaks the OpenAI API, so the official OpenAI SDKs for Python, TypeScript and other languages work after changing two values: the base URL to https://api.oceantoken.ai/v1 and the API key to your OceanToken key. Every chat model, Claude, GPT, Gemini and DeepSeek among them, also answers on the Anthropic Messages API at /v1/messages, so the Anthropic SDK works unchanged with the same two changes; it takes the base URL https://api.oceantoken.ai and adds /v1 itself. Chat completions, the Responses API, images, video, embeddings, speech, transcription and rerank all follow the same shapes.

Which AI models can I call through OceanToken?

The catalog holds nearly 400 models: language models (GPT, Claude, Gemini, DeepSeek, Qwen, GLM, Kimi, Grok, Mistral, Llama and more), image generation and editing models, video generation models, text-to-speech, speech-to-text, text embeddings, rerankers, and a few 3D generation and decision models. The Models page lists every one with its exact model ID, price per unit, context window and whether it supports reasoning, tool calling or image input. The list is rebuilt from the live service every time the documentation is published.

How much does OceanToken cost? Is there a platform fee?

You pay per use at the price shown for each model, in US dollars, from a prepaid balance; there is no subscription. Models are billed by usage, with no platform fee. When you top up, a processing fee of 2.9% + $0.30 of the total payment is added at checkout, the same for every payment method; it is not added to your balance. For example, $100 of credits costs $103.30. Language models are priced per 1 million input, cached input and output tokens (and cache writes, where a model charges for them); images per image, per megapixel or per image token; video per second, or per token on Seedance; speech per 1,000 characters, or by token on Gemini voices; transcription by audio length on most models and by token on a few; and rerank per search unit on Cohere and per token on other models. A model's price is the same at every hour of the day, and smart-router is billed at the price of the model it picks. Some models are tagged :free and cost nothing with limited throughput. Each model's page on oceantoken.ai shows its current price before you make a call.

Why is my Claude prompt not cached?

Claude caches a prompt only when the request asks for it. Mark the end of the repeated part with "cache_control": {"type": "ephemeral"} on a content block, on /v1/chat/completions or /v1/messages; from the next request on, that part is read from the cache and billed at the model's cached input price. GPT, DeepSeek, Qwen and GLM models cache on their own. A hit shows in usage: prompt_tokens_details.cached_tokens on chat completions, cache_read_input_tokens on /v1/messages. Claude caches only a prefix above a minimum length, 512 to 4,096 tokens depending on the model. The API reference has examples for both shapes.

How do I use OceanToken with Claude Code, Codex, Cursor or Gemini CLI?

Run one command in a terminal and sign in: npx -y @oceantoken/cli@latest connect codex (or claude-code, cursor, gemini, openclaw). It adds the OceanToken MCP server at https://mcp.oceantoken.ai/mcp and 3 skills to that agent, which can then search models, estimate costs and generate images, video and speech from your balance. An AI agent can also follow the instructions at https://mcp.oceantoken.ai/install on its own. The same API key works in any OpenAI-compatible tool by setting the base URL.

Does OceanToken generate images, video and speech, not just text?

Yes. Image models answer on /v1/images/generations and /v1/images/edits, video models on /v1/videos as asynchronous jobs you poll, text-to-speech on /v1/audio/speech, transcription on /v1/audio/transcriptions, embeddings on /v1/embeddings and rerankers on /v1/rerank. All of them use the same key and balance, and each request appears in the console's Logs with its cost and latency. Image and video download URLs stay valid for 24 hours, and video jobs accept an Idempotency-Key so a retry can never start and bill a second job.

Can I limit how much an API key can spend?

Yes. Each API key can carry its own credit limit, optionally resetting daily, weekly or monthly, plus an expiry date, so a key for a test project or a teammate cannot draw more than you allow from the shared balance; a key that has used its limit gets a 402 key_budget_exceeded error while the account may still have credits. The console shows every key's usage, and the Logs page lists each request with its model, tokens, cost and latency. Keys are shown once at creation and can be rotated with a 24-hour overlap.

How does billing and the prepaid balance work?

You add credits by card in the console: pick $5, $10, $25 or $50, or type your own amount. When you top up, a processing fee of 2.9% + $0.30 of the total payment is added at checkout, the same for every payment method; it is not added to your balance. Your first top-up also earns a bonus of 10% of the credit it buys, up to $100 (the rules are under First top-up bonus at https://docs.oceantoken.ai/get-started/add-credits#first-top-up-bonus ). Every request deducts its exact cost from that prepaid balance at the price listed for the model when the call is made, never retroactively. Purchased credits are valid for 12 months from purchase (Terms of Service, section 6), and there is no monthly minimum. While the balance is at or below $0 every request to a paid model is refused until you add credits (models whose ID ends in :free still work). Above $0, a request reserves the most it could cost before it runs and is refused with 400 request_exceeds_balance if that does not fit in what is left; long jobs such as video hold their estimated cost until they finish. Spend shows per day and per model on the Activity page. A request that fails is never charged.

Does OceanToken have volume discounts or tiers?

Yes. Your tier sets a discount off the official price on selected models, and it follows the money you have paid for credits: Tier 1 below $1,000, Tier 2 from $1,000 and Tier 3 from $10,000 in cumulative top-ups. Credit you were given does not count (starter credit, the first top-up bonus, trial codes, invite rewards), usage never lowers the total, and a tier you reach never goes down. An organization has its own tier from its own top-ups, and it prices every member's requests. Your tier and every discounted model are on the Account page of the console; the Models page shows prices with your discount already applied. Details: https://docs.oceantoken.ai/console/account#tier .

Is there a free tier on OceanToken?

Models whose ID ends in :free cost nothing to call, with limited and unguaranteed throughput; the Models page filters show them with a Free label. They work even at a $0 balance and calls to them do not reduce it, so you can test the API shape, SDK setup and agent integration without spending, then switch to a paid model by changing only the model ID. A new personal account also gets $1 of starter credit, valid for 14 days and given once per person, when it signs in with Google or GitHub or signs up with a common email provider. It works with any model, including image and video (up to 3 videos in 24 hours), as long as each request's worst-case cost fits in what is left; details at https://docs.oceantoken.ai/get-started/add-credits#free-credit .

What are OceanToken's rate limits and timeouts?

Rate limits are per API key, as requests per minute and tokens per minute, and responses carry the key's limits in the x-oceantoken-key-rpm-limit and x-oceantoken-key-tpm-limit headers; exceeding one returns 429 rate_limited with a Retry-After header. A synchronous request may run for at most 240 seconds so long text generations should use stream: true. Keep request bodies under 10 MB where you can, and send large files as URLs. Video generation runs as a job that takes minutes, so you poll /v1/videos/{video_id} instead of holding a connection open. Details are on the Limits page.

What happens if a model provider goes down?

Usually nothing you can see. Many models, including the current Claude and GPT models, have more than one official or authorized channel; when one fails, is at capacity or goes quiet, OceanToken retries the request and moves it to another channel of the same model, at the same price. It never answers with a different model unless you name backup models yourself with the fallbacks parameter, and an attempt that fails before producing output is not billed. Errors that any channel would return, such as a malformed request or a safety refusal, come back to you directly, and a stream that breaks after output has started can end with an error, so keep a retry with backoff for 429 and 5xx. The Retries and failover page has the details.