API Documentation

ApiTopMix is a unified AI model aggregation gateway. Access GPT, Claude, Gemini, DeepSeek, and more through a single, OpenAI-compatible API.

Getting Started

Welcome to the ApiTopMix API. Our gateway provides a single, unified interface to interact with the world's leading AI models. The API is fully compatible with the OpenAI SDK, so you can switch with a single line change.

Base URL

BASE https://apitopmix.com

Quick Start

Get up and running in under a minute:

  1. Sign up at apitopmix.com and generate an API key from your dashboard.
  2. Set the base URL to https://apitopmix.com and add your API key to the Authorization header.
  3. Make your first request using any OpenAI-compatible SDK or a simple cURL call.
Quick Test (cURL)
curl https://apitopmix.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4.1",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
OpenAI SDK Compatible — Simply change the base_url to https://apitopmix.com/v1 in any OpenAI SDK client. No other code changes needed.
Anthropic SDK Compatible — For Claude models, you can also use the native Anthropic Messages API format via /v1/messages. Set base_url to https://apitopmix.com in the Anthropic SDK. See Claude Messages API for details.

Authentication

All API requests require authentication via a Bearer token in the Authorization header.

Authorization Header
Authorization: Bearer sk-your-api-key-here
HeaderValueRequired
AuthorizationBearer YOUR_API_KEYRequired
Content-Typeapplication/jsonRequired
Keep your API key secret. Never expose it in client-side code or public repositories. Use environment variables to store your key securely.

Chat Completions

Create a chat completion with any supported model. This endpoint is compatible with the OpenAI Chat Completions API.

POST /v1/chat/completions

Request Body

ParameterTypeDescription
modelstringModel ID to use, e.g. gpt-4.1, claude-sonnet-4 Required
messagesarrayArray of message objects with role and content Required
max_tokensintegerMaximum number of tokens to generate Optional
temperaturenumberSampling temperature between 0 and 2. Default: 1.0 Optional
streambooleanEnable Server-Sent Events streaming. Default: false Optional
top_pnumberNucleus sampling parameter. Default: 1.0 Optional

Message Object

FieldTypeDescription
rolestringOne of system, user, or assistant
contentstringThe text content of the message

Response Format

JSON Response
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1711234567,
  "model": "gpt-4.1",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 9,
    "total_tokens": 21
  }
}

Code Examples

cURL
Python
JavaScript
cURL
curl https://apitopmix.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4.1",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain quantum computing in simple terms."}
    ],
    "max_tokens": 500,
    "temperature": 0.7
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com/v1"
)

response = client.chat.completions.create(
    model="claude-sonnet-4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing."}
    ],
    max_tokens=500,
    temperature=0.7
)

print(response.choices[0].message.content)
JavaScript (Node.js)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-your-api-key',
  baseURL: 'https://apitopmix.com/v1'
});

const response = await client.chat.completions.create({
  model: 'gemini-3.1-pro-preview',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Explain quantum computing.' }
  ],
  max_tokens: 500,
  temperature: 0.7
});

console.log(response.choices[0].message.content);

Streaming (SSE)

Enable real-time token streaming by setting stream: true. The response is delivered as Server-Sent Events.

Python Streaming Example
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com/v1"
)

stream = client.chat.completions.create(
    model="gpt-4.1",
    messages=[{"role": "user", "content": "Write a poem about AI."}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Each SSE event contains a JSON chunk:

SSE Chunk Format
data: {"id":"chatcmpl-abc","choices":[{"delta":{"content":"Hello"}}]}

data: [DONE]

Claude Messages API

In addition to the OpenAI-compatible endpoint above, ApiTopMix also natively supports the Anthropic Messages API format. If you are already using the Anthropic SDK, you can connect directly without any format conversion.

Two ways to use Claude models: You can call Claude models via the OpenAI-compatible /v1/chat/completions endpoint (shown above), or via the native Anthropic /v1/messages endpoint described here. Both use the same API key and same pricing.
POST /v1/messages

Authentication

The Anthropic format uses the x-api-key header (instead of Authorization: Bearer). You must also include the anthropic-version header.

HeaderValueRequired
x-api-keyYOUR_API_KEYRequired
anthropic-version2023-06-01Required
Content-Typeapplication/jsonRequired

Request Body

ParameterTypeDescription
modelstringClaude model ID, e.g. claude-sonnet-4-6 Required
messagesarrayArray of message objects with role and content Required
max_tokensintegerMaximum number of tokens to generate Required
systemstringSystem prompt (passed as a top-level field, not inside messages) Optional
temperaturenumberSampling temperature between 0 and 1. Default: 1.0 Optional
streambooleanEnable Server-Sent Events streaming. Default: false Optional
top_pnumberNucleus sampling parameter Optional

Supported Models

Model IDDescription
claude-opus-4-6Most capable Claude model
claude-opus-4-6-thinkingOpus with extended thinking
claude-opus-4-5-20251101Claude Opus 4.5
claude-opus-4-5-20251101-thinkingOpus 4.5 with extended thinking
claude-sonnet-4-6Best balance of speed and capability
claude-sonnet-4-6-thinkingSonnet with extended thinking
claude-sonnet-4-5-20250929Claude Sonnet 4.5
claude-sonnet-4-5-20250929-thinkingSonnet 4.5 with extended thinking
claude-haiku-4-5-20251001Fastest and most affordable Claude model
claude-haiku-4-5-20251001-thinkingHaiku with extended thinking

Response Format

JSON Response
{
  "id": "msg_01abc123",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Hello! How can I help you today?"
    }
  ],
  "model": "claude-sonnet-4-6",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 12,
    "output_tokens": 9
  }
}

