Skip to content

New API keys can silently fail every call until the per-key USD spend limit is raised — name the cause in the error #284

Description

@beautifulrem

What happened

During the MetaMask Dev Cook-Off we set up a funded Venice account, created a fresh API key, and every /chat/completions call was rejected — even though the account had credit. Nothing in the error response named the cause. We rotated keys, suspected model gating and regional issues, and only much later found the per-key USD spend limit, which for our newly created key was effectively zero until we raised it in the key settings.

The failure mode is brutal for onboarding: the account is funded, the key is valid, and requests still fail with no pointer to the one setting that fixes it.

Suggestion

  1. Error transparency: when a request is blocked by the per-key spend limit, say so explicitly — e.g. error.code = "key_spend_limit_exceeded" with the key's current limit, instead of a generic rejection. That single string would have saved us an evening.
  2. Safer default: default a new key's spend limit to the account's available balance (or a non-zero sane cap) rather than a value that blocks all usage.
  3. Docs callout: the quickstart's "create an API key" step could carry a one-line warning: "check the key's USD spend limit — calls fail while it is 0."

Context: we hit this while wiring Venice TEE inference into an autonomous governance agent (https://github.com/beautifulrem/regent, live demo https://mandate-app-murex.vercel.app), where the agent's first live call failing silently looked exactly like a TEE/model issue rather than a billing toggle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions