> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rockapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Answers to common questions about Rock API — pricing, OpenAI compatibility, models, providers, and how it compares to alternatives.

# FAQ

Answers to common questions about Rock API — pricing, OpenAI compatibility, models, providers, and how it compares to alternatives like OpenRouter, LiteLLM, and Portkey.

## What is Rock API?

Rock API is a unified AI API gateway that provides OpenAI-compatible access to **50 models** from **3 providers** (OpenAI, Anthropic, and Google) at **0.7x standard pricing** — a flat 30% discount on every API call. Instead of managing separate accounts, API keys, and billing with each provider, developers use one base URL (`https://rockapi.ai/v1`), one API key, and one prepaid balance to access all models.

## Are Rock API, RockAPI, rockapi, RockAI, and rock ai the same?

The official product name is **Rock API**, and the official dashboard domain is [rockapi.ai](https://rockapi.ai). Developers often search for the same platform with compact or lowercase spellings such as **RockAPI**, **rockapi**, and **rock api**. Some AI-related searches also use **RockAI** or **rock ai**; if you are looking for the OpenAI-compatible AI API gateway at `rockapi.ai`, you are in the right place. See [RockAPI (Rock API)](/rockapi) for the brand and domain overview.

## How does Rock API work?

Rock API sits between your application and the upstream model providers. When you send a request to `https://rockapi.ai/v1`, Rock API authenticates you, routes the request to the correct provider (OpenAI, Anthropic, or Google), and streams the response back. You are charged at 0.7x the provider's standard rate. Your application code stays identical to the OpenAI SDK format — only the `base_url` changes.

## What models does Rock API support?

Rock API supports **50 models** across three providers:

| Provider      | Models available | Examples                                           |
| ------------- | ---------------- | -------------------------------------------------- |
| **OpenAI**    | 14 models        | GPT-4o, GPT-4o mini, GPT-4.1, o3-mini              |
| **Anthropic** | 12 models        | Claude Opus 4, Claude Sonnet 4.6, Claude Haiku 3.5 |
| **Google**    | 24 models        | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 Flash |

All models are accessible through the same OpenAI-compatible API format. See [Models and Providers](/models-and-providers) for the full list.

## How much does Rock API cost?

Rock API charges **0.7x the standard provider price** for every model — a guaranteed 30% savings. There are no monthly fees, no minimum commitments, and no markup. You pay only for tokens consumed.

| Model             | Direct price (input/1M tokens) | Rock API price (input/1M tokens) |
| ----------------- | ------------------------------ | -------------------------------- |
| Claude Sonnet 4.6 | \$3.00                         | \$2.10                           |
| GPT-4o            | \$2.50                         | \$1.75                           |
| Gemini 2.5 Flash  | \$0.09                         | \$0.063                          |
| Claude Opus 4     | \$15.00                        | \$10.50                          |
| GPT-4o mini       | \$0.15                         | \$0.105                          |

A team spending $1,000/month on AI APIs saves $300/month (\$3,600/year) by switching to Rock API.

## Is Rock API compatible with the OpenAI SDK?

Yes. Rock API is a **drop-in replacement** for the OpenAI SDK. You change only the `base_url` parameter — all other code (messages, streaming, function calling, tool use) works identically. This applies to the Python SDK, Node.js SDK, curl, and any OpenAI-compatible client.

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://rockapi.ai/v1",
    api_key="your-rock-api-key",
)

response = client.chat.completions.create(
    model="claude-sonnet-4-20250514",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## How is Rock API different from OpenRouter?

Rock API and OpenRouter both provide unified AI API access, but they differ in pricing strategy and focus:

| Feature                  | Rock API                      | OpenRouter                       |
| ------------------------ | ----------------------------- | -------------------------------- |
| **Pricing**              | 0.7x (30% below standard)     | 1.0x–1.2x (at or above standard) |
| **Providers**            | 3 (OpenAI, Anthropic, Google) | 20+                              |
| **Total models**         | 50                            | 200+                             |
| **Focus**                | Cost savings + simplicity     | Model marketplace + discovery    |
| **Cached token pricing** | ✅ Yes                         | ❌ No                             |
| **Setup time**           | \< 2 minutes                  | \< 5 minutes                     |

Choose Rock API if you want guaranteed savings on the top-tier models you already use. Choose OpenRouter if you need access to niche or open-source models.

## How is Rock API different from LiteLLM?

LiteLLM is an open-source proxy that you self-host. Rock API is a managed service with built-in cost savings:

| Feature         | Rock API                           | LiteLLM                                         |
| --------------- | ---------------------------------- | ----------------------------------------------- |
| **Pricing**     | 0.7x (30% savings)                 | Free software + BYO provider keys (no discount) |
| **Hosting**     | Managed (no infrastructure)        | Self-hosted (you run the proxy)                 |
| **API keys**    | One Rock API key for all providers | Separate key per provider                       |
| **Setup**       | \< 2 minutes                       | 30+ minutes (deploy, configure, maintain)       |
| **Maintenance** | Zero                               | Ongoing (updates, monitoring, scaling)          |

Choose Rock API for instant savings without DevOps. Choose LiteLLM if you need full routing control inside your own VPC.

## Does Rock API support streaming?

Yes. Rock API supports **server-sent events (SSE) streaming** for all models, including OpenAI, Anthropic, and Google models. Set `stream: true` in your request and Rock API streams tokens as they are generated by the upstream provider. Streaming responses use the same OpenAI-compatible format (`data: [DONE]` termination).

## Does Rock API support cached tokens?

Yes. Rock API passes through **cached token pricing** from providers that support it (OpenAI and Anthropic). When a provider returns a cache hit, Rock API charges you the discounted cached-token rate at 0.7x — so you benefit from both the cache discount and Rock API's 30% savings. The `usage` object in the response includes `cached_tokens` when applicable.

## How do I get started with Rock API?

Getting started takes less than 2 minutes:

1. **Sign up** at [rockapi.ai/sign-up](https://rockapi.ai/sign-up?utm_source=docs\&utm_medium=referral\&utm_campaign=faq)
2. **Add balance** — prepaid, pay only for what you use
3. **Generate an API key** at [rockapi.ai/keys](https://rockapi.ai/keys)
4. **Update your code** — change `base_url` to `https://rockapi.ai/v1`

That's it. Your existing OpenAI SDK code works immediately with 50 models at 30% savings.

## What payment methods does Rock API accept?

Rock API uses a **prepaid balance** model. You add funds to your account before making API calls, and token costs are deducted from your balance in real time. This gives you full spending control with no surprise invoices. Balance top-ups are available through the dashboard at [rockapi.ai](https://rockapi.ai).

## What happens if my balance runs out?

If your prepaid balance reaches zero, API requests will return an error until you add more funds. Rock API does not allow negative balances or overage charges. You can monitor your balance and usage in real time through the dashboard, and set up low-balance alerts to avoid interruptions.

## Is my data secure with Rock API?

Rock API does **not** store or log your prompts or completions. Requests are forwarded to upstream providers in real time and responses are streamed back to you. Rock API retains only metadata for billing (token counts, model used, timestamp). See [Security and Privacy](/security-and-privacy) for full details.

***

<Card title="Start building" icon="rocket" href="https://rockapi.ai/sign-up?utm_source=docs&utm_medium=referral&utm_campaign=faq">
  Create an account, generate an API key, and start saving 30% on 50 AI models in under 2 minutes.
</Card>
