Versioning
Viewing v2— current version
The Layer REST API is path-versioned. Every endpoint lives under a version prefix:
https://api.app.layer.ai/api/v1/…https://api.app.layer.ai/api/v2/…v2 is the current version and the default across these docs. v1 remains live under /api/v1 — it was superseded by v2 on 2026-08-26 and will be deprecated as a whole later.
| Version | Status | Docs |
|---|---|---|
v2 |
Current — use for all new integrations | /docs/v2/rest-api |
v1 |
Superseded — still live; migrate on your own schedule | /docs/v1/rest-api |
v2 extends inference generation with reference sets — trained subjects, styles, and characters — and adds the base-model and reference-set catalog endpoints those runs are built from.
What changed in v2
Section titled “What changed in v2”Most v1 endpoints are drop-in — identical request and response schemas under the new prefix. A small number changed (inference request/response bodies, the Models → Base Models rename) and a few are new. The v1 → v2 migration guide lists exactly which, and only those.
What counts as breaking
Section titled “What counts as breaking”Treat these as non-breaking and build tolerantly so they don’t break your integration:
- New endpoints, new optional request fields, and new fields in responses.
- New enum values (for example, a new run status or error code).
Treat these as breaking (they ship under a new version):
- Removing or renaming an endpoint, field, or enum value.
- Changing a field’s type or a required request field.
Deprecation
Section titled “Deprecation”Nothing is removed without notice. A deprecated operation returns Deprecation and Sunset headers for at least 90 days before it stops responding, and is marked deprecated: true in the OpenAPI description for the same period.
See Deprecation policy for the headers to watch and how to handle them.