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
providerstringrequiredOne of claude_code (routes to anthropic) or codex (routes to openai).
tokenstringrequiredThe raw OAuth or session token from the subscription. Must not be empty. Fingerprinted and discarded; never stored or logged.
planstringA free-form plan label, e.g. claude_max or chatgpt_pro. Defaults to the provider's label.
metadataobjectArbitrary 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": {}
}idstringOpaque credential id, prefixed sub_.
objectstringAlways subscription_credential.
project_idstringThe owning project.
providerstringclaude_code or codex.
planstringThe plan label.
statusstringactive, disabled, or revoked.
token_fingerprintstringA non-reversible fingerprint of the token, prefixed zsub_.
cached_price_discount_pctintegerThe effective input-token discount this subscription unlocks: 90 for Claude Code, 50 for Codex.
created_atstringRFC 3339 creation timestamp.
metadataobjectThe 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_idstringpathrequiredThe 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
| Status | Code | When |
|---|---|---|
| 400 | invalid_request_error | token is empty. |
| 401 | invalid_api_key | Missing or invalid API key. |
| 404 | invalid_request_error | The credential does not exist in this project. |
See the full table on errors.
Provider credentials (BYOK)
Attach, list, rotate, and delete bring-your-own-key provider secrets. Secrets are sealed at rest and fingerprinted for display; the plaintext is never returned.
Regional policy
Set and read the project's data-residency policy. Requests that would route to a forbidden region are denied before any provider call.