Code Examples

cURL
Python
JavaScript
cURL
curl https://apitopmix.com/v1/messages \
  -H "x-api-key: $API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 500,
    "system": "You are a helpful assistant.",
    "messages": [
      {"role": "user", "content": "Explain quantum computing in simple terms."}
    ]
  }'
Python (Anthropic SDK)
import anthropic

client = anthropic.Anthropic(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com"
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=500,
    system="You are a helpful assistant.",
    messages=[
        {"role": "user", "content": "Explain quantum computing."}
    ]
)

print(message.content[0].text)
JavaScript (Anthropic SDK)
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: 'sk-your-api-key',
  baseURL: 'https://apitopmix.com'
});

const message = await client.messages.create({
  model: 'claude-sonnet-4-6',
  max_tokens: 500,
  system: 'You are a helpful assistant.',
  messages: [
    { role: 'user', content: 'Explain quantum computing.' }
  ]
});

console.log(message.content[0].text);

Streaming

Enable real-time streaming by setting stream: true.

Python Streaming
import anthropic

client = anthropic.Anthropic(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com"
)

with client.messages.stream(
    model="claude-sonnet-4-6",
    max_tokens=500,
    messages=[{"role": "user", "content": "Write a poem about AI."}]
) as stream:
    for text in stream.text_stream:
        print(text, end="")
Anthropic SDK Compatible — Simply set base_url to https://apitopmix.com (without /v1) in the Anthropic SDK client. The SDK appends /v1/messages automatically.
Key differences from OpenAI format:
  • Auth header: x-api-key instead of Authorization: Bearer
  • System prompt: top-level system field, not a message with role: "system"
  • Response: content is an array of content blocks, not a single string
  • max_tokens is required, not optional
  • Usage fields: input_tokens / output_tokens instead of prompt_tokens / completion_tokens

Models

List all available models through the API. ApiTopMix aggregates models from leading AI providers.

GET /v1/models
cURL
curl https://apitopmix.com/v1/models \
  -H "Authorization: Bearer $API_KEY"

Supported Providers & Models

Anthropic

Claude Series

Opus 4.6 / 4.5, Sonnet 4.6 / 4.5, Haiku 4.5
Includes standard and thinking modes

Google

Gemini Series

Gemini 3.1 Pro, Gemini 3 Flash
Latest Gemini multimodal models

DeepSeek

DeepSeek

V3.2, V3.1, R1 Distill series
Via NVIDIA NIM

Meta

Llama Series

Llama 4 Maverick/Scout, Llama 3.3 70B, Llama 3.1 405B
Free via NVIDIA NIM

Mistral

Mistral Series

Large 3 675B, Medium 3, Small 4, Devstral 2
Via NVIDIA NIM

Moonshot

Kimi Series

Kimi K2.5, K2 Instruct, K2 Thinking
Via NVIDIA NIM

Qwen

Qwen Series

Qwen 3.5 397B, Qwen 3 Coder 480B, QwQ 32B
Via NVIDIA NIM

Others

More Models

GLM-5, MiniMax M2.5, Phi-4, GPT-OSS, Nemotron Ultra
50+ models available

Pricing

