NullSpend Docs

Versioning

NullSpend uses date-based API versioning (the Stripe pattern). Each version is an ISO date string.

NullSpend uses date-based API versioning (the Stripe pattern). Each version is an ISO date string.


Current Version

2026-04-01

Supported Versions

VersionStatus
2026-04-01Current (default)

Version Resolution Chain

The proxy resolves the API version using a three-step priority chain:

PrioritySourceSet By
1 (highest)NullSpend-Version request headerPer-request override
2Key-level versionSet at key creation or updated in dashboard
3 (lowest)Default (2026-04-01)Automatic fallback

If a source provides a version not in the supported list, it's ignored and the next source is tried.


Setting the Version

Per-Request

Send the NullSpend-Version header with any proxy request:

curl https://proxy.nullspend.dev/v1/chat/completions \
  -H "NullSpend-Version: 2026-04-01" \
  -H "X-NullSpend-Key: ns_live_sk_..." \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'

See Custom Headers for the header reference.

Per-Key

Set a version when creating a key in the dashboard or via the API Keys API. All requests using that key will use the pinned version unless overridden by the NullSpend-Version header.


Response Header

Every proxy response includes the NullSpend-Version header indicating which version processed the request:

NullSpend-Version: 2026-04-01

Versioning Strategy

When a breaking change is introduced:

  1. A new version is added to the supported list
  2. Existing keys continue using their pinned version
  3. The default version moves to the latest for newly created keys

This ensures existing integrations are not broken by API changes.


On this page