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-01Supported Versions
| Version | Status |
|---|---|
2026-04-01 | Current (default) |
Version Resolution Chain
The proxy resolves the API version using a three-step priority chain:
| Priority | Source | Set By |
|---|---|---|
| 1 (highest) | NullSpend-Version request header | Per-request override |
| 2 | Key-level version | Set 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-01Versioning Strategy
When a breaking change is introduced:
- A new version is added to the supported list
- Existing keys continue using their pinned version
- The default version moves to the latest for newly created keys
This ensures existing integrations are not broken by API changes.
Related
- Custom Headers — header format and resolution
- API Keys API — set version at key level
- API Overview — general API reference