# Hyper Docs
> Charm Hyper glamorous documentation internet website.
## Hyper Docs
### [Let’s get Hyper](https://hyper.charm.land/docs/)
## Why Hyper
- **Fast and cost-effective.** We partner closely with cloud and silicon providers to optimize performance at the hardware and kernel level, so you get quick responses at a fraction of the price.
- **Models exactly as they were built.** No quantized or trimmed-down variants. Original reasoning options and behaviors are preserved.
- **Built for teams.** Master keys, project-specific sub-keys, and pre-paid credits give you governance over how your organization spends.
- **Privacy and Zero Data Retention.** Pay-as-you-go (PAYG), Business subscriptions, and Enterprise accounts all include zero data retention (ZDR). Personal subscriptions cost less because they allow us to use prompts and responses to train our models and improve the service, with safeguards to protect personal information. Hyper is also GDPR compliant.
Every model in the catalog is hand-picked for software development, vetted for
code generation, debugging, refactoring, and multi-file editing.
## Get your key
1. Head to [hyper.charm.land](https://hyper.charm.land).
2. Sign up with Google, GitHub, or email.
3. Create a new API key; click "New key" to open the API key configuration modal.

4. Configure it as you wish!

5. Now you are ready to go, just copy the key.
Make sure you save it somewhere, you will not be able to copy it again :D

Export it once and every Hyper-aware tool will pick it up:
```bash
export HYPER_API_KEY="sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
```
## Connect your coding agent
Pick your tool and follow the two-minute setup. If you're not sure where to
start, [Crush](/coding-agents/crush) has first-class Hyper support.
## Or call the API directly
Hyper speaks OpenAI and Anthropic out of the box. Swap the base URL, drop in
your key, and go:
```bash title="cURL"
curl https://hyper.charm.land/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "prism",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
```
```python title="Python"
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://hyper.charm.land/v1"
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
```
```js title="Node.js"
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://hyper.charm.land/v1",
});
const response = await client.chat.completions.create({
model: "deepseek-v4-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
```
```go title="Go"
package main
import (
"context"
"fmt"
"os"
"charm.land/fantasy"
"charm.land/fantasy/providers/openaicompat"
)
func main() {
provider, _ := openaicompat.New(
openaicompat.WithBaseURL("https://hyper.charm.land/v1"),
openaicompat.WithAPIKey("YOUR_API_KEY"),
)
ctx := context.Background()
model, _ := provider.LanguageModel(ctx, "deepseek-v4-flash")
agent := fantasy.NewAgent(model)
result, err := agent.Generate(ctx, fantasy.AgentCall{Prompt: "Hello!"})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result.Response.Content.Text())
}
```
Got questions? Check the [Hyper FAQ](https://hyper.charm.land/faq), email
[hypersupport@charm.land](mailto:hypersupport@charm.land), or hop into
[#hyper](https://charm.land/discord) on the Charm Discord.
---
### [Dashboard](https://hyper.charm.land/docs/dashboard)
The Dashboard is your home base in Hyper. It shows your current plan, credit
balance, and usage breakdown.

## Hypercredits Available
The top card shows your current balance in Hypercredits, split between
**Subscription** credits from your plan and **Prepaid** credits you have
purchased. It also shows which credits are being used, when your plan renews,
and whether auto top-up is enabled. See the
[Hyper FAQ](https://hyper.charm.land/faq) for a full explanation of how
Hypercredits work.
If you need more credits, click **Change plan** to switch tiers or
**Buy credits** to purchase prepaid Hypercredits. Both take you to the
[Plans & Billing](/plans-billing) page. Subscription Hypercredits refresh
every week on Sunday at 00:00 UTC.
## Plan
Your current plan is displayed alongside your Hypercredit balance, with a
**Change plan** option to move to a different tier. Your subscription
allocation refreshes every week on Sunday at 00:00 UTC, and the five-hour
rolling window determines how much of it is available at any moment. See
[Plans & Billing](/plans-billing) for details on available plans and what
each tier includes.
## API Keys
The API Keys section lets you create, view, and revoke API keys for your Hyper
account. These keys authenticate your requests to the Hyper API from coding
agents or custom integrations. Keep your keys secure and rotate them if you
suspect they have been compromised.

## Usage by Model
Below the balance card you will find a breakdown of your consumption over time.
You can filter by period (all time, 7 days, 30 days, 60 days, 90 days, or a
custom range).
The table shows:
- **Total** Hypercredit and dollar consumption across all models
- **Per-model** breakdown of Hypercredits and dollar consumption
This gives you visibility into which models are driving your spend and where
your credits are going.
---
### [Models](https://hyper.charm.land/docs/models)
Every model in the Hyper catalog is hand-picked for software development. We
only include coding models with reasoning capabilities, optimized for long
running coding sessions in interactive workflows and fully agentic software
development lifecycle workflows. You won't find general-purpose chat models
here. Every model on the list has been vetted to perform well at code
generation, debugging, refactoring, and multi-file editing tasks.

## Key Fields
| Field | Description |
|-------|-------------|
| Context | Maximum number of tokens the model can process in a single request. Larger context means you can feed it more code, docs, or conversation history at once. |
| Input | Cost per 1M tokens sent to the model. This covers your prompts, system instructions, and any attached context. |
| Output | Cost per 1M tokens generated by the model. This covers completions, code suggestions, and reasoning traces. |
| Cache Read | Cost per 1M tokens read from the prompt cache. Cheaper than full input pricing because the model provider already has them in memory. |
| Cache Write | Cost per 1M tokens written to the prompt cache. You pay this once to warm the cache, then subsequent reads are cheaper. |
We always aim to drive the most cost-effective pricing across inputs, outputs,
and cache hits to ensure optimal Hypercredit consumption. Hypercredits are
computed based on total token cost with 1 Hypercredit equating to $0.05.
## Features
Models may have one or more feature badges:
| Badge | Description |
|-------|-------------|
| Reasoning | The model supports extended thinking or chain-of-thought. Useful for complex architecture decisions and multi-step debugging. |
| Attachments | The model accepts image and document uploads alongside text. Handy for screenshots, diagrams, and log files. |
### Attachments in Practice
Image attachments are especially useful in software development scenarios such
as UI development, where you can share screenshots of a broken layout or a
design mockup directly with the model. Visual bug reports, diagram-to-code
workflows, and design review all benefit from sending images alongside your
prompts.
Models that currently support attachments in the Hyper catalog include DeepSeek
V4 Flash and GLM 5.1. Check the model card for the attachment badge to confirm
support before sending images.
Hyper returns an error when sending attachments to models that do not support
them. Always verify that a model has the Attachments badge before including
images or documents in your request.
---
### [Plans & Billing](https://hyper.charm.land/docs/plans-billing)
The Plans & Billing page is where you manage your subscription, review usage
charges, and update your payment method. This page is only accessible to the
team admin or primary account owner. You can reach it from the Hyper dashboard
on the Plans & Billing page.

## Hypercredits Available and Refresh
The top section displays your current Hypercredit balance, split between
**Subscription** credits from your plan and **Prepaid** credits you have
purchased. Subscription credits are spent first, and prepaid credits take over
once they run out.
Subscription Hypercredits refresh every week on Sunday at 00:00 UTC, and the
five-hour rolling window means part of your weekly allocation becomes available
again over time. One Hypercredit equals five cents of inference. See the
[Hyper FAQ](https://hyper.charm.land/faq) for a full explanation of how
Hypercredits work.
## Available Plans
Plans are grouped into **Personal**, **Team**, and **Enterprise** tabs in the
plan selector. Your current plan is highlighted so you can see at a glance
which tier you are on. Every plan includes all available models and the Prism
routing model. For live pricing, see
[hyper.charm.land](https://hyper.charm.land).
### Personal
Personal plans are for solo coding and are billed per month.
| Plan | Price | Hypercredits / week | Inference / week | Hypercredits / 5 hours | Concurrent requests |
|---------------|--------------|---------------------|------------------|------------------------|---------------------|
| Shred Diet | $10 / month | 180 | ≈ $9.00 | 100 | 2 |
| Shred Classic | $20 / month | 250 | ≈ $12.50 | 150 | 3 |
| Shred Energy | $50 / month | 400 | ≈ $20.00 | 250 | 4 |
| Shred Nitro | $100 / month | 690 | ≈ $34.50 | 400 | 8 |
| Shred Animal | $200 / month | 1,200 | ≈ $60.00 | 700 | 12 |
Personal plans are not ZDR (Zero Data Retention).
### Team
Team plans are multi-user and designed for teams, but they work great for solo
users too. They are billed per user, per month, and are always ZDR.
| Plan | Price | Hypercredits / week | Inference / week | Hypercredits / 5 hours | Concurrent requests |
|--------------------|--------------------|---------------------|------------------|------------------------|---------------------|
| Business Casual | $30 / month / user | 180 | ≈ $9.00 | 100 | 2 |
| Business Class | $40 / month / user | 250 | ≈ $12.50 | 150 | 3 |
| Business Platinum | $70 / month / user | 400 | ≈ $20.00 | 250 | 4 |
| Business Diamond | $120 / month / user | 690 | ≈ $34.50 | 400 | 8 |
| Business Champagne | $220 / month / user | 1,200 | ≈ $60.00 | 700 | 12 |
Team plans and prepaid Hypercredits are always ZDR (Zero Data Retention).
### Pay As You Go
Both the Personal and Team tabs offer **Pay As You Go** (PAYG). There is no
subscription: you spend only the prepaid Hypercredits you buy, starting at $5,
and you get all available models, the Prism routing model, ZDR, and no rate
limits.
### Enterprise
Enterprise offers high-performance, open-weight models at a fraction of frontier
pricing, with the data handling and controls your security review will love:
- US inference and data residency
- Fast model availability
- Dedicated instances
- SAML SSO
- Bring your own frontier-lab keys: one gateway for open and closed models
- Per-user quotas and spend caps, request logs, and audit exports
- Datadog Agent Observability
- PostHog LLM Observability
…and more. Talk to us about an Enterprise setup:
- Call [+1 (833) 242-7688](tel:+18332427688)
- Email [enterprise@charm.land](mailto:enterprise@charm.land)
### Upgrading
When you upgrade to a higher-tier plan, your new Hypercredit allocation takes
effect immediately. You gain access to the higher credit limit and any
additional features included in the new tier right away. Your billing cycle
adjusts to reflect the new plan price from the date of upgrade.
### Downgrading

When you downgrade your plan, the change takes effect at the start of your next
billing cycle. You retain access to your current plan's features and credits
until the cycle ends. Any unused Hypercredits from your current plan do not
carry over to the lower tier.
## Hypercredit Bundles
If you need credits beyond your weekly allocation without changing plans, click
**Buy credits** to purchase prepaid Hypercredits. These are one-time purchases
starting at $5 that do not expire, are always ZDR, and stack on top of your
subscription balance.

### Auto Top-up
**Set up auto top-up** keeps your prepaid balance replenished automatically so
you do not run out of credits mid-session. You can review or disable it at any
time from the same section.

## Billing History

The billing history section lists all transactions associated with your account.
Each entry shows the date, description, and amount charged. This includes:
- Recurring subscription charges for your plan
- One-time prepaid Hypercredit purchases
- Auto top-up charges
- Failed recurring payments in the context of a paid subscription
Failed payment attempts appear in your billing history so you can track and
resolve any issues with your payment method. If a recurring payment fails,
update your payment information promptly to avoid service interruption.
Billing is powered by Stripe, so your payment information is handled securely
through their platform.
---
### [Reseller API](https://hyper.charm.land/docs/reseller-api)
This API is provisional, and my change slightly.
This is the reseller API, which allows you to sell Hyper’s inference to your
customers. With the Hyper reseller API you can set your customers balances
(either one time or recurring, like a subscription) and perform token metering
with minimal effort, allowing you to focus on building your application.
The reseller API is not available by default. If you’re interested in
a reseller account, please drop us a note at
[enterprise@charm.land](mailto:enterprise@charm.land).
A reseller account is operated via an admin user on a Hyper team. Each of the
reseller’s customers is a managed user, which behave slightly differently than
normal users on Hyper: they have no email address, can join without an invite,
and can’t sign in. These accounts are created programmatically by you, the
admin.
Also, managed members can only call inference endpoints:
- [`POST /v1/chat/completions`](/api/openai-chat-completions)
- [`POST /v1/messages`](/api/anthropic-messages)
- [`POST /v1/responses`](/api/openai-responses)
All other `/v1` management routes return a `403`.
## A typical workflow
A typical workflow might look like this:
1. [Create a user](#create-a-managed-user)
2. Set the customer's [spend limit](#set-a-member-s-limit), or a team-wide
[default](#set-the-default-limit)
3. [Add an API key](#create-an-api-key) for each customer
4. [Fetch logs](#request-logs) via cron for usage
5. [Fetch usage](#usage) totals against a given timeframe to reconcile
a billing period
Spend limits are set via the API and need no enrollment. A `never` limit is
a prepaid budget that does not reset; `day` and `month` limits reset on the UTC
calendar. Metering happens via the [request log
endpoints](#request-logs). Billing periods can be reconciled with
[Usage](#usage).
## Create a managed user
`POST /v1/teams/{id}/members`
Creates a managed member and adds them to the team.
### Request
| Field | Type | Required | Description |
| ------ | ------ | -------- | -------------------------- |
| `name` | string | yes | Name of the managed member |
| `tags` | object | no | Initial membership tags |
### Tags
`tags` is an optional string-to-string object which you can use to store user-level metadata, e.g.
`{"customer_id": "604f04c"}`. Omitting it creates an empty tag map.
Initial tag values cannot be `null`. The [membership tag limits](#membership-tags)
apply; invalid tags return `400 invalid_request_error`, and creation is
atomic: a failed request does not leave a partially created member.
```bash
curl https://hyper.charm.land/v1/teams/{id}/members \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Beatrix"
}'
```
For more on tags see [Membership Tags](#membership-tags) below.
### Response
`201` with the member. Save the member ID, which you can later pass as
`user_id` when you read that customer's request logs.
## Membership Tags
Tags belong to a user's membership in one team, not to their global account.
The same user can have different tags on different teams. A team admin can
tag any member, including ordinary members and themselves; managed-member
credentials still cannot call management endpoints.
A membership can hold at most 16 tag pairs. Keys must match
`^[a-z0-9_-]{1,64}$`: nonempty, at most 64 characters, using only lowercase
ASCII letters, digits, underscores, and hyphens. Values are strings of at
most 256 Unicode characters; empty strings are allowed. The 16-pair limit
applies to the final merged map, not just the keys sent in an update.
Member listing and creation responses include `tags`, with `{}` when no tags
are set. Removing or deleting a membership loses its tags; rejoining does
not restore them.
### Update a member's name, role, or tags
`PATCH /v1/teams/{id}/members/{user_id}`
Call with a team admin key. The target must be a current member of that
team, whether identified by a full hash, unique hash prefix, or UUID.
`name`, `role`, and `tags` are all optional, but at least one must be supplied.
`role` must be `"admin"` or `"member"`. A `name` that is present and non-blank
renames the member's account; a blank or absent `name` leaves it unchanged, so
names cannot be blanked — only replaced. A tags-only request keeps the name and
role; a role-only request keeps the name and all tags. An admin can update
their own name and tags but cannot change their own role. Managed members
cannot be promoted to admin.
Tag updates merge with the existing map:
- A string adds or replaces that key.
- `null` deletes that key; deleting an absent key is harmless.
- Unmentioned keys are preserved.
- `"tags": {}` is a valid no-op.
Name, role, and tags change atomically. If any change is rejected, none is
applied. Concurrent updates to different tag keys preserve both updates.
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/{user_id} \
-X PATCH \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Beatrix Kiddo",
"tags": {
"customer_id": "beatrix",
"old_label": null
}
}'
```
### Response
`200` with the full updated member, not just the changed fields. Listing,
creation, and updates use the same member shape: `id`, `email`, `name`
(omitted when empty), `role`, `joined_at`, and `tags`.
### Errors
| Status | `error.type` | Cause |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------- |
| 400 | `invalid_request_error` | No field supplied (a blank `name` counts as not supplied), invalid role or tags, or merged map exceeds 16 pairs |
| 403 | `permission_error` | Caller is not a team admin, attempts to change their own role, or promotes a managed member |
| 404 | `not_found_error` | Target is unknown or not a current member of this team |
| 409 | `conflict_error` | Member reference is an ambiguous hash prefix |
## Create an API key
`POST /v1/teams/{id}/members/{user_id}/api-keys`
Create a key for a managed member. Returns `201` with the `sk-hyper-` secret.
This is the only time the secret will be displayed.
Returns `403` if the target is not a managed member.
### Request
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/{user_id}/api-keys \
-X POST \
-H "Authorization: Bearer $HYPER_API_KEY"
```
## List API keys
`GET /v1/teams/{id}/members/{user_id}/api-keys`
Lists that member's keys. The key value itself is not shown.
### Request
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/{user_id}/api-keys \
-H "Authorization: Bearer $HYPER_API_KEY"
```
### Response
`200` with the member's keys, secrets not included.
```json
{
"items": [
{
"id": "7c1e9a04b2d6f831",
"name": "storefront",
"expires_at": "2027-01-15T10:30:00Z",
"last_used_at": "2026-02-01T08:00:00Z",
"created_at": "2026-01-15T10:30:00Z"
}
]
}
```
`last_used_at` is omitted for keys that have never been used, and `revoked_at` appears only on revoked keys.
## Revoke an API key
`DELETE /v1/teams/{id}/members/{user_id}/api-keys/{key_id}`
Revokes a key. Inference calls with that key then return `401`.
### Request
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/{user_id}/api-keys/{key_id} \
-X DELETE \
-H "Authorization: Bearer $HYPER_API_KEY"
```
## Remove a managed user
`DELETE /v1/teams/{id}/members/{user_id}`
Removes a managed user from the team.
### Request
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/{user_id} \
-X DELETE \
-H "Authorization: Bearer $HYPER_API_KEY"
```
## Spend limits
A spend limit caps what a customer may spend at list price, in USD. Limits
come in two scopes:
- A **member limit** for one managed member
- A **team default** that covers every managed member of the team who has
no member limit of their own
A member limit replaces the default for that member while it is active.
Clearing it removes the override, and the member falls back to the default's
current budget on the next read, though inference can take up to about a
minute to catch up (see [Enforcement](#enforcement)). Switching its period
retires the old limit and starts a fresh override, so the default still does
not apply.
All spend limit routes require a team admin key, and they act on managed
members only: pointing one at an ordinary member is a `403`. No team
enrollment is involved: a limit can be set as soon as the managed member
exists. A limit is a spending cap, not a second balance: charges still
come from the team's single credit balance, and team billing is unchanged.
A cap on the team's combined spend is a separate, staff-managed setting
with no public route: `GET` or `PUT /v1/teams/{id}/limit` is not part of
this API. It applies independently of any member limit.
### Periods
| Period | Budget | Resets |
| ------- | ------------------------------------------- | --------------------------- |
| `day` | `amount_usd` | Start of the next UTC day |
| `month` | `amount_usd` | Start of the next UTC month |
| `never` | The credit total: every entry in its ledger | Never |
Day and month windows follow the UTC calendar. Spend counts from the start
of the current window, or from the limit's `starts_at` if that timestamp
falls inside the window: a limit set mid-day or mid-month starts counting
right away and still resets on the calendar boundary. A `never` limit
counts spend from its own `starts_at` and never resets.
`starts_at` is a full RFC 3339 timestamp. Omit it and the limit takes the
moment of its creation; later amount changes never move it.
### Amounts
`amount_usd` is a non-negative plain decimal in USD, sent as a JSON number
or a quoted string such as `"50.00"` for clients that cannot emit exact
JSON numbers. It may carry at most 10 digits before the decimal point and
9 after it, and it is stored and echoed back exactly, so budgets are
precise to nano-USD and no rounding ever happens. Exponent notation, more
precision, a negative amount, trailing data, or a second JSON value in the
body is a `400`, never a rounded cap. The body must be a single JSON
object.
Only spend limits carry this precision. No other amount in the API
changes.
Responses report every spend-limit USD field as a JSON number in plain
fixed-point form: no exponent, at most 10 fractional digits, and trailing
zeros trimmed, so a whole-dollar cap reads `50`, not `50.00`.
A `0` amount never blocks a member on its own: what blocks is a remaining
budget of `0` or less. For `day` and `month` a `0` cap blocks right away,
since nothing can be spent under it. For `never`, `amount_usd` is only the
base of the credit total — setting it to `0` leaves every credit the limit
already has, so a base of 100 with a top-up of 20 still leaves 20 to spend
after a PUT of `0` — while a fresh `never` limit created at `0` has no
credits and blocks. Blocking is subject to fail-open: when spend cannot be
read, the member is not blocked.
### Credits
A `never` limit's budget is a credit total, and it is only ever adjusted
by appending:
- Creating the limit grants its base amount as credit.
- Changing the base amount appends a single signed adjustment for the
difference; sending the same amount again appends nothing, so a lost or
retried PUT cannot grant credit twice.
- A top-up appends more credit without changing the base amount or
`starts_at`.
- Recorded spend is never rewritten: the budget is always the credit total
minus the member's spend since `starts_at`.
Day and month limits never receive credits: a top-up aimed at one is a
`409`.
The team default carries exactly one credit total, shared by every managed
member who resolves to it. It is not a pool to slice: each such member may
spend up to the whole current total on their own account, and a top-up to
the default raises that total for all of them at once. Nothing is
materialized per member, so covering the team's managed members writes no
rows for them.
Retiring a limit — clearing it from the dashboard, or setting a limit of a
different period — keeps every ledger row. A later `never` limit starts
fresh and counts only its own credits.
The stored history is append-only beyond the API rules above: a ledger
row cannot be edited or deleted in place, and a correction is itself a
new entry that reverses an earlier one. Entries stay bound to the limit
they were credited to, and for a member limit to that member.
### Enforcement
The budget is read before each request, so the request that crosses the
cap completes and is charged, and the block lands on the next one. A
member at or over the cap is blocked from inference with `402`.
Concurrent requests and ClickHouse replication lag can also let spend run
past a cap. This is not a reservation and not a hard prepaid balance.
If spend cannot be read, the check fails open rather than blocking a
working customer on unknown spend. Reads then answer `null` for
`spent_usd` and `remaining_usd` — never `0` — and inference responses
carry no limit headers. Unknown spend is never treated as zero.
The active limit configuration, including its amount, period, and
`starts_at`, is decided from a short-lived snapshot that each inference
process refreshes about once every 60 seconds. A configuration change,
whether setting a limit, editing its amount, replacing or clearing it,
changing its `starts_at`, or changing the team default, can therefore
take up to about a minute to reach enforcement, so a member is not
blocked or unblocked the instant their limit changes. The snapshot
covers configuration only: ledger credit totals and spend are read fresh
on every request, so a later inference read sees a top-up to a limit
that is already in effect without waiting for the snapshot to refresh.
The 60 seconds is a figure for normal operation, not a bound that holds
during a database outage, when the fail-open behavior described above
applies.
When a member's budget can be read, inference responses carry it in
headers: `X-Allowance-Limit` and `X-Allowance-Remaining` for a `never`
budget, `X-Quota-Limit-User` and `X-Quota-Remaining-User` for a day or
month one, plus `X-Quota-Period-End` when the window has a reset.
Spend is metered hourly, and the part-hour a window starts in is summed
from raw request rows, which are kept for five years. For a `never` limit
whose `starts_at` is older than that retained window, spend from the
expired portion — including the partial hour at the boundary — is
unrecoverable, so a budget that old can undercount history. Within the
retained window the figures are exact.
### Set the default limit
`PUT /v1/teams/{id}/limits/default`
| Field | Type | Required | Description |
| ------------ | ---------------- | -------- | ----------------------------------------------------------- |
| `period` | string | yes | `day`, `month`, or `never` |
| `amount_usd` | number or string | yes | The cap in USD, exact to 9 fractional digits |
| `starts_at` | string | no | Full RFC 3339 timestamp. Defaults to the moment of creation |
```bash
curl https://hyper.charm.land/v1/teams/{id}/limits/default \
-X PUT \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"period": "never",
"amount_usd": 100
}'
```
`200` with the limit. `credit_total_usd` is the shared credit total behind
a `never` budget and appears only for that period.
```json
{
"team_id": "5bd29dbdcddbc25c",
"scope": "user_default",
"period": "never",
"amount_usd": 100,
"starts_at": "2026-01-15T10:30:00Z",
"credit_total_usd": 100
}
```
There is no `spent_usd` here: the default resolves per member, so there is
no single spend figure to report without naming one.
Switching the default to a different period retires the old limit and
starts a fresh one, which counts only its own credits.
### Read the default limit
`GET /v1/teams/{id}/limits/default`
Answers with the same object as the PUT above. Add `member` — a member
hash, unique hash prefix, or full UUID — to resolve the default for one
managed member, the same way the enforcement check computes it:
```bash
curl "https://hyper.charm.land/v1/teams/{id}/limits/default?member=a94a8fe5ccb19ba6" \
-H "Authorization: Bearer $HYPER_API_KEY"
```
```json
{
"team_id": "5bd29dbdcddbc25c",
"user_id": "a94a8fe5ccb19ba6",
"scope": "user_default",
"period": "never",
"amount_usd": 100,
"starts_at": "2026-01-15T10:30:00Z",
"credit_total_usd": 110,
"spent_usd": 12.4,
"remaining_usd": 97.6
}
```
`scope` stays `user_default` even when the member has a limit of their own
that overrides the default at inference time, so this is always the
default's budget, never the member's; use the member route for the budget
that governs. The target must be a managed member of the team: `403` for
any other member, `404` for anyone outside it, including a full UUID.
### Set a member's limit
`PUT /v1/teams/{id}/members/{user_id}/limit`
Same body as the default, for one managed member. The member limit
replaces the team default while it is active.
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/a94a8fe5ccb19ba6/limit \
-X PUT \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"period": "never",
"amount_usd": 50
}'
```
`200` with the member's limit and budget:
```json
{
"team_id": "5bd29dbdcddbc25c",
"user_id": "a94a8fe5ccb19ba6",
"scope": "user",
"period": "never",
"amount_usd": 50,
"starts_at": "2026-01-15T10:30:00Z",
"credit_total_usd": 50,
"spent_usd": 12.4,
"remaining_usd": 37.6
}
```
`remaining_usd` is not clamped at zero: a negative figure means the member
has run past the budget and is blocked until the budget rises or the
window resets.
### Read a member's limit
`GET /v1/teams/{id}/members/{user_id}/limit`
The budget that governs the member: their own limit if one is active,
otherwise the team default. `scope` says which, `user` or `user_default`.
A managed member with neither has no cap: `404`. A non-managed member is
`403`, even when a limit exists for them from outside this API.
`spent_usd` counts the member's list-price spend from `starts_at`, or over
the current UTC window for `day` and `month`. `remaining_usd` is the credit
total minus that spend for a `never` limit, and the amount minus it for
`day` and `month`. Both are exact decimals, and `null` when spend cannot
be read.
### Top up credits
`POST /v1/teams/{id}/members/{user_id}/limit/credits`
`POST /v1/teams/{id}/limits/default/credits`
Appends a positive credit to a `never` limit without changing its base
amount or `starts_at`. A top-up to the default raises the shared total for
every member who resolves to it. Requires an `Idempotency-Key` header,
unique across all credits, and a positive `amount_usd`:
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/a94a8fe5ccb19ba6/limit/credits \
-X POST \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Idempotency-Key: 9c9b1ef7" \
-H "Content-Type: application/json" \
-d '{
"amount_usd": 10
}'
```
`201` with the ledger row; `user_id` appears only on the member route.
```json
{
"team_id": "5bd29dbdcddbc25c",
"user_id": "a94a8fe5ccb19ba6",
"scope": "user",
"id": "9f2a71c04bb00a3e",
"amount_usd": 10,
"reason": "topup",
"created_at": "2026-01-15T10:30:00Z"
}
```
Retrying with the same `Idempotency-Key` returns the original row with
`200` and appends nothing, including after the limit it credited has been
retired or replaced, so a retry can never grant the credit twice. A key
reused for a different credit — another amount, member, or limit — returns
`409`, and the key itself is never echoed back. Top-ups on a `day` or
`month` limit are a `409`. A top-up whose route has no active limit is a
`404`.
### Use a limit as a credit balance
For prepaid-style billing, give a customer a `never` member limit and
treat it as their balance. Set the opening amount with a PUT:
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/a94a8fe5ccb19ba6/limit \
-X PUT \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"period": "never",
"amount_usd": 100
}'
```
Refill with the top-up route:
```bash
curl https://hyper.charm.land/v1/teams/{id}/members/a94a8fe5ccb19ba6/limit/credits \
-X POST \
-H "Authorization: Bearer $HYPER_API_KEY" \
-H "Idempotency-Key: 1d3e77c4" \
-H "Content-Type: application/json" \
-d '{
"amount_usd": 25
}'
```
Read the balance with [GET /v1/teams/{id}/members/{user_id}/limit](#read-a-member-s-limit).
After the top-up the credit total is 125: the sum of the ledger, which
opened with the 100 grant and now includes the 25 top-up.
```json
{
"team_id": "5bd29dbdcddbc25c",
"user_id": "a94a8fe5ccb19ba6",
"scope": "user",
"period": "never",
"amount_usd": 100,
"starts_at": "2026-01-15T10:30:00Z",
"credit_total_usd": 125,
"spent_usd": 12.4,
"remaining_usd": 112.6
}
```
`credit_total_usd` is that ledger sum: the initial grant, later base
adjustments, and your top-ups. `spent_usd` is the member's spend since
`starts_at`, and `remaining_usd` is the difference. A `never` limit has
no reset window, and in this workflow, with the base amount and
`starts_at` left as created, the balance moves only when the member
spends or you top it up. Once `remaining_usd` is `0` or less the member
is blocked from inference with `402`, with the soft edges described in
[Enforcement](#enforcement).
The balance is accounting, not money: a top-up appends a credit to the
ledger, moves no funds, charges no card, and buys no credits for the
team. Inference is still paid from the team's single credit balance, so
that balance must stay funded for the member's requests to succeed, and
team billing is unchanged.
Refill only with the top-up route, and avoid these:
- PUT as the refill call. A same-period PUT does not retire the limit:
it adjusts the base amount and appends only the difference, which can
raise, lower, or leave the credit total as it is. Either way, refills
recorded this way read as changes to the opening grant rather than as
top-ups, blurring the ledger, while the top-up route labels each refill
as its own credit.
- Moving the clock. Omitting `starts_at` on a later PUT preserves it;
supplying one replaces it. Leave it unchanged when refilling: a
`never` limit counts spend from its own `starts_at`, so moving it
forward drops earlier spend from the tally and hands the member back
what they already spent.
- Replacing or clearing the limit as a refill. A PUT of a different
period, or clearing the override and setting it again, retires the old
limit: its ledger is kept, but the replacement counts only its own
credits, so the customer's leftover balance does not carry over.
Clearing the override without replacing it just falls the member back
to the team default's budget, if one is set.
Keep a wallet on a member limit. The team default's credit total is
shared by every managed member who resolves to it and applies in full to
each one, so a top-up to the default raises everyone's budget at once:
it works as a cap, not as one customer's balance. Precision follows
[Amounts](#amounts): writes are exact to 9 fractional digits, while
`spent_usd` and `remaining_usd` can carry up to 10.
### Errors
| Status | `error.type` | Cause |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 400 | `invalid_request_error` | Missing or invalid period, amount, or `starts_at`; missing or over-long `Idempotency-Key`; non-positive credit; body is not a single JSON object |
| 403 | `permission_error` | Caller is not a team admin, or the member is not managed |
| 404 | `not_found_error` | Unknown team, member, or limit, including a member of another team |
| 409 | `conflict_error` | Idempotency key reused for a different credit, or a top-up on a `day` or `month` limit |
Rejected requests write nothing.
## Errors
Errors use the same body as the other JSON endpoints:
```json
{
"error": {
"message": "...",
"type": "...",
"code": null
}
}
```
| Status | `error.type` | Cause |
| ------ | ---------------------- | -------------------------- |
| 401 | `authentication_error` | Missing or invalid API key |
| 403 | `permission_error` | Caller is not a team admin |
| 5xx | `server_error` | Internal error |
Creating a key for someone who is not a managed member returns `403`.
## Request Logs
Request logs return usage from a user. Each entry is one completed inference request, newest first. A `since`/`until`
window cannot exceed 90 days.
Call these with your team admin key. `user_id` is the member id returned when
you created the managed member. That is how you map a row to a customer.
Managed members have no email, so their rows do not include one.
`GET /v1/teams/{id}/logs?user_id=`
`GET /v1/teams/{id}/logs/{user_id}`
### Request
```bash
curl "https://hyper.charm.land/v1/teams/{id}/logs?user_id=a94a8fe5ccb19ba6&since=2026-01-15T00%3A00%3A00Z" \
-H "Authorization: Bearer $HYPER_API_KEY"
```
One page of the team-wide log stream:
```bash
curl "https://hyper.charm.land/v1/teams/{id}/logs?since=2026-01-15T00%3A00%3A00Z&limit=100" \
-H "Authorization: Bearer $HYPER_API_KEY"
```
To fetch the next page, pass `next_cursor` from the response as `cursor` on that same request.
| Parameter | Description |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit` | Items per page (default 20, max 100) |
| `cursor` | Pagination cursor from the previous response's `next_cursor` |
| `since` | RFC 3339 lower bound (default: 24 hours ago) |
| `until` | RFC 3339 upper bound (default: now) |
| `model` | Filter by exact model name. Any name a row can display works: the model ID you request (e.g. `glm-5.2`), a router alias (e.g. `auto`), the `routed_model` a router picked, or the provider's own name for a model (e.g. `baseten/zai-org/GLM-5.2`) |
| `user_id` | Filter by team member (full hash, unique prefix, or UUID) |
The path form `GET /v1/teams/{id}/logs/{user_id}` takes the same parameters
except `user_id`, which is already in the path.
### Paging
When more rows remain, the response includes `next_cursor`. Pass that value as
`cursor` on the next request with the same filters and time window. Stop when
`next_cursor` is absent.
Logs are ordered by `(timestamp DESC, request_id DESC)`. The opaque cursor
contains both values so new rows sharing a timestamp paginate without gaps.
Old timestamp-only cursors are still accepted. A cursor ending on a
historical row without a request ID retains the old timestamp-only
boundary: other historical rows in that same second can be skipped. Exact
pagination is not guaranteed for those rows. When switching from an old
cursor to identified requests, restart an overlapping time window.
### Response
The example includes the `user.tags` field.
```json
{
"items": [
{
"request_id": "3f2a9c1e-7b04-4d11-9a6e-1c8b0d4e2f77",
"timestamp": "2026-01-15T10:30:00Z",
"user": {
"id": "a94a8fe5ccb19ba6",
"tags": { "customer_id": "beatrix" }
},
"model": "auto",
"hypercredits": 16.8,
"usd": 0.84,
"input_tokens": 1240,
"output_tokens": 512,
"cache_create_tokens": 0,
"cache_hit_tokens": 300,
"routed_model": "prism",
"savings_hypercredits": 0.36,
"savings_usd": 0.018
}
],
"next_cursor": "eyJ0aW1lc3RhbXAiOi..."
}
```
`request_id` is a stable, unique UUID for recorded requests. It is
generated once per incoming request, reused across provider retries, and
stays the same on every fetch. This guarantee is forward-only:
historical rows remain readable but omit `request_id`. They are not
backfilled, and their stored zero UUID is not an identity.
`timestamp` is when the request completed. `user.id` is the managed member.
`model` is the model name for that request. `usd` is the list price in US
dollars, and `hypercredits` is the amount charged. Hypercredit fields may be
omitted on some accounts. `input_tokens` and `output_tokens` are the tokens in
and out. `cache_create_tokens` and `cache_hit_tokens` are cache tokens written
and read. `routed_model`, `savings_usd`, and `savings_hypercredits` appear only
when the auto router handled the request. `routed_model` is the model the
router chose, and the savings fields are how much that choice saved.
`user.tags` contains the user's current membership tags in
the requested team. Tags are read when logs are fetched, not stored as
inference-time snapshots in ClickHouse. Changing tags therefore changes
subsequent reads of older logs too. An untagged, missing, or deleted
membership returns `{}`; tags from other teams are never included.
Removing a membership does not remove an existing account's identity
fields. Tags cannot be used as log filters.
### Metering
Poll on a schedule, for example once an hour. Set `since` a few minutes before
your last checkpoint to pick up late-arriving rows. Keep `since` and `until`
fixed while paging with `cursor` until `next_cursor` is absent. For rows with
a `request_id`, skip IDs you have already recorded to avoid counting a
request twice. Sum `input_tokens`, `output_tokens`, and `usd` per `user.id`,
and store a new checkpoint from the latest `timestamp` you saw.
Do not deduplicate historical rows without IDs by their contents: identical
rows may be distinct requests. Exact identity-based deduplication is not
available for those rows. Use [Usage](#usage) to reconcile totals for a
billing period, including historical windows and rows arriving later than
your polling overlap. If you are catching up over a longer gap, split the
range into windows of at most 90 days.
To meter many customers, use the team-wide endpoints: one logs stream for all
members, grouped by `user.id`, and one usage call without `user_id`. Don't
call the per-member logs endpoint once per customer.
### Errors
| Status | Cause |
| ------ | --------------------------------------- |
| 400 | Invalid timestamps, cursors, or windows |
| 403 | Caller is not a team admin |
| 404 | `user_id` does not match a team member |
## Usage
`GET /v1/teams/{id}/usage`
Returns usage totals for each managed member in a time range. Use it to
reconcile a billing period against the totals you metered from
[Request logs](#request-logs).
Call it with a team admin key. A non-admin caller gets `403`
`permission_error`. A managed member key gets `403`, the same as other
management routes.
### Request
`since` and `until` match request logs: RFC 3339 timestamps, defaulting to the
last 24 hours. The window cannot exceed 90 days.
One customer:
```bash
curl "https://hyper.charm.land/v1/teams/{id}/usage?since=2026-01-01T00%3A00%3A00Z&until=2026-02-01T00%3A00%3A00Z&user_id=a94a8fe5ccb19ba6" \
-H "Authorization: Bearer $HYPER_API_KEY"
```
The same call without `user_id` returns totals for every member:
```bash
curl "https://hyper.charm.land/v1/teams/{id}/usage?since=2026-01-01T00%3A00%3A00Z&until=2026-02-01T00%3A00%3A00Z" \
-H "Authorization: Bearer $HYPER_API_KEY"
```
| Parameter | Type | Required | Description |
| --------- | ------ | -------- | ---------------------------------------------- |
| `since` | string | no | RFC 3339 lower bound. Defaults to 24 hours ago |
| `until` | string | no | RFC 3339 upper bound. Defaults to now |
| `user_id` | string | no | Return just one member |
### Response
`cost_usd` is the cost at list price, in USD. `since` and `until` echo the range.
The example includes the flat `tags` field on each usage row.
It contains current membership tags for the requested team, with the same
read-time behavior as `user.tags` in logs. Untagged, missing, or deleted
memberships return `{}`, including for historical usage. An existing
account's name remains available independently of membership. Tags from
other teams are never included, and tags cannot be used as usage filters.
```json
{
"since": "2026-01-01T00:00:00Z",
"until": "2026-02-01T00:00:00Z",
"usage": [
{
"user_id": "a94a8fe5ccb19ba6",
"name": "Beatrix",
"tags": { "customer_id": "beatrix" },
"requests": 42,
"input_tokens": 12000,
"output_tokens": 3000,
"cost_usd": 0.18
}
]
}
```
---
### [Settings](https://hyper.charm.land/docs/settings)
The Settings page lets you manage your Hyper profile and
account. You can access it from the Hyper dashboard or directly at
[hyper.charm.land/app/settings](https://hyper.charm.land/app/settings).

## Edit Display Name
Your display name appears across the Hyper dashboard and in team member lists.
Click the edit button next to your name to update it. Changes take effect
immediately.
## Manage Connected Crush Devices
If you use Crush with Hyper, this section shows all the devices currently linked
to your account. You can view device names, last active timestamps, and revoke
access for any device you no longer use. Revoking a device invalidates its
authentication token immediately.

You can find it at [hyper.charm.land/app/api-keys/devices](https://hyper.charm.land/app/api-keys/devices) not the settings page.
## Sign Out
Signing out ends your current Hyper session across the dashboard and any
connected integrations. You will need to sign in again to access your account.
## Delete Account
You can permanently delete your Hyper account from the Settings page. This
action is irreversible.
In accordance with our GDPR policy, once you delete your account all of your
data is removed within 30 days. During that period your account is deactivated
and inaccessible. After the 30-day retention window expires, all personal data,
usage history, and API keys are permanently purged from our systems.
---
### [Team](https://hyper.charm.land/docs/team)
Team administration features are available to team admins and the primary Hyper
account owner. The primary account owner can invite other team members and
manage billing for the Hyper account.

## Team Management
Team admins can invite new members or remove existing members from the team at
any time. To invite someone, navigate to the Team page, click "Invite member" and enter their email
address. They will receive an invitation to join your organization.
Admins can also delegate administration capabilities to other members by
upgrading their role from team member to team admin. This grants them full
access to team management and billing controls.
---
### [Crush](https://hyper.charm.land/docs/coding-agents/crush)
## Setup
1. Install [Crush](https://charm.land/crush) and run `crush`.
2. At the model picker, select **Hyper**.
3. Crush opens a browser tab to `hyper.charm.land`.
4. Log in (or sign up) and copy the device code back into Crush.
5. Pick a model. Done.
That's it. You're ready to start sending prompts!
## Environment Variable
You can also set `HYPER_API_KEY` and Crush will detect it automatically:
```bash
export HYPER_API_KEY="sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
```
---
### [Pi](https://hyper.charm.land/docs/coding-agents/pi)
[Pi](https://pi.dev) is Earendil Works' minimal coding harness which you adapt
to your workflows. It ships with solid basics and you make it do what you need
from there through extensions. Route it through Hyper using our [OpenAI
Completions](/api/openai-chat-completions) endpoints.
## Prerequisites
- A Hyper account
- [Pi](https://pi.dev) installed
## Configuration
Add our provider extension with:
```bash
pi install npm:@charmland/pi-hyper-provider
```
Run `pi`, send `/login`, then use arrow keys and enter to pick `Subscription`
and select the `Charm Hyper` provider. Follow the instructions shown in Pi to
log in with OAuth.
Model info is fetched at startup and cached locally; the cache is used as a
fallback if there's an error communicating with the [List
Models](/api/list-models) endpoint. By default, your remaining Hypercredit
balance is shown in the status line while a Hyper model is active.
Send `/hyper-status` to configure the status line interactively and toggle
things on/off or reset to the defaults. `teamName` defaults to `false` and
`hypercredits` defaults to `true`. You can also set values directly:
```sh
/hyper-status teamName true
/hyper-status hypercredits false
/hyper-status reset
```
As of v83, Pi only creates and updates provider extensions' model caches when
launched interactively. If you mostly use Pi in headless or non-interactive
environments, open the TUI whenever you want to get new models or updated
metadata.
## Running Pi
After authenticating with either OAuth or API key, start Pi normally:
```bash
pi
```
And press `Ctrl`+`L` or send `/model` to list available models, type `hyper` to
filter for Hyper models, or `model-name` to filter for a specific model.
---
### [Zed](https://hyper.charm.land/docs/coding-agents/zed)
[Zed](https://zed.dev) is minimal code editor built for speed and collaboration
with humans and AI. [Crush](/coding-agents/crush) works great in Zed's [Terminal
Threads](https://zed.dev/docs/ai/terminal-threads) and supports Hyper out of the
box!
Zed also has a built-in LLM harness you can use with Hyper through our [OpenAI
Responses](/api/openai-responses) endpoints.
## Prerequisites
- A Hyper account with an API key
- [Zed](https://zed.dev) installed
## Using Crush in Terminal Threads
[Set Crush up](/coding-agents/crush), start Zed normally, open the agent panel, click the
`+` icon in the top right of the agent panel, and select `Terminal`. This
creates a new thread in the thread sidebar. In that terminal, run `crush`.
## Using Hyper in the Zed Agent
This requires both adding some configuration to your settings file and pasting
your API key into the Zed UI so Zed can store it encrypted in your system
keychain.
### Configuration
Open the command palette, search for and run `zed: open settings file`, add
the following configuration, then save:
[//]: # "model-config:zed:start"
```json
{
"language_models": {
"openai_compatible": {
"hyper": {
"api_url": "https://hyper.charm.land/v1",
"available_models": [
{
"name": "prism",
"display_name": "Prism",
"max_tokens": 1000000,
"max_completion_tokens": 131072,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": false,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "prism-core",
"display_name": "Prism Core",
"max_tokens": 1000000,
"max_completion_tokens": 131072,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": false,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "prism-flash",
"display_name": "Prism Flash",
"max_tokens": 1000000,
"max_completion_tokens": 131072,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": false,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "deepseek-v4.1-flash-1017",
"display_name": "DeepSeek V4.1 Flash 1017",
"max_tokens": 1000000,
"max_completion_tokens": 262144,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "deepseek-v4.1-flash-1017-economy",
"display_name": "DeepSeek V4.1 Flash 1017 (Economy)",
"max_tokens": 1000000,
"max_completion_tokens": 384000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "deepseek-v4-pro-0813",
"display_name": "DeepSeek V4 Pro 0813",
"max_tokens": 1000000,
"max_completion_tokens": 262144,
"capabilities": {
"chat_completions": false,
"images": false,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "kimi-k3.1-pro",
"display_name": "Kimi K3.1 Pro",
"max_tokens": 1000000,
"max_completion_tokens": 262144,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "kimi-k3",
"display_name": "Kimi K3",
"max_tokens": 1048576,
"max_completion_tokens": 16000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "glm-5.3",
"display_name": "GLM 5.3",
"max_tokens": 1000000,
"max_completion_tokens": 128000,
"capabilities": {
"chat_completions": false,
"images": false,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "glm-5.3-flash",
"display_name": "GLM 5.3 Flash",
"max_tokens": 1048576,
"max_completion_tokens": 131072,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "minimax-m3",
"display_name": "MiniMax M3",
"max_tokens": 512000,
"max_completion_tokens": 512000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "qwen4-max",
"display_name": "Qwen4-Max",
"max_tokens": 1000000,
"max_completion_tokens": 128000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "qwen3.8-max",
"display_name": "Qwen3.8-Max",
"max_tokens": 1000000,
"max_completion_tokens": 65536,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "qwen3.8-flash",
"display_name": "Qwen3.8-Flash",
"max_tokens": 1000000,
"max_completion_tokens": 128000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "qwen3.8-27b",
"display_name": "Qwen3.8-27B",
"max_tokens": 1000000,
"max_completion_tokens": 128000,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "qwen3.8-2.4t-a95b",
"display_name": "Qwen3.8-2.4T-A95B",
"max_tokens": 1000000,
"max_completion_tokens": 128000,
"capabilities": {
"chat_completions": false,
"images": false,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "gpt-oss-120b",
"display_name": "gpt-oss-120b",
"max_tokens": 131072,
"max_completion_tokens": 13107,
"capabilities": {
"chat_completions": false,
"images": false,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "gemma-4-26b-a4b-it",
"display_name": "Gemma 4 26B A4B",
"max_tokens": 256000,
"max_completion_tokens": 25600,
"capabilities": {
"chat_completions": false,
"images": false,
"interleaved_reasoning": false,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
},
{
"name": "muse-spark-open",
"display_name": "Muse Spark Open",
"max_tokens": 1048576,
"max_completion_tokens": 1048576,
"capabilities": {
"chat_completions": false,
"images": true,
"interleaved_reasoning": true,
"tools": true,
"parallel_tool_calls": true,
"prompt_cache_key": false
}
}
]
}
}
}
}
```
[//]: # "model-config:zed:end"
You can also configure which model is used for which particular feature to
better optimise costs for your situation. Here's an example with sensible
defaults:
```jsonc
{
"agent": {
"default_model": {
"provider": "hyper",
"model": "prism",
},
"inline_assistant_model": {
"provider": "hyper",
"model": "prism-flash",
},
"commit_message_model": {
"provider": "hyper",
"model": "prism-flash",
},
"thread_summary_model": {
"provider": "hyper",
"model": "prism-flash",
},
"subagent_model": {
"provider": "hyper",
"model": "prism-core",
},
// This is *in addition to* inline_assistant_model, and your inline
// request would be sent to both models at once.
// "inline_alternatives": [
// {
// "provider": "hyper",
// "model": "prism-flash"
// }
// ]
},
}
```
### Authentication
Open the command palette, search for and run `agent: open settings`, scroll down
to the `LLM Providers` section, find Hyper, and paste your API key in the field.
Zed stores this key encrypted in your system keychain.
### Selecting a Hyper model and creating a new thread
Start Zed normally, open the agent panel, click the `+` icon in the top right of
the agent panel, and select `Zed Agent`. In the model picker in the bottom
right, look for the Hyper provider section and select a model from that section.
---
### [Claude Code](https://hyper.charm.land/docs/coding-agents/claude-code)
Claude Code is Anthropic's terminal agent. Route it through Hyper using our
[Anthropic Messages API](/api/anthropic-messages) endpoints.
## Prerequisites
- A Hyper account with an API key
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
## Configuration
### Option 1: Settings file (recommended)
Add this to `~/.claude/settings.json`. This persists across sessions without
needing shell env vars:
```json
{
"env": {
"ANTHROPIC_BASE_URL": "https://hyper.charm.land",
"ANTHROPIC_API_KEY": "sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx",
"ANTHROPIC_MODEL": "deepseek-v4-pro",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3.7-max",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-flash"
}
}
```
The alias variables let you use Claude Code's built-in `/model sonnet` and
`/model haiku` commands with Hyper models:
| Alias | Env Var | Suggested Model |
|-------|---------|-----------------|
| `sonnet` | `ANTHROPIC_DEFAULT_SONNET_MODEL` | A strong mid-tier model for daily coding |
| `haiku` | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | A fast model for quick tasks and subagents |
You can also set `CLAUDE_CODE_SUBAGENT_MODEL` to route all subagent work to a
cheaper model:
```json
{
"env": {
"CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-v4-flash"
}
}
```
### Option 2: Environment variables
If you prefer shell config over a settings file:
```bash
export ANTHROPIC_BASE_URL="https://hyper.charm.land"
export ANTHROPIC_API_KEY="sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
export ANTHROPIC_MODEL="deepseek-v4-pro"
export ANTHROPIC_DEFAULT_SONNET_MODEL="qwen3.7-max"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
```
## Running Claude Code
With configuration in place, start Claude Code normally:
```bash
claude
```
Use `/model` to switch between your configured aliases mid-session. All model
names map to the Hyper catalog.
---
### [Codex](https://hyper.charm.land/docs/coding-agents/codex)
Codex is OpenAI's CLI coding agent. Point it at Hyper's [Responses API
endpoints](/api/openai-responses) and use the same models with your
Hypercredits.
## Prerequisites
- A Hyper account with an API key
- [Codex](https://github.com/openai/codex) installed
## Configuration
Add this to `~/.codex/config.toml`:
```toml
model = "deepseek-v4-pro"
model_provider = "hyper"
model_context_window = 131072
[model_providers.hyper]
name = "Hyper"
base_url = "https://hyper.charm.land/v1"
env_key = "HYPER_API_KEY"
wire_api = "responses"
```
## Running Codex
### Codex CLI
```bash
export HYPER_API_KEY="sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
codex
```
### Codex Desktop
```bash
export HYPER_API_KEY="sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
open /Applications/Codex.app
```
---
### [OpenCode](https://hyper.charm.land/docs/coding-agents/opencode)
OpenCode is an open source agent that helps you write code in your terminal,
IDE, or desktop. Route it through Hyper using our [OpenAI Chat
Completions](/api/openai-chat-completions) endpoints.
## Prerequisites
- A Hyper account with an API key
- [OpenCode](https://opencode.ai) installed
## Usage
1. Run `opencode`.
2. Open Commands (ctrl+p).
3. Choose `Connect Provider` and then search for `Charm Hyper` to paste your
Hyper API key.
4. Type `/models`, search for `Charm Hyper` to see our models and choose one.



---
### [Authentication](https://hyper.charm.land/docs/api/authentication)
Hyper API keys are prefixes with `sk-hyper-`. Get one from the
[Hyper Dashboard](https://hyper.charm.land/app/api-keys).
To authenticate, use the `Authorization` header:
```
Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx
```
For compatibility with [Claude Code](/coding-agents/claude-code) and other
compatible agents, the `/v1/messages` endpoint also supports the `X-Api-Key`
header for authentication.
```
X-Api-Key: sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx
```
## Public Endpoints
The `/v1/models` endpoint is public and doesn't require an API key:
- [`GET /v1/models`](/api/list-models)
## Errors
If unauthorized, you'll get a 401 with the follow response bodies.
`/v1/models`, `/v1/chat/completions` and `/v1/responses`:
```json
{
"error": {
"message": "invalid api key",
"type": "invalid_request_error",
"code": null
}
}
```
`/messages`:
```json
{
"type": "error",
"error": {
"type": "authentication_error",
"message": "invalid api key"
}
}
```
---
### [OpenAI Chat Completions](https://hyper.charm.land/docs/api/openai-chat-completions)
`POST /v1/chat/completions`
OpenAI-compatible chat completions. All standard parameters are accepted
(`temperature`, `max_tokens`, `tools`, `top_p`, `stop`, etc.).
See [OpenAI's documentation](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)
for the full request and response specification.
## Request
```bash
curl https://hyper.charm.land/v1/chat/completions \
-H "Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "prism",
"messages": [
{"role": "system", "content": "You are helpful."},
{"role": "user", "content": "Hello!"}
]
}'
```
| Field | Type | Required | Description |
| ------------- | ------- | -------- | ---------------------------------------------- |
| `model` | string | yes | Model ID from [`/v1/models`](/api/list-models) |
| `messages` | array | yes | Array of message objects |
| `stream` | boolean | no | Set `true` for SSE streaming (default `false`) |
| `temperature` | number | no | 0–2 |
| `max_tokens` | integer | no | Max output tokens |
| `tools` | array | no | Tool/function definitions |
## Response
```json
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1718000000,
"model": "deepseek-v4-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hey there!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 5,
"total_tokens": 15,
"cost": {
"usd": 0.000012,
"hypercredits": 12
},
"remaining": {
"hypercredits": 88
}
}
}
```
### Custom Usage Fields
Hyper extends the standard `usage` object with cost and balance information:
| Field | Description |
| ------------------------------ | ------------------------------------------------------- |
| `usage.cost.usd` | Cost of this request in USD |
| `usage.cost.hypercredits` | Cost in Hypercredits |
| `usage.remaining.hypercredits` | Team's remaining Hypercredit balance after this request |
These fields are included in both regular and streaming responses. For
streaming, they appear in the final chunk when `include_usage` is enabled
via `stream_options`.
## Streaming
Set `"stream": true` to receive server-sent events:
```bash
curl https://hyper.charm.land/v1/chat/completions \
-H "Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}'
```
Each chunk is a `data:` line containing a `chat.completion.chunk` object.
The stream ends with `data: [DONE]`.
## Errors
All errors use the standard OpenAI error format:
```json
{
"error": {
"message": "...",
"type": "...",
"code": null
}
}
```
| Status | `error.type` | Cause |
| ------ | ----------------------- | -------------------------------------------------------------------- |
| 400 | `invalid_request_error` | Invalid JSON, missing `model` or `messages`, context window exceeded |
| 401 | `authentication_error` | Missing or invalid API key |
| 402 | `billing_error` | Insufficient Hypercredits |
| 403 | `permission_error` | Forbidden |
| 404 | `invalid_request_error` | Model not found |
| 429 | `rate_limit_error` | Rate limit exceeded |
| 5xx | `server_error` | Upstream provider failure |
---
### [OpenAI Responses](https://hyper.charm.land/docs/api/openai-responses)
`POST /v1/responses`
OpenAI Responses API compatible endpoint. This is a standard pass-through.
See [OpenAI's documentation](https://developers.openai.com/api/reference/resources/responses/methods/create)
for the full request and response specification.
## Request
```bash
curl https://hyper.charm.land/v1/responses \
-H "Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "prism",
"input": "What is bubble tea?"
}'
```
| Field | Type | Required | Description |
| ------- | --------------- | -------- | ---------------------------------------------- |
| `model` | string | yes | Model ID from [`/v1/models`](/api/list-models) |
| `input` | string or array | yes | A string prompt or array of message objects |
All standard Responses API parameters are accepted.
## Response
```json
{
"id": "resp_abc123",
"object": "response",
"created_at": 1718000000,
"model": "deepseek-v4-pro",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Bubble tea is a Taiwanese drink..."
}
]
}
],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 42,
"total_tokens": 50
}
}
```
## Errors
All errors use the standard OpenAI error format:
```json
{
"error": {
"message": "...",
"type": "...",
"code": null
}
}
```
| Status | `error.type` | Cause |
| ------ | ----------------------- | ----------------------------------------------------------------- |
| 400 | `invalid_request_error` | Invalid JSON, missing `model` or `input`, context window exceeded |
| 401 | `authentication_error` | Missing or invalid API key |
| 402 | `billing_error` | Insufficient Hypercredits |
| 403 | `permission_error` | Forbidden |
| 404 | `invalid_request_error` | Model not found |
| 429 | `rate_limit_error` | Rate limit exceeded |
| 5xx | `server_error` | Upstream provider failure |
---
### [Anthropic Messages](https://hyper.charm.land/docs/api/anthropic-messages)
`POST /v1/messages`
Anthropic Messages API compatible endpoint.
See [Anthropic's documentation](https://docs.anthropic.com/en/api/messages)
for the full request and response specification.
For compatibility with [Claude Code](/coding-agents/claude-code) and other
compatible agents, the `/v1/messages` endpoint also supports the `X-Api-Key`
header for authentication.
## Request
```bash
curl https://hyper.charm.land/v1/messages \
-H "x-api-key: sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "prism",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
```
| Field | Type | Required | Description |
| ------------ | --------------- | -------- | ---------------------------------------------- |
| `model` | string | yes | Model ID from [`/v1/models`](/api/list-models) |
| `max_tokens` | integer | yes | Max output tokens |
| `messages` | array | yes | Array of message objects |
| `system` | string or array | no | System prompt |
| `stream` | boolean | no | Set `true` for SSE streaming |
All standard Anthropic parameters are accepted.
## Response
```json
{
"id": "msg_abc123",
"type": "message",
"role": "assistant",
"content": [{ "type": "text", "text": "Hey there!" }],
"model": "deepseek-v4-pro",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 10,
"output_tokens": 5
}
}
```
## Errors
All errors use the Anthropic error format:
```json
{
"type": "error",
"error": {
"type": "...",
"message": "..."
}
}
```
| Status | `error.type` | Cause |
| ------ | ----------------------- | ----------------------------------------------------------------------------------- |
| 400 | `invalid_request_error` | Invalid JSON, missing `model`, `messages`, or `max_tokens`, context window exceeded |
| 401 | `authentication_error` | Missing or invalid `x-api-key` |
| 403 | `permission_error` | Forbidden |
| 404 | `not_found_error` | Model not found |
| 429 | `rate_limit_error` | Rate limit exceeded |
| 5xx | `api_error` | Upstream provider failure |
---
### [List Models](https://hyper.charm.land/docs/api/list-models)
`GET /v1/models`
Returns all available models in OpenAI format. No authentication required.
## Request
```bash
curl https://hyper.charm.land/v1/models
```
## Response
```json
{
"object": "list",
"data": [
{
"id": "prism",
"object": "model",
"created": 0,
"owned_by": "hyper",
"display_name": "Prism",
"producer": "Charm",
"context_window": 1000000,
"max_output_tokens": 131072,
"capabilities": {
"vision": true
},
"pricing": {
"input": 2.2,
"output": 11,
"cache_create": 0,
"cache_hit": 0.22
}
}
]
}
```
| Field | Description |
| -------------------------------- | ------------------------------------------------------------------ |
| `id` | Model ID to use in API requests |
| `display_name` | Human-readable name |
| `context_window` | Max input tokens |
| `max_output_tokens` | Max output tokens |
| `capabilities.vision` | Whether the model supports vision (image attachments) |
| `reasoning.effort_levels` | List of available effort levels (e.g. `["low", "medium", "high"]`) |
| `reasoning.default_effort_level` | Default effort level (e.g. `medium"`) |
| `pricing` | Per-million-token pricing |
## Errors
This endpoint does not require authentication and rarely returns errors.
When it does, they use the standard OpenAI error format:
```json
{
"error": {
"message": "...",
"type": "server_error",
"code": null
}
}
```
---
### [Credits](https://hyper.charm.land/docs/api/credits)
`GET /v1/credits`
Returns the current Hypercredit balance for the authenticated team.
Requires authentication.
Hyper uses **Hypercredits** as its unit of account. Subscription plans include
a Hypercredit allocation that refreshes weekly, and prepaid credits can be
purchased at any time.
## Request
```bash
curl https://hyper.charm.land/v1/credits \
-H "Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"
```
## Response
```json
{
"balance": 100
}
```
## Pricing
Token costs vary by model. Check the [model catalog](https://hyper.charm.land/app/models)
or the [`/v1/models`](/api/list-models) endpoint for per-model pricing in
dollars per million tokens.
## Errors
```json
{
"error": {
"message": "...",
"type": "...",
"code": null
}
}
```
| Status | `error.type` | Cause |
|--------|-------------|-------|
| 401 | `authentication_error` | Missing or invalid API key |
| 5xx | `server_error` | Internal error |
---
### [Fantasy SDK](https://hyper.charm.land/docs/api/fantasy)
[Fantasy](https://charm.land/fantasy) is Charm's Go library for LLM inference.
Hyper has first-class support for it.
## Installation
```bash
go get charm.land/fantasy
```
## Usage
```go
package main
import (
"context"
"fmt"
"os"
"charm.land/fantasy"
"charm.land/fantasy/providers/openaicompat"
)
func main() {
provider, _ := openaicompat.New(
openaicompat.WithBaseURL("https://hyper.charm.land/v1"),
openaicompat.WithAPIKey("sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx"),
)
ctx := context.Background()
model, _ := provider.LanguageModel(ctx, "prism")
agent := fantasy.NewAgent(model)
result, err := agent.Generate(ctx, fantasy.AgentCall{Prompt: "Hello!"})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result.Response.Content.Text())
}
```