API Versioning & Deprecation
URL versioning, the deprecation policy, and the RFC 8594 Deprecation/Sunset headers Krawl emits for retiring endpoints
Krawl uses URL-based versioning and a predictable deprecation policy so agents can depend on stable behavior and get machine-readable advance notice before anything is removed.
URL versioning
Versioned, compatibility-sensitive endpoints live under a version prefix:
https://api.krawl.sh/v1/chat/completions
https://api.krawl.sh/v1/models- The
/v1/*namespace is the stable, OpenAI-compatible surface. Breaking changes to these shapes ship under a new prefix (/v2/...), never in place. - Some core endpoints (e.g.
/research,/tasks,/lookouts) are currently served unversioned at the root. Treat the unversioned root as the current major version; additive, backward-compatible changes (new optional fields, new endpoints) can land there without a version bump.
Backward-compatible changes we may make without a version change:
- Adding new endpoints or new optional request fields.
- Adding new fields to response objects.
- Adding new enum values (e.g. new research
modes orsourcetypes).
Build clients to tolerate unknown fields and ignore enum values they don't recognize.
Deprecation policy
When an endpoint or field is scheduled for removal:
- Minimum 6-month notice window between the deprecation announcement and the sunset (removal) date.
- Deprecated responses carry standard RFC 8594 headers so agents detect the deprecation programmatically — no need to read a changelog.
- A migration guide is linked directly from the response.
Deprecation headers (RFC 8594)
A deprecated endpoint returns:
HTTP/1.1 200 OK
Deprecation: Wed, 01 Oct 2025 00:00:00 GMT
Sunset: Sun, 01 Mar 2026 00:00:00 GMT
Link: <https://docs.krawl.sh/docs/versioning>; rel="deprecation"; type="text/html"| Header | Meaning |
|---|---|
Deprecation | The date the endpoint became deprecated (HTTP date). It may also appear as Deprecation: true. |
Sunset | The date after which the endpoint may stop working (HTTP date, RFC 8594). At least 6 months after Deprecation. |
Link … rel="deprecation" | URL of the migration documentation for this endpoint. |
What agents should do
- Log a warning whenever a response contains a
DeprecationorSunsetheader, including the endpoint and theSunsetdate. - Schedule migration before the
Sunsetdate — after it, the endpoint may return404/410or redirect. - Follow the
rel="deprecation"link for the replacement endpoint and migration steps.
resp = client.get("/v1/models")
if "Sunset" in resp.headers:
logger.warning(
"Endpoint deprecated; sunset on %s — migrate per %s",
resp.headers["Sunset"],
resp.headers.get("Link", "https://docs.krawl.sh/docs/versioning"),
)Checking for deprecations
You can proactively detect deprecations on any call by inspecting response headers — there is no separate endpoint required. Combine this with the OpenAPI spec, which always reflects the current, supported surface.