Skip to main content

Frequently asked questions

Short answers about key headers, 401 and 429 replies, provider keys, cost estimates, the read-only auditor role, organization requests and the health check.

Last updated

This page answers common questions about the gateway. Each answer links to the page that explains the topic.

Keys and requests#

Which header carries my memtrunk key?#

Send the key in Authorization: Bearer, x-api-key or x-goog-api-key. The gateway uses the first of these headers that holds a key. See authentication headers.

Which request paths does the gateway serve?#

The gateway serves Anthropic Messages, OpenAI Chat Completions, OpenAI Responses, a model list and a health check. See the endpoints reference.

How do I check the health of the gateway?#

Send GET /health. It needs no key. The status field is ok when the database answers. See the endpoints reference.

Does the model list differ between keys?#

It can. GET /v1/models leaves out models from providers that your key does not allow. It also leaves out Claude models when no Claude account is usable. See the endpoints reference.

Errors and limits#

Why does the gateway return 401 with a detail message?#

The key check failed. The detail text is API key required, Invalid API key or Account is disabled. See errors and status codes.

What happens when a key reaches its spend limit?#

The gateway still serves your own subscription accounts and your own private provider keys. A request that none of them can serve gets 429 with an Anthropic-shaped body. The key sets a daily or token limit. The key, its team or the instance can set the monthly spend limit. Each limit adds retry_after, resets_at and a Retry-After header. See errors and status codes.

Accounts and cost#

Can I add my own provider key?#

Yes. A provider key that a member adds is private to that member. Each user can own up to 10 private provider keys. See provider keys.

How does memtrunk estimate cost?#

It multiplies the tokens of each request by the price of the model. A model without a price counts as zero cost. See usage and cost.

Roles and organizations#

Can a read-only auditor change data?#

The server refuses most write requests from this role. The reply is 403 with the text Auditor role is read-only. See roles and access.

How do I request an organization?#

A signed-in user sends the organization name and at least one email domain. An administrator approves the request. The requester then becomes the org admin. See teams and organizations.