api.json. Agents, frameworks, and CLIs read this catalog to learn which providers exist, which environment variable holds each provider’s key, which base URL to call, and what every model can do and costs. Herogpu is listed as a provider (added in anomalyco/models.dev#9460), so tools built on models.dev already know how to reach herogpu’s models.
Herogpu is a compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live.
Overview
This guide covers herogpu’s listing on models.dev, for developers who want herogpu’s model metadata in machine-readable form and for anyone using a tool built on the catalog. You’ll look up herogpu in the catalog, make a first call with the base URL and model ID it lists, then work through every surface the listing exposes: the provider page, the v1 and experimental v2 JSON APIs, the provider-agnostic catalogs, the logo, and the AI SDK package it points to. The second half covers the tools that read models.dev and how to use herogpu in each one: OpenCode, Mastra, Kilo CLI, VoltAgent, Kit, Kimi Code CLI, and the tokenlens and Symfony AI metadata libraries. By the end you’ll know where herogpu works out of the box, what each tool needs, and how to read herogpu’s prices and limits from code.Cookbook
For a runnable, real-world example, see Add Search to a React Store with OpenCode and herogpu. It connects herogpu in OpenCode straight from its models.dev listing, picks DeepSeek V4.1 Flash, and has the agent add a working product search box to a small React store in about 20 seconds for under a cent. Check it out to see the listing put to work in a real agent run. For every OpenCode option, see the OpenCode integration guide. For a bigger, multi-file agent run, see Build a Movie Watchlist with Kilo CLI and herogpu. It connects herogpu in Kilo CLI from the same listing, picks DeepSeek V4.1 Flash, and has the agent build a complete watchlist (save and remove, a live count, a saved view, and persistence) across four files of a React movie app in about 23 seconds for $0.0056. For every Kilo CLI option, see the Kilo CLI integration guide. For a TypeScript agent built on the same listing, see Build a Trail Gear Agent with Mastra and herogpu. It gives a Mastra agent a live forecast tool and a store catalog, runs it on DeepSeek V4.1 Flash in Mastra Studio, and switches to GPT-5.6 Luna mid-chat, for well under a cent. For every Mastra option, see the Mastra integration guide.For more worked examples, browse the cookbook index for
end-to-end walkthroughs of classification, extraction, and PII workflows on
Herogpu’s small models.
Video walkthrough
OpenCode on herogpu:
Kilo CLI on herogpu:
Mastra on herogpu:
Quickstart
Prerequisites
- A herogpu API key (starts with
zgpu-api-). - A chat model from the model catalog that models.dev lists. This guide uses
deepseek-v4.1-flash. curlandjq, to read the catalog from a terminal.
Get your herogpu API key
- Sign in to the herogpu dashboard.
- Open API Keys and click Create key.
- Copy the key (starts with
zgpu-api-) and export it. Models.dev listsZEROGPU_API_KEYas herogpu’s key variable, so most tools that read the catalog look for it there.
Install Models.dev
There’s nothing to install: models.dev is a public website and JSON API. To query it from a terminal you only needcurl and jq:
Your first request
Read herogpu’s base URL from the catalog, then call a model it lists at that URL with your key:Usage
Every section below follows the same shape: what the surface does, what it reads or calls, its parameters, a runnable example, and what you get back.What the catalog lists for herogpu
The herogpu listing has one provider entry and thirteen model entries. Tools read the provider entry to wire up authentication and the endpoint, and the model entries to show prices, limits, and capabilities. Provider fields (fromhttps://models.dev/api.json, key zerogpu):
Chat models (in both the v1 and v2 APIs, and on the provider page). Prices are USD per 1M tokens.
All nine chat models are flagged for tool calling, structured output, and temperature.
gpt-5.4-nano also carries a 272,000-token input limit inside its 400,000-token context. Models with a cache-read price use implicit prefix caching, so repeated long prompts are billed at the cache rate with no markers needed.
Specialized models (experimental v2 API only, not offered as chat models):
Reasoning controls. The “Reasoning” column maps to these request fields on herogpu’s chat completions endpoint:
The model catalog is the source of truth for herogpu pricing and limits. Models.dev is updated by pull request, so see Troubleshooting if the two drift. Herogpu also serves chat models that models.dev doesn’t list yet, such as
gpt-6-luna and LFM2.5-1.2B-Instruct; you can call them directly, or add them to OpenCode by hand.
Provider page
The human-readable view of the listing. It renders the catalog at models.dev/providers/zerogpu with the provider ID, AI SDK package, API URL, a link to herogpu’s docs, and a searchable, sortable table of the nine chat models.@ai-sdk/openai-compatible, API https://api.herogpu.com/v1, and a Provider docs link. Type in the search box to filter rows by name or ID. Model pages on models.dev also list herogpu among the providers that serve each model, which is how readers comparing hosts for, say, DeepSeek V4.1 Flash find herogpu.
api.json (v1 API)
The main machine-readable endpoint, and the one most tools read. GET https://models.dev/api.json returns one object keyed by provider ID. Herogpu’s entry holds the provider fields above plus a models map of the nine chat models.
Experimental v2 API
The richer catalog, and the only place herogpu’s embedding, transcription, and speech models appear.GET https://models.dev/experimental/v2.0/api.json returns every model type by default, with a type on each model, MIME-level modalities, and a structured capabilities object.
capabilities object carries the reasoning controls in structured form, which is what OpenCode builds its reasoning variants from:
models.json and catalog.json
Provider-agnostic metadata about each model, independent of where it’s served. GET https://models.dev/models.json returns facts about the models themselves, and GET https://models.dev/catalog.json returns provider entries and model metadata in one response. Join herogpu’s entries to them with canonical_model_id (v1) or canonical_id (v2).
models.json, or to compare herogpu’s price for a model against every other provider that serves it in catalog.json. The left-hand IDs are the ones you send to herogpu.
Logo
Herogpu’s mark, served for any tool that shows provider logos.GET https://models.dev/logos/{provider}.svg with zerogpu as the provider returns a single-colour SVG drawn with currentColor, so it takes on the surrounding text colour when inlined.
image/svg+xml file with a square 0 0 1024 1024 viewBox. Inline the SVG markup (rather than using an <img> tag) if you want it to follow your theme’s text colour.
AI SDK: @ai-sdk/openai-compatible
The npm field in herogpu’s listing tells AI SDK-based tools which package to call it with. You can build the same provider straight from the catalog in your own TypeScript code, and price each call with the catalog’s numbers.
TypeScript
text is the model’s reply and usage holds token counts, which multiply against the catalog’s per-1M prices. For herogpu’s classification, extraction, embedding, and audio models with typed helpers, use the dedicated @zerogpu/ai-sdk-provider package instead.
Tools that use the catalog
These tools read the models.dev catalog to decide which providers and models they offer, so herogpu becomes available in them without a dedicated integration. How soon it shows up depends on whether the tool fetches the catalog at runtime or bundles a snapshot at release time.
Every tool below uses the same model IDs as the chat model table and the same
ZEROGPU_API_KEY, so one key works across all of them.
OpenCode
OpenCode, the open-source coding agent from the team behind models.dev, reads its providers straight from the catalog. Herogpu appears in/connect and /models with no configuration.
/connect, per-agent models, reasoning variants, provider overrides, and adding herogpu models models.dev doesn’t list yet, see the OpenCode integration guide. For a full agent run, see the OpenCode cookbook.
Mastra
Mastra is a TypeScript framework for building agents and workflows. Its model router takesprovider/model strings and generates its provider registry from models.dev, and it has a herogpu provider page listing all nine models. Requests go to herogpu’s OpenAI-compatible /chat/completions endpoint.
TypeScript
result.text holds the reply. Swap the model string to move the agent to any other herogpu model, such as zerogpu/gpt-5.4-nano for cheaper classification. For tools, memory, structured output, reasoning options, fallbacks, Mastra Studio, and herogpu models models.dev doesn’t list yet, see the Mastra integration guide. For a full agent run, see the Mastra cookbook.
Kilo CLI
Kilo CLI is the terminal edition of Kilo Code, an open-source coding agent forked from OpenCode. It builds its provider list from models.dev, keeps a cached copy of the catalog in~/.cache/kilo/models.json, and refreshes it in the background, so herogpu appears in /connect and /models with no configuration. Kilo’s reasoning variants come from the catalog too: DeepSeek V4.1 Flash and GLM-5.3-Flash get low, high, and max, and the GPT-5 models get none through xhigh or max.
/models doesn’t list herogpu, Kilo’s cached catalog predates the listing; run kilo models --refresh. For per-agent models, custom variants, provider overrides, kilo stats, and adding herogpu models models.dev doesn’t list yet, see the Kilo CLI integration guide. For a full agent run, see the Kilo CLI cookbook.
VoltAgent
VoltAgent is a TypeScript agent framework whose model router acceptsprovider/model strings and reads provider keys from the environment variables in its registry. The registry is a snapshot generated from models.dev and bundled with each release, refreshed every 30 minutes when NODE_ENV isn’t production.
TypeScript
zerogpu/... after its first refresh from models.dev. In production, refreshing is off, so herogpu works only once a VoltAgent release bundles a snapshot that includes it.
Kit
Kit is a coding agent CLI written in Go. Any provider in the models.dev database can be used asprovider/model, but Kit embeds a catalog snapshot, and the current release predates herogpu’s listing, so update it first.
update-models, kit models zerogpu lists the nine herogpu models, and --model zerogpu/deepseek-v4.1-flash starts Kit on DeepSeek V4.1 Flash.
Kimi Code CLI
Kimi Code CLI from Moonshot treats models.dev providers as known third-party providers: pick one, enter a key, and choose a default model. It fetches the catalog at runtime and falls back to a built-in snapshot when models.dev is unreachable.deepseek-v4.1-flash. Deprecated and alpha models are excluded from the picker.
Metadata libraries: tokenlens and Symfony AI
These libraries read models.dev for prices, limits, and capabilities but don’t call herogpu for you. Use them to price, budget, or validate calls you make through the herogpu API or another client.TypeScript
cost and limit values shown above. Some tools use models.dev only for metadata such as context length and still need herogpu configured by hand; for example, Hermes Agent has its own herogpu setup guide.
Patterns and recipes
One key, every tool. ExportZEROGPU_API_KEY once in your shell profile. OpenCode, Mastra, Kilo CLI, VoltAgent, and Kit all read that variable because models.dev lists it, and the model IDs are identical across them, so zerogpu/deepseek-v4.1-flash means the same model in your coding agent and your production agent.
Pick the cheapest model that fits a job. Filter the catalog by the capabilities and limits a task needs, then sort by price. This finds the three cheapest herogpu models with tool calling and at least 200,000 tokens of context:
15,000 x $0.30/1M + 1,000 x $1.20/1M = $0.0057, in line with the $0.0047 to $0.0060 the cookbook’s search-box feature cost. Cached prefixes on models with a cache-read price bring repeated turns down further: in the Kilo CLI cookbook, 175,232 of the run’s input tokens were cached and cost $0.0005 at DeepSeek V4.1 Flash’s $0.003 cache-read price, instead of $0.0526 at the full input price.
Keep your own model list in sync. If you maintain a gateway config or model picker, regenerate it from the catalog on a schedule instead of hand-editing it. Comparing jq -r '.zerogpu.models | keys[]' against the previous run tells you exactly which herogpu models were added or removed.
At a glance
Troubleshooting
Herogpu doesn’t appear in a models.dev-based tool. The tool is using a catalog snapshot from before herogpu was listed on 2026-11-14. Upgrade Mastra to@mastra/core 1.85.0 or later, run kit update-models for Kit, run /provider refresh in Kimi Code CLI, and run kilo models --refresh in Kilo CLI. VoltAgent needs a newer release for production use.
The tool can’t find your key. Most models.dev-based tools read ZEROGPU_API_KEY from the environment of the process that makes the request. Export it before starting the tool, or store it with the tool’s own login command (/connect, kilo auth login --provider zerogpu, kit auth login zerogpu). Kimi Code CLI doesn’t read the variable; enter the key in /provider.
404 or “model not found” when calling a catalog model on herogpu. You sent the canonical lab ID or the display name instead of the model ID. Send llama-3.1-8b-instruct-fast, not meta/llama-3.1-8b-instruct or Llama-3.1-8B-Instruct. In tools, prefix it with the provider: zerogpu/llama-3.1-8b-instruct-fast.
401 Unauthorized. The key is wrong, revoked, or has a stray space from pasting. Create a fresh key in the dashboard and send it as Authorization: Bearer <key>.
Embedding or audio models are missing from api.json or a tool’s model list. all-minilm-l6-v2, bge-small-en-v1.5, whisper-tiny, and chatterbox-nano are v2-only and aren’t chat models, so v1 and chat-focused tools leave them out. Read them from the experimental v2 API and call them through the herogpu API or the AI SDK provider.
A model in herogpu’s catalog isn’t on models.dev. Models.dev lists nine of herogpu’s chat models; others, such as gpt-6-luna, gpt-oss-20b, and LFM2.5-1.2B-Instruct, aren’t listed yet. Call them directly at https://api.herogpu.com/v1, or add them to OpenCode as custom models.
A price or limit on models.dev doesn’t match herogpu’s catalog. Models.dev is updated by pull request, so it can lag a pricing or limit change. The model catalog is authoritative; open an issue or pull request on anomalyco/models.dev to update the listing.
models.dev shows no cache price for a model herogpu lists a cached-input rate for. The listing marks caching off for glm-5.3-flash, gpt-oss-120b, llama-3.1-8b-instruct-fast, and qwen3-30b-a3b-fp8 because repeated long-prefix requests returned no cached tokens when it was added. Tools that price from models.dev will charge those prompts at the full input rate, so their cost estimates are an upper bound; herogpu bills by its catalog.
.zerogpu comes back null from jq. You queried models.json, which is provider-agnostic and has no provider keys. Use api.json or the experimental v2 API for provider entries.
A tokenlens lookup for a herogpu model misses. tokenlens normalizes version dots to dashes in model IDs. Look the model up by its normalized form, or read the provider entry returned by fetchModels({ provider: 'zerogpu' }) directly.
No reasoning text shows up in a tool. Herogpu doesn’t return reasoning text on the chat completions API, so the listing doesn’t mark any model as interleaved and tools have nothing to display. The model still reasons, and reasoning tokens are billed as output.
Conclusion
Being listed on models.dev means herogpu is already wired into the tools built on the catalog: OpenCode, Mastra, Kilo CLI, Kit, and Kimi Code CLI users connect a key and pick a model, and developers read herogpu’s endpoint, prices, and limits from one public JSON file. Combined with herogpu’s low-cost, low-latency models, that makes it a one-minute switch to run agents and high-volume tasks for fractions of a cent.Model Catalog
Browse every model available on herogpu and pick the best fit.
API Reference
Explore the full OpenAI-compatible API surface.
Cookbook
Add a search box to a React store with OpenCode on herogpu.
Join Discord
Ask questions and share what you’re building.