ModelInput $/1MOutput $/1MNotes
Anthropic Claude (Official 60% off)
claude-opus-4-6$3.00$15.00
claude-opus-4-6-thinking$3.00$15.00Extended thinking
claude-sonnet-4-6$1.80$9.00
claude-sonnet-4-6-thinking$1.80$9.00Extended thinking
claude-haiku-4-5-20251001$0.60$3.00
Google Gemini (Official 60% off)
gemini-3.1-pro-preview$1.20$7.20Latest Gemini Pro
gemini-3-flash-preview$0.30$1.80Fast & affordable
NVIDIA NIM Models (Official 20% off / Free)
meta/llama-3.3-70b-instructFREEMeta Llama 3.3
meta/llama-3.1-405b-instructFREE405B parameters
qwen/qwen3.5-397b-a17b$0.02$0.06Qwen 3.5
mistralai/mistral-large-3-675b-instruct-2512$0.10$0.30Mistral Large 3
moonshotai/kimi-k2.5$0.12$0.60Kimi K2.5
z-ai/glm5$0.20$0.64GLM-5
50+ models available. Use the /v1/models endpoint to get the complete list of model IDs. Pricing for all models is available on the Pricing page (login required).

Embeddings

Generate vector embeddings for text inputs. Useful for search, clustering, and retrieval-augmented generation (RAG).

POST /v1/embeddings

Request Body

ParameterTypeDescription
modelstringEmbedding model ID Required
inputstring | arrayText(s) to embed Required
encoding_formatstringfloat or base64. Default: float Optional

Supported Models

ModelDimensionsBest For
text-embedding-3-large3072Highest accuracy, retrieval tasks
text-embedding-3-small1536Balanced performance and cost
text-embedding-ada-0021536Legacy support
Python Example
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com/v1"
)

response = client.embeddings.create(
    model="text-embedding-3-small",
    input="The quick brown fox jumps over the lazy dog."
)

embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")  # 1536

Response Format

JSON Response
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0023, -0.0091, 0.0152, ...]
    }
  ],
  "model": "text-embedding-3-small",
  "usage": { "prompt_tokens": 9, "total_tokens": 9 }
}

Music Generation (Suno API)

Generate music tracks using AI. Submit a music generation task and poll for results.

Submit Music Generation

POST /suno/submit/music

Request Body

ParameterTypeDescription
promptstringText prompt describing the desired music Required
stylestringMusic genre/style, e.g. "jazz", "electronic", "pop" Optional
titlestringTitle for the generated track Optional
lyricsstringCustom lyrics for the track Optional
make_instrumentalbooleanGenerate without vocals. Default: false Optional
cURL - Submit Music
curl -X POST https://apitopmix.com/suno/submit/music \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A dreamy lo-fi beat with soft piano and rain sounds",
    "style": "lo-fi",
    "title": "Rainy Afternoon",
    "make_instrumental": true
  }'

Submit Response

JSON Response
{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "suno_abc123def456"
  }
}

Fetch Generation Result

GET /suno/fetch/{id}

Poll this endpoint with the task_id to check generation progress and retrieve the result.

cURL - Fetch Result
curl https://apitopmix.com/suno/fetch/suno_abc123def456 \
  -H "Authorization: Bearer $API_KEY"
JSON Response (Completed)
{
  "code": 200,
  "data": {
    "task_id": "suno_abc123def456",
    "status": "completed",
    "tracks": [
      {
        "title": "Rainy Afternoon",
        "audio_url": "https://cdn.apitopmix.com/audio/...",
        "duration": 120,
        "style": "lo-fi"
      }
    ]
  }
}
Async Processing — Music generation is asynchronous. Typical generation takes 30–120 seconds. Poll the fetch endpoint every few seconds until status is "completed" or "failed".

Image Generation

Generate high-quality images from text prompts using AI. Compatible with the OpenAI DALL-E API format.

POST /v1/images/generations

Request Body

ParameterTypeDescription
modelstring"nano-banana-2" Required
promptstringText description of the image to generate Required
nintegerNumber of images (default: 1) Optional
sizestringImage size, e.g. "1024x1024" Optional
image_sizestringResolution: "1K", "2K", or "4K". Default: 1K Optional

Supported Models

ModelPriceFeatures
nano-banana-2$0.082/imageText-to-image, image-to-image, multi-image input. Supports 1K/2K/4K output.
cURL
curl -X POST https://apitopmix.com/v1/images/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "A majestic snow leopard on a mountain peak at sunrise, digital painting",
    "n": 1,
    "size": "1024x1024"
  }'

Response

{
  "created": 1711234567,
  "data": [
    {
      "url": "https://example.com/generated-image.jpg"
    }
  ]
}

Python Example

Python
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://apitopmix.com/v1"
)

response = client.images.generate(
    model="nano-banana-2",
    prompt="A futuristic city with flying cars at sunset, cyberpunk style",
    n=1,
    size="1024x1024"
)

image_url = response.data[0].url
print(f"Image: {image_url}")
Tip: Use image_size: "2K" or "4K" for higher resolution output. Provide detailed prompts with art style, lighting, and composition for best results. Failed generations are not charged.

Video Generation

Generate short AI videos from text prompts. Video generation is asynchronous — submit a task, then poll for results.

Submit Video Generation

POST /v1/videos

Request Body

ParameterTypeDescription
modelstring"grok-video-3" Required
promptstringText description of the video Required
durationintegerLength in seconds (5-15). Default: 8 Optional
resolutionstring"480p" or "720p". Default: 480p Optional
aspect_ratiostring"16:9", "9:16", "1:1". Default: 16:9 Optional
cURL - Submit Video
curl -X POST https://apitopmix.com/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-video-3",
    "prompt": "A golden retriever running on a beach at sunset, cinematic",
    "duration": 10,
    "resolution": "720p"
  }'

Submit Response

{
  "id": "task_abc123xyz",
  "object": "video",
  "status": "queued"
}

Poll Video Status

GET /v1/videos/{task_id}
cURL - Poll Status
curl https://apitopmix.com/v1/videos/task_abc123xyz \
  -H "Authorization: Bearer $API_KEY"

Completed Response

{
  "code": "success",
  "data": {
    "status": "SUCCESS",
    "progress": "100%",
    "data": {
      "output": "https://example.com/generated-video.mp4"
    }
  }
}

Python Example

Python
import requests, time

BASE = "https://apitopmix.com/v1"
KEY = "sk-your-api-key"
H = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}

# Submit
r = requests.post(f"{BASE}/videos", headers=H, json={
    "model": "grok-video-3",
    "prompt": "A cat watching fish in an aquarium",
    "duration": 10, "resolution": "720p"
})
task_id = r.json()["id"]
print(f"Submitted: {task_id}")

# Poll
while True:
    s = requests.get(f"{BASE}/videos/{task_id}", headers=H).json()
    d = s.get("data", s)
    print(f"Status: {d.get('status')} | {d.get('progress')}")
    if d.get("status") == "SUCCESS":
        print(f"Video: {d['data']['output']}")
        break
    elif d.get("status") == "FAILURE":
        print(f"Failed: {d.get('fail_reason')}")
        break
    time.sleep(10)

Pricing

ModelPriceDurationResolution
grok-video-3$0.030/sec (40% off official)1-15 seconds480p / 720p
DurationCost
5 seconds$0.150
8 seconds$0.240
10 seconds$0.300
15 seconds$0.450
Async Processing — Video generation takes 30-60 seconds. Poll every 10 seconds. Download URLs are temporary — save the video promptly.

Error Codes

All errors return a consistent JSON structure with an error object.

Error Response Format

