thelastapi
Get started free

Do you need separate accounts for OpenAI, Anthropic and Google?

No: an OpenAI-compatible gateway lets you call OpenAI, Anthropic, Google and over 400 models with one account, one key and unified billing.

On this page 7 sections

No, you do not need separate accounts for OpenAI, Anthropic and Google to build with their models. Using thelastapi, you can access GPT-6, Claude Sonnet 5.5, Gemini 3.8 Flash, and hundreds of other language models through a single account, one prepaid balance, and one OpenAI-compatible API key. You configure one base URL in your SDK of choice and specify whichever lab's model you want to execute.

Managing separate vendor accounts introduces unnecessary complexity to production codebases. Here is how running multi-lab AI through a unified gateway works, how billing and spend controls behave, and the code required to run it.

The operational friction of separate lab accounts

Calling models directly from each individual lab requires setting up three separate provider accounts, handling three credit cards, and provisioning distinct credentials for every development, staging, and production environment.

That setup causes three distinct problems:

  1. Fragmented billing: Keeping track of monthly spending means exporting invoices from three separate dashboards with three separate credit balances.
  2. Credential proliferation: Your local development environments, continuous integration pipelines, and production servers each need a dedicated secret for OpenAI, Anthropic, and Google. Rotating those keys or managing permissions across teams becomes a chore.
  3. Incompatible SDKs and interfaces: Each vendor ships its own client library with distinct parameter names, response envelopes, error structures, and streaming protocols. Shifting a feature from Claude to GPT often turns into an SDK migration rather than a simple configuration change.

A unified entry point resolves this by routing requests through a single OpenAI-compatible interface under /v1/ai.

How a unified AI gateway works

Instead of installing three vendor libraries, you use the standard OpenAI client or plain HTTP requests pointed at VIBIZ_AI_BASE_URL. You pass an API key created through thelastapi and specify the model name directly in the request body.

The gateway supports two ways of targeting a model:

1. Unified tier aliases

thelastapi maintains curated model aliases mapped to specific models. Each tier targets one named lab model, which is returned in the served_model response property:

thelastapi aliasUnderlying lab modelBest suited forPrice per million tokens (input / output)
vibiz/fastGPT-6 Luna (OpenAI)Chat, tool calls, structured JSON$0.10 / $0.50
vibiz/liteDeepSeek V4.1 FlashCost-sensitive tasks (1M context)$0.14 / $0.42
vibiz/smart-miniClaude Haiku 5.5 (Anthropic)Fast coding and text drafting$0.10 / $0.50
vibiz/balancedGemini 3.8 Flash (Google)High context tasks (1M context)$0.825 / $4.125
vibiz/reasoningGPT-6.1 Terra (OpenAI)Planning, mathematics, logic$1.00 / $5.00
vibiz/smartClaude Sonnet 5.5 (Anthropic)Complex coding, long agent runs$2.00 / $10.00
vibiz/proClaude Opus 5.5 (Anthropic)Advanced analysis and evaluation$4.00 / $20.00

2. Lab model IDs

If you prefer not to use tier aliases, you can invoke any of the 400+ supported models directly using its full provider identifier, such as anthropic/claude-opus-5.5 or moonshotai/kimi-k3.1-pro. You can search all available models and their current pricing from your terminal:

Terminal
vibiz ai models --all

Crucially, the gateway never performs silent fallbacks. If Anthropic or Google experiences an outage or your target model is unavailable, the API returns a 503 status with model_unavailable or provider_unavailable alongside a retry recommendation. It will never quietly route your request to a different model family behind your back.

One SDK setup for all three labs

Because the gateway adheres to the OpenAI specification, you do not need third-party SDKs to connect to Anthropic or Google models.

Initialize your project and provision the AI resource:

Terminal
vibiz init "My Multi-Model App" --resources ai
vibiz dev

Running vibiz dev writes the development keys directly to .env.development.local. This injects VIBIZ_AI_BASE_URL and VIBIZ_AI_API_KEY, as well as standard aliases OPENAI_BASE_URL and OPENAI_API_KEY.

In TypeScript or Node.js, you instantiate the official openai SDK once:

TypeScript
import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: process.env.VIBIZ_AI_BASE_URL,
  apiKey: process.env.VIBIZ_AI_API_KEY,
});

// Run a call against OpenAI
const gptResponse = await openai.chat.completions.create({
  model: 'vibiz/fast',
  messages: [{ role: 'user', content: 'Extract the address from this email.' }],
});

// Run a call against Anthropic
const claudeResponse = await openai.chat.completions.create({
  model: 'vibiz/smart',
  messages: [{ role: 'user', content: 'Refactor this database query.' }],
});

// Run a call against Google
const geminiResponse = await openai.chat.completions.create({
  model: 'vibiz/balanced',
  messages: [{ role: 'user', content: 'Summarize this long document.' }],
});

If you are using the app SDK in a production application, you can import @vibiz/app and pass the configuration directly:

TypeScript
import OpenAI from 'openai';
import { vibiz } from '@vibiz/app';

const openai = new OpenAI(vibiz.ai);

For more implementation patterns, see how to use Claude with the OpenAI Python SDK and our guide on OpenAI-compatible APIs for Claude and Gemini.

Consolidated billing and hard spend limits

Consolidating your models under one platform eliminates the need to manage credits across separate billing dashboards. thelastapi uses a prepaid credit balance with card auto-recharge. Every AI call deducts tokens against this balance the moment the usage event is recorded.

Every JSON chat completion includes two metadata fields:

  • served_model: The exact model string executed by the gateway.
  • cost_micro_usd: The exact cost of that specific call in micro-USD.

You can inspect your aggregated spend broken down by model, endpoint, or end-user through the CLI:

Terminal
vibiz usage --period 7d --by model

To prevent unexpected spikes from runaway scripts or AI agents, guardrails are built directly into the routing layer:

  • Daily safety cap: Accounts default to a $5 per day safety limit across all actions and AI calls. The account owner can adjust this in the console or by running vibiz billing limit <dollars>.
  • Project budget: Projects default to a $1 daily AI budget. When reached, the gateway returns a 429 rate_limited status with details.reason: "project_budget".
  • Automatic threshold alerts: Owners receive notification emails when 80% and 100% of a daily limit or project budget has been reached.

Can you still bring an existing Google key?

If your organization has enterprise credits or special terms with Google, you can attach your own Google key to thelastapi.

Terminal
GEMINI_API_KEY=your_key_here vibiz ai keys set google

When configured, any requests to Google models—such as vibiz/balanced, vibiz/image, or direct google/... identifiers—are routed to your Google account and billed as $0 on thelastapi. Other providers (OpenAI, Anthropic, DeepSeek) continue running through thelastapi gateway as normal. If your Google key is rejected or runs out of quota, the call fails immediately with customer_key_rejected rather than silently billing thelastapi account.

Next steps

To learn more about connecting your existing tooling to our unified endpoint, read about how one API key for GPT, Claude and Gemini works and review the AI docs for full route parameters.

You can create your account at thelastapi.dev/start.

Frequently asked questions

Do I need separate Python or Node SDKs for each model provider?

No. Because the gateway endpoint under `/v1/ai` is fully OpenAI-compatible, you can use the standard OpenAI client library for Python, TypeScript, or any HTTP client to call OpenAI, Anthropic, Google, and other models.

What happens if an Anthropic or Google model goes down?

The gateway will never silently fall back to an unrequested model. If the requested provider or model is unreachable, the API returns a 503 error with either `model_unavailable` or `provider_unavailable` along with a retry hint.

How am I billed when calling multiple providers?

Usage across all model providers draws against your unified thelastapi prepaid credit balance. Every API response returns the exact cost of the execution in the `cost_micro_usd` field so you can trace individual feature costs.

Can I set daily spending caps across different models?

Yes. Accounts enforce an account-wide daily safety cap ($5 by default) and a project-level daily AI budget ($1 by default). When a limit is met, subsequent requests receive an immediate 429 status code with clear error details.