Registration and service availability are subject to allowlist review.
- Registration requires a Gmail address.
- Businesses can request allowlisting by emailing hi@laozhang.ai or messaging @laozhang_cn on Telegram.
Make your first request
You need an account first; see the registration note at the top of this page.1
Create an API key
Sign in and create a token in Token management. The console calls API keys “tokens”. Choose the
default group for this example; the billing guide explains groups and billing modes. Then set the key in your terminal:2
Pick a model
Copy an exact model ID from Models and pricing, which also lists each model’s price, token groups, and endpoints. This example uses
gpt-5.4-mini, a usage-based text model in the default group.3
Send a request
choices[0].message.content. Continue with the API integration guide for SDK setup, image requests, the Gemini and Anthropic native APIs, and error handling.Explore the documentation
Nano Banana API
Google’s Gemini image models: five models, fixed price per call, Gemini-native or OpenAI-compatible requests.
GPT Image 2.5 API
OpenAI’s image model: official forwarding or per-call routes for generation, editing, and transparent backgrounds.
Grok Imagine API
xAI’s image model: $0.055 per image, 1K or 2K output, edits with up to three references.
Compare image APIs
Compare image models, endpoints, and billing, then open a model guide.
MiniMax H3 video
$0.05 per second at 768P, 37.5% below official, with 2K, reference media, and built-in audio.
Muse video
Meta’s video model: $0.30 for a 10-second clip, or $0.03 per second, OpenAI-style
/v1/videos, one continuous clip up to 60 seconds.Compare video APIs
See what a clip costs on H3, Muse, Seedance, and Wan, plus endpoints and token groups.
OpenAI protocol
Send Chat Completions requests with OpenAI SDKs and compatible clients.
Gemini protocol
Call
generateContent with cURL or the Google Gen AI SDK.Models and pricing
Search model IDs, prices, token groups, and endpoints.
Announcements
Follow model launches, price changes, and service status.
Integrations
Use LaoZhang API in Codex CLI, Gemini CLI, Cline, Cherry Studio, and more.
Use these docs with AI tools
If you write code with Claude Code, Cursor, Codex, or another coding assistant, let it read these docs for you. Send it the prompt below: it reads the LaoZhang API integration guide first, then writes working code for the model and task you name. It takes three steps.1
Set your API key as an environment variable
Create a token in Token management, copy the key, and run this in the terminal where your code will run:In Windows PowerShell, use
$env:LAOZHANG_API_KEY="your-laozhang-api-key" instead. The code the assistant writes reads the key from this variable, so there is no need to paste the key into the chat, and you should not.2
Copy the prompt and add your model and task
Click Copy prompt, or copy the full text below:The more specific those two lines are, the better the code fits your project. For example:
An integration prompt for your coding assistant. After copying, replace the last two lines with your model and task.
Full prompt
- Model I want to use: Nano Banana 2
- Task: in Python, read prompts.txt, generate one 2K image per line, and save the images to an output folder
3
Send it to your assistant and run the code
Paste the prompt into your coding assistant and send it. The assistant then:
- Reads the integration guide to pick the base URL and protocol.
- Looks up the exact model ID and price in the model registry.
- Writes the code and tells you how to run it and what success looks like.
Give an assistant a single page
Docs pages have an Open in ChatGPT button at the top. The arrow next to it opens all the options:
Use it for questions about one model or one error. With ChatGPT or Claude, pick that option directly. With any other assistant, choose Copy page and paste it into the chat. For example, copy the GPT Image 2.6 page and ask: “Using this page, write a Node.js example that generates an SVG icon.”
Files the assistant reads
The prompt points to these files. Other AI tools can use them directly:- skill.md is an agent skill file. It gives a coding assistant the rules for connecting to LaoZhang API: the base URL for each SDK, how to read the API key from the environment, minimal text and image requests, error diagnosis, and which reference to open next.
- model-registry.json is the model catalog in machine-readable form: model IDs, prices, token groups, and endpoints, built from the same data as Models and pricing.
- llms-full.txt is the whole documentation as one plain-text file, for tools that load documentation into their context. It currently contains the Chinese documentation.
About LaoZhang API
LaoZhang API (www.laozhang.ai) is operated by YingTu Technology Pte. Ltd., a Singapore company. It provides technical API access and routing to third-party models. It is not the official operator of those models, is not affiliated with OpenAI, Google, or xAI, and does not offer a content-generation service to the public.
About LaoZhang API covers the operator, where each model comes from, the available routes, payment, and refunds in one place. You are responsible for reviewing model output and for how you use it.
For support, email hi@laozhang.ai or message @laozhang_cn on Telegram. Service updates are also posted to the @laozhang_ai Telegram channel, and longer write-ups appear on the LaoZhang AI Blog.
FAQ
Do I need an account with each model provider?
No. One LaoZhang API account and API key reach every model that your key’s group can call. Models and pricing lists the groups for each model, and the console shows the models and prices that apply to your account.How is usage charged?
Requests are paid from a prepaid balance. Depending on the model, a request is charged by usage (tokens) or per call, and some token groups apply a price multiplier. Billing, token groups, and invoices covers billing modes, top-ups, and invoices, and call logs show what each request cost.Which API domain should I use?
Usehttps://api.laozhang.ai by default. All three hosts accept the same API key and paths, so switching changes only the hostname; see the API integration guide.
- Default:
https://api.laozhang.ai; the OpenAI SDK base URL ishttps://api.laozhang.ai/v1. - Servers in Europe or North America that want a direct connection:
api-vip.laozhang.ai. - If
api.laozhang.aican’t be reached from your network:api2.laozhang.ai.
How do I check my balance from code?
CallGET https://api.laozhang.ai/api/user/self with a personal access token, which is a separate credential from your API key (the old system AccessToken was retired on November 9, 2026). The balance query API shows how to create the token and convert quota to US dollars.