Carbon speaks the OpenAI request format on Utopixel, so the SDKs and frameworks you already use work after two changes: the base URL and the model id. Streaming, tool calls and JSON output work the normal way.
Each snippet is the minimum change: base URL and model id.
from openai import OpenAIclient = OpenAI(base_url="https://utopixel.online/api/v1", api_key="sk-vb-...")r = client.chat.completions.create(model="google/gemini-4-carbon",messages=[{"role": "user", "content": "Hello, Gemini 4 Carbon"}],)print(r.choices[0].message.content)print(r.usage) # usage.cost is the charge in USD
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://utopixel.online/api/v1", apiKey: process.env.UTOPIXEL_API_KEY });const r = await client.chat.completions.create({model: "google/gemini-4-carbon",messages: [{ role: "user", content: "Hello, Gemini 4 Carbon" }],});console.log(r.choices[0].message.content);
from langchain_openai import ChatOpenAIllm = ChatOpenAI(model="google/gemini-4-carbon", base_url="https://utopixel.online/api/v1", api_key="sk-vb-...")print(llm.invoke("Explain this stack trace in two lines.").content)
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";import { generateText } from "ai";const utopixel = createOpenAICompatible({name: "utopixel",apiKey: process.env.UTOPIXEL_API_KEY,baseURL: "https://utopixel.online/api/v1",includeUsage: true,});const { text } = await generateText({ model: utopixel("google/gemini-4-carbon"), prompt: "Write a haiku about APIs." });
If Carbon fails or is rate limited, Utopixel tries the next model. You pay only for the answer you get.
r = client.chat.completions.create(model="google/gemini-4-carbon",messages=[{"role": "user", "content": "Summarize this repo"}],extra_body={"models": ["google/gemini-4-carbon", "google/gemini-4-argon"]},)
One API key for the models of OpenAI, Google, DeepSeek, Moonshot AI, Qwen, xAI, Z.ai, Meta, Amazon, AionLabs, Anthropic, Baidu, ByteDance Seed, Cohere, Elorian, Fireworks AI, IBM, inclusionAI, Inference.net, KT, Liquid AI, Meituan, Meta, MiniMax, Mistral AI, Moondream, Motif Technologies, Nex AGI, NVIDIA, Particle AI, Perceptron, Prism ML, Reflection AI, Reka, Relace, Ricursive AI, Sakana AI, StepFun, Tencent, Thinking Machines, Unbiased, Upstage, Writer and Xiaomi. Start free, no card needed.