Zumik
v2 · Native state

Subscription credentials

Attach a Claude Code or ChatGPT Codex subscription so eligible traffic runs against your bundled allowance at the provider's cache-discounted rate.

Many teams already pay for a Claude Code (Anthropic) or ChatGPT Codex (OpenAI) subscription with a generous monthly allowance. Attaching that subscription routes eligible traffic for the underlying provider through the subscription's OAuth backend, using the allowance you already bought at the provider's cache-discounted effective price. Credential ids are prefixed sub_. See the subscriptions guide.

Like BYOK, the raw OAuth or session token is fingerprinted on the way in and discarded. Only the fingerprint, the provider, and the plan label are retained.

All requests require a bearer API key. See authentication.

Attach a subscription

POST /v2/subscription-credentials

providerstringrequired

One of claude_code (routes to anthropic) or codex (routes to openai).

tokenstringrequired

The raw OAuth or session token from the subscription. Must not be empty. Fingerprinted and discarded; never stored or logged.

planstring

A free-form plan label, e.g. claude_max or chatgpt_pro. Defaults to the provider's label.

metadataobject

Arbitrary JSON you attach for your own bookkeeping.

curl https://api.zumik.ai/v2/subscription-credentials \
  -H "Authorization: Bearer $ZUMIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "claude_code",
    "plan": "claude_max",
    "token": "oauth-..."
  }'
{
  "id": "sub_01jy7nop78r0s1t2u3v4w5x6yz",
  "object": "subscription_credential",
  "project_id": "prj_01jy7n0a4c8m2t6v9q3wrxk7bd",
  "provider": "claude_code",
  "plan": "claude_max",
  "status": "active",
  "token_fingerprint": "zsub_7c2b9e1a4d6f8302",
  "cached_price_discount_pct": 90,
  "created_at": "2026-06-15T16:33:20Z",
  "metadata": {}
}
idstring

Opaque credential id, prefixed sub_.

objectstring

Always subscription_credential.

project_idstring

The owning project.

providerstring

claude_code or codex.

planstring

The plan label.

statusstring

active, disabled, or revoked.

token_fingerprintstring

A non-reversible fingerprint of the token, prefixed zsub_.

cached_price_discount_pctinteger

The effective input-token discount this subscription unlocks: 90 for Claude Code, 50 for Codex.

created_atstring

RFC 3339 creation timestamp.

metadataobject

The metadata you supplied.

List subscriptions

GET /v2/subscription-credentials

curl https://api.zumik.ai/v2/subscription-credentials \
  -H "Authorization: Bearer $ZUMIK_API_KEY"
{
  "object": "list",
  "data": [
    {
      "id": "sub_01jy7nop78r0s1t2u3v4w5x6yz",
      "object": "subscription_credential",
      "provider": "claude_code",
      "plan": "claude_max",
      "status": "active",
      "cached_price_discount_pct": 90
    }
  ]
}

Delete a subscription

DELETE /v2/subscription-credentials/{credential_id}

credential_idstringpathrequired

The sub_... id to delete.

curl -X DELETE https://api.zumik.ai/v2/subscription-credentials/sub_01jy7nop78r0s1t2u3v4w5x6yz \
  -H "Authorization: Bearer $ZUMIK_API_KEY"
{
  "id": "sub_01jy7nop78r0s1t2u3v4w5x6yz",
  "object": "subscription_credential.deleted",
  "deleted": true
}

Errors

StatusCodeWhen
400invalid_request_errortoken is empty.
401invalid_api_keyMissing or invalid API key.
404invalid_request_errorThe credential does not exist in this project.

See the full table on errors.

On this page