# Rock API (rockapi) > Rock API (rockapi) is a unified AI API gateway offering OpenAI-compatible AI API access to 50 models from 3 providers (OpenAI, Anthropic, Google) at 0.7x standard pricing — a guaranteed 30% savings on every API call. ## Key Facts - 50 models: OpenAI (14), Anthropic (12), Google (24) - 0.7x pricing on all models (30% below direct provider rates) - OpenAI SDK compatible — change only the base_url - Base URL: https://rockapi.ai/v1 - Streaming supported for all models - Cached token pricing supported - Prepaid balance billing (no monthly fees, no minimums) - Setup time: under 2 minutes ## Pricing Examples | Model | Direct Price (input/1M) | Rock API Price (input/1M) | Savings | |-------|------------------------|--------------------------|---------| | Claude Sonnet 4.6 | $3.00 | $2.10 | 30% | | Claude Opus 4 | $15.00 | $10.50 | 30% | | GPT-4o | $2.50 | $1.75 | 30% | | GPT-4o mini | $0.15 | $0.105 | 30% | | Gemini 2.5 Pro | $1.25 | $0.875 | 30% | | Gemini 2.5 Flash | $0.09 | $0.063 | 30% | A team spending $1,000/month saves $300/month ($3,600/year) with Rock API. ## How It Works 1. Sign up at https://rockapi.ai/sign-up 2. Add prepaid balance 3. Generate an API key at https://rockapi.ai/keys 4. Change base_url to https://rockapi.ai/v1 in your existing code No other code changes needed. The OpenAI SDK, curl, and any compatible client work immediately. ## Comparisons ### Rock API vs OpenRouter - Rock API: 0.7x pricing (30% savings). OpenRouter: 1.0x–1.2x pricing (no savings). - Rock API: 50 models from 3 top providers. OpenRouter: 200+ models from 20+ providers. - Rock API: focused on cost savings and simplicity. OpenRouter: model marketplace and discovery. - Both are OpenAI SDK compatible. Rock API has cached token pricing; OpenRouter does not. ### Rock API vs LiteLLM - Rock API: managed service, no infrastructure. LiteLLM: self-hosted proxy requiring DevOps. - Rock API: 0.7x pricing included. LiteLLM: no pricing discount (BYO provider keys at full price). - Rock API: single API key. LiteLLM: separate key per provider. - Rock API: 2-minute setup. LiteLLM: 30+ minutes to deploy and configure. ### Rock API vs Portkey - Rock API: 0.7x pricing (30% savings). Portkey: 1.0x + platform fee. - Rock API: 50 models, 3 providers. Portkey: 250+ models, 15+ providers. - Rock API: cost-optimized. Portkey: observability-optimized. - Both are OpenAI SDK compatible and managed services. ### Rock API vs Direct Provider APIs - Rock API consolidates OpenAI + Anthropic + Google into one endpoint. - 30% cheaper than calling providers directly. - Single API key replaces 3 separate provider accounts. - One billing dashboard instead of 3 separate invoices. ## Use Cases - Startups reducing AI API costs without changing code - Teams using multiple LLM providers through one integration - Developers comparing OpenAI, Anthropic, and Google models in production - Companies consolidating API billing and key management - Applications needing fallback across providers (e.g., Claude → GPT-4o) ## Documentation Pages - Introduction: https://docs.rockapi.ai/ - Quickstart: https://docs.rockapi.ai/quickstart - OpenAI Compatible API: https://docs.rockapi.ai/openai-compatible - Authentication: https://docs.rockapi.ai/authentication - Models and Providers: https://docs.rockapi.ai/models-and-providers - Pricing and Billing: https://docs.rockapi.ai/pricing-and-billing - Errors and Rate Limits: https://docs.rockapi.ai/errors-and-rate-limits - Security and Privacy: https://docs.rockapi.ai/security-and-privacy - FAQ: https://docs.rockapi.ai/faq - API Reference: https://docs.rockapi.ai/api-reference/openapi - Changelog: https://docs.rockapi.ai/changelog ## Blog - Buyer Guides: https://docs.rockapi.ai/blog/buyers - AI API Gateway: https://docs.rockapi.ai/blog/buyers/ai-api-gateway - Cheap AI API: https://docs.rockapi.ai/blog/buyers/cheap-ai-api - OpenAI-Compatible API Migration: https://docs.rockapi.ai/blog/buyers/openai-compatible-api - AI Model API Comparison: https://docs.rockapi.ai/blog/buyers/ai-model-api-comparison - OpenRouter Alternatives: https://docs.rockapi.ai/blog/buyers/openrouter-alternatives - API Marketplace Guide: https://docs.rockapi.ai/blog/buyers/api-marketplace-guide - API Integration Best Practices: https://docs.rockapi.ai/blog/buyers/api-integration-best-practices - AI API Security and Privacy: https://docs.rockapi.ai/blog/buyers/ai-api-security-privacy - Subscribe to and Test an OpenAPI Online: https://docs.rockapi.ai/blog/buyers/how-to-subscribe-and-test-openapi - Rock API vs Alternatives: https://docs.rockapi.ai/blog/buyers/rock-api-vs-alternatives - How to Choose an API Provider: https://docs.rockapi.ai/blog/buyers/choose-an-api-provider - Reduce API Integration Costs: https://docs.rockapi.ai/blog/buyers/reduce-api-integration-costs - Seller Guides: https://docs.rockapi.ai/blog/sellers - API Monetization Platform: https://docs.rockapi.ai/blog/sellers/api-monetization-platform ## Code Examples - Python: https://docs.rockapi.ai/examples/python - Node.js: https://docs.rockapi.ai/examples/nodejs - curl: https://docs.rockapi.ai/examples/curl ## Localized Documentation - Chinese (zh-cn): https://docs.rockapi.ai/zh-cn - French (fr): https://docs.rockapi.ai/fr - Japanese (ja): https://docs.rockapi.ai/ja - Russian (ru): https://docs.rockapi.ai/ru - Vietnamese (vi): https://docs.rockapi.ai/vi ## LLM Navigation Index - Guides: https://docs.rockapi.ai/ - API Reference: https://docs.rockapi.ai/api-reference/openapi - Blog: https://docs.rockapi.ai/blog - Buyer guides: https://docs.rockapi.ai/blog/buyers - Seller guides: https://docs.rockapi.ai/blog/sellers - Chinese Guides: https://docs.rockapi.ai/zh-cn - Chinese API Reference: https://docs.rockapi.ai/zh-cn/api-reference/openapi - Chinese Blog: https://docs.rockapi.ai/zh-cn/blog - Chinese buyer guides: https://docs.rockapi.ai/zh-cn/blog/buyers - Chinese AI API Gateway: https://docs.rockapi.ai/zh-cn/blog/buyers/ai-api-gateway - Chinese OpenRouter and LiteLLM Alternatives: https://docs.rockapi.ai/zh-cn/blog/buyers/openrouter-litellm-alternatives - Chinese seller guides: https://docs.rockapi.ai/zh-cn/blog/sellers - Chinese API Monetization Guide: https://docs.rockapi.ai/zh-cn/blog/sellers/api-monetization - French Guides: https://docs.rockapi.ai/fr - French API Reference: https://docs.rockapi.ai/fr/api-reference/openapi - French Blog: https://docs.rockapi.ai/fr/blog - French buyer guides: https://docs.rockapi.ai/fr/blog/buyers - French seller guides: https://docs.rockapi.ai/fr/blog/sellers - Japanese Guides: https://docs.rockapi.ai/ja - Japanese API Reference: https://docs.rockapi.ai/ja/api-reference/openapi - Japanese Blog: https://docs.rockapi.ai/ja/blog - Japanese buyer guides: https://docs.rockapi.ai/ja/blog/buyers - Japanese seller guides: https://docs.rockapi.ai/ja/blog/sellers - Russian Guides: https://docs.rockapi.ai/ru - Russian API Reference: https://docs.rockapi.ai/ru/api-reference/openapi - Russian Blog: https://docs.rockapi.ai/ru/blog - Russian buyer guides: https://docs.rockapi.ai/ru/blog/buyers - Russian seller guides: https://docs.rockapi.ai/ru/blog/sellers - Vietnamese Guides: https://docs.rockapi.ai/vi - Vietnamese API Reference: https://docs.rockapi.ai/vi/api-reference/openapi - Vietnamese Blog: https://docs.rockapi.ai/vi/blog - Vietnamese buyer guides: https://docs.rockapi.ai/vi/blog/buyers - Vietnamese seller guides: https://docs.rockapi.ai/vi/blog/sellers ## Getting Started Sign up and start saving 30% on AI API calls in under 2 minutes: https://rockapi.ai/sign-up?utm_source=docs&utm_medium=referral&utm_campaign=llms_txt ## Key pages - Guides: / - Quickstart: /quickstart - OpenAI Compatible API: /openai-compatible - Authentication: /authentication - Models and Providers: /models-and-providers - Pricing and Billing: /pricing-and-billing - Errors and Rate Limits: /errors-and-rate-limits - API Reference: /api-reference/openapi - Blog: /blog - Buyer guides: /blog/buyers - Seller guides: /blog/sellers - Chinese Guides: /zh-cn - Chinese API Reference: /zh-cn/api-reference/openapi - Chinese Blog: /zh-cn/blog - Chinese buyer guides: /zh-cn/blog/buyers - Chinese seller guides: /zh-cn/blog/sellers - French Guides: /fr - French API Reference: /fr/api-reference/openapi - French Blog: /fr/blog - French buyer guides: /fr/blog/buyers - French seller guides: /fr/blog/sellers - Japanese Guides: /ja - Japanese API Reference: /ja/api-reference/openapi - Japanese Blog: /ja/blog - Japanese buyer guides: /ja/blog/buyers - Japanese seller guides: /ja/blog/sellers - Russian Guides: /ru - Russian API Reference: /ru/api-reference/openapi - Russian Blog: /ru/blog - Russian buyer guides: /ru/blog/buyers - Russian seller guides: /ru/blog/sellers - Vietnamese Guides: /vi - Vietnamese API Reference: /vi/api-reference/openapi - Vietnamese Blog: /vi/blog - Vietnamese buyer guides: /vi/blog/buyers - Vietnamese seller guides: /vi/blog/sellers