Error Response
{
  "error": {
    "message": "Invalid API key provided.",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

Common Error Codes

HTTP StatusError TypeDescription
400invalid_request_errorThe request body is malformed or missing required parameters.
401authentication_errorInvalid or missing API key. Check your Authorization header.
403permission_errorYour API key does not have permission to access this resource.
404not_found_errorThe requested resource or endpoint does not exist.
429rate_limit_errorToo many requests. Slow down and retry with exponential backoff.
500server_errorAn unexpected error occurred on our servers. Try again later.
503service_unavailableThe upstream model provider is temporarily unavailable.
Retry Strategy: For 429 and 5xx errors, implement exponential backoff starting with a 1-second delay, doubling on each retry up to a maximum of 60 seconds.

Rate Limits

ApiTopMix enforces rate limits to ensure fair usage and platform stability. Limits vary by plan and are applied per API key.

Rate Limit Headers

Every response includes headers indicating your current rate limit status:

HeaderDescription
x-ratelimit-limit-requestsMaximum requests allowed in the current window
x-ratelimit-remaining-requestsRemaining requests in the current window
x-ratelimit-reset-requestsTime (in seconds) until the request limit resets
x-ratelimit-limit-tokensMaximum tokens allowed per minute
x-ratelimit-remaining-tokensRemaining tokens in the current window

Default Limits

TierRPM (Requests/Min)TPM (Tokens/Min)
Free1040,000
Standard60200,000
Pro3001,000,000
EnterpriseCustomCustom
Need higher limits? Contact us at [email protected] for enterprise-grade rate limits tailored to your use case.

Best Practices

  • Monitor the x-ratelimit-remaining-requests header to stay within your limits.
  • Implement exponential backoff when receiving 429 responses.
  • Cache responses when possible to reduce unnecessary API calls.
  • Use streaming for long completions to avoid timeout issues.
  • Batch embedding requests by sending multiple texts in a single call.

Gemini API (Native Format)

ApiTopMix supports Google's Gemini API format natively. You can send requests using the same generateContent / streamGenerateContent format used by Google AI Studio and Vertex AI.

Supported Gemini Models

ModelTypeInput / 1MOutput / 1M
gemini-2.5-flashFast & cheap$0.30$1.80
gemini-2.5-proHigh quality$1.25$5.00
gemini-3-flash-previewLatest fast$0.30$1.80
gemini-3-pro-previewLatest flagship$1.25$7.50
gemini-3.1-pro-previewLatest flagship+$1.20$7.20
gemini-3.1-flash-lite-previewUltra cheap$0.15$0.90

Option A: Use via OpenAI SDK (Easiest)

Just set the model parameter to a Gemini model name — the same OpenAI SDK code works.

Python — Gemini via OpenAI SDK
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-apitopmix-key",
    base_url="https://apitopmix.com/v1"
)

response = client.chat.completions.create(
    model="gemini-3-pro-preview",
    messages=[{"role": "user", "content": "Hello, Gemini!"}]
)
print(response.choices[0].message.content)

Option B: Use Gemini Native Format

Send requests directly to the Gemini-compatible endpoint using Google's contents/parts format.

POST /v1beta/models/{model}:generateContent
cURL — Gemini Native Format
curl -X POST https://apitopmix.com/v1beta/models/gemini-3-pro-preview:generateContent \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "systemInstruction": {"parts": [{"text": "You are a helpful assistant."}]},
    "contents": [{"role": "user", "parts": [{"text": "Hello!"}]}],
    "generationConfig": {
      "temperature": 0.7,
      "maxOutputTokens": 200
    }
  }'

Authentication: All three methods are supported:

Streaming

POST /v1beta/models/{model}:streamGenerateContent?alt=sse

Append ?alt=sse for Server-Sent Events streaming. The response format is identical to Google's Gemini API.

Supported Parameters

ParameterTypeStatus
contents (text, image, multi-turn)array✔ Supported
systemInstructionobject✔ Supported
generationConfig.temperaturefloat✔ Supported
generationConfig.topPfloat✔ Supported
generationConfig.topKint✔ Supported
generationConfig.maxOutputTokensint✔ Supported
generationConfig.stopSequencesstring[]✔ Supported
generationConfig.seedint✔ Supported
generationConfig.presencePenaltyfloat✔ Supported
generationConfig.frequencyPenaltyfloat✔ Supported
generationConfig.thinkingConfigobject✔ Supported
safetySettingsarray✔ Supported
tools (function calling)array✔ Supported
inlineData (images)base64✔ Supported

Vertex AI Compatibility

If you are migrating from Google Cloud Vertex AI, ApiTopMix supports Vertex-style URLs. Change your endpoint host and Bearer token — your request body stays the same.

Vertex AI Endpoint Mapping

Vertex AI URLApiTopMix URL
https://{region}-aiplatform.googleapis.com/v1/projects/{p}/locations/{l}/publishers/google/models/{model}:generateContent https://apitopmix.com/v1/projects/{any}/locations/{any}/publishers/google/models/{model}:generateContent
.../{model}:streamGenerateContent https://apitopmix.com/v1/projects/{any}/locations/{any}/publishers/google/models/{model}:streamGenerateContent?alt=sse
.../endpoints/openapi/chat/completions https://apitopmix.com/v1/projects/{any}/locations/{any}/endpoints/openapi/chat/completions
Note: The project and location path segments can be any value — they are ignored by ApiTopMix. This makes migration seamless: just change the hostname and Bearer token.

Migration from Vertex AI

cURL — Before (Vertex AI)
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://us-central1-aiplatform.googleapis.com/v1/projects/my-project/locations/us-central1/publishers/google/models/gemini-3-pro-preview:generateContent" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"Hello"}]}]}'
cURL — After (ApiTopMix) — change host + token only
curl -H "Authorization: Bearer YOUR_APITOPMIX_KEY" \
  "https://apitopmix.com/v1/projects/any/locations/any/publishers/google/models/gemini-3-pro-preview:generateContent" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"Hello"}]}]}'

What stays the same:

What changes: