Core concepts
The words every other page uses, and how they relate.
Hixel models your business as a hierarchy. Each level owns the one below it, and nothing is shared across levels you did not create.
Organization your company
└── Project one of your products
└── Environment Production, Staging, Sandbox, … (keys, settings, data)
└── Customer one of your customers (wallet, limits, provider keys)
└── Member one person in that customerOrganization#
Your company's account in Hixel. People on your team sign in to the dashboard as members of the organization, with the role owner, admin or member.
Project#
One of your products that uses Hixel. A project holds environments.
Environment#
A separate space inside a project with its own keys, settings, customers, wallets and usage. Every project has exactly one live environment, Production, and any number of test environments. A new project starts with Production and Staging. Each environment holds your provider keys: a live environment's requests run on your own provider accounts.
Two environments of one project are as separate as two companies: a key of Staging cannot see or change anything in Production, and a customer in Staging is a different customer from one with the same id in Production.
A test environment never calls a provider. The gateway answers from a built-in mock, so you can test your integration, your limits and your credit flows without paying for tokens. See Test environments.
Customer#
One of your customers: in a B2B product, usually a company or a workspace. A customer is the unit that owns a wallet, has limits and can bring its own provider keys.
You identify a customer by your own id for it, the external_id, such as org_42. It is
1 to 256 characters of visible ASCII, compared byte for byte. You send it on each request in
the x-hixel-customer header. The first request that names a new customer creates it, or you
can create it ahead of time with the management API.
Member#
A person inside a customer, identified by your own id for them in the x-hixel-member header.
Members do not need to be created. Every request records its member, and the environment can
set limits that apply to each member separately. A member may have a row with a name, an email
and a budget and models of its own; one without a row is held to its team's defaults.
Team policy#
What applies to all of one customer's members, on top of your own limits and models: a team budget for the whole customer, a default budget for each member, and the models the team may use. The customer's admin sets it in the customer portal, or you set it through the API. It can only restrict further than you do: the strictest layer wins.
Budget#
A cap on what a customer (the team budget) or one member (a member budget) may spend in a calendar month, UTC. The gateway checks it before calling the provider, beside your own limits.
Wallet#
A customer's prepaid balance with you, in US dollars. Grants, top-ups and refunds add to it; requests subtract from it. When an environment pays requests from wallets, a customer whose balance cannot cover a request is refused before the provider is called. See Wallets and the ledger.
Grant#
Credit you add without payment, such as a plan's monthly allowance. A grant can expire, and grants are spent before purchased credit, the one expiring soonest first.
Key#
A secret that authenticates your servers: hx_sk_ followed by 43 characters in Production,
hx_sk_test_ followed by 43 characters in a test environment. A key belongs to one
environment and has one or both scopes:
| Scope | What it allows |
|---|---|
inference | Requests to the gateway (/v1/responses, /v1/messages, …) |
management | The management API of its own environment (/v1/customers, …) |
A project key (hx_proj_…) belongs to a whole project instead: it manages the project, its
environments and everything in them through the management API, never the gateway. A key's secret
is shown once, when it is created. See Authentication.
Client token#
A short-lived token your server mints for one customer, so a browser or mobile app can call the gateway directly without holding a key. See Client tokens.
BYOK (bring your own key)#
A customer's own provider key, such as their OpenAI key. When the environment allows it, a request for that customer runs on their key, and their wallet is not charged. See Customer provider keys.
Money#
Every amount is an integer number of micro-USD, millionths of a US dollar, sent as a
decimal string: "2500000" is $2.50. Token counts are strings too. A JSON number is never
used for an amount, so nothing is rounded. See Wallets and the ledger.