API versioning and policies
When calling the Lovable API from your own code, always specify a release date version in your request headers. This locks in the behavior so updates to the API will not break your application.
Anyone writing code or building tools that connect directly to the Lovable API.
Do this, in order
- 1
Add the Lovable-Version header formatted as YYYY-MM-DD (such as 2026-09-11) to every API request sent to https://api.lovable.dev/v1.
Locking in a specific version date guarantees the API behavior will not change without your knowledge.
- 2
Program your app to safely ignore unknown response fields and gracefully handle new error types.
Lovable releases non-breaking additions like new fields and error types across all supported versions without changing the version date.
- 3
Test your API calls with the new version date in your development environment before updating production traffic.
This ensures you adapt to any breaking changes before an older version reaches retirement.
Paste this into your project
Create an API client helper function in TypeScript for calling the Lovable API at https://api.lovable.dev/v1. Include headers for Lovable-API-Key using an environment variable and Lovable-Version set explicitly to 2026-09-11. Make sure the response parser ignores unknown fields and handles unexpected error codes without crashing the application.
Words decoded
- Header
- Extra metadata sent alongside an internet request, like an address label on a package.
- Breaking change
- An update that modifies or removes existing behavior, which could cause existing code to fail.
- Endpoint
- A specific web address provided by an API that performs a particular action or returns data.
Where people get stuck
- Leaving out the Lovable-Version header falls back to the oldest supported version, which will eventually shift and change your app's behavior when that version retires.
- Sending a date format other than YYYY-MM-DD or using an unreleased date will cause requests to fail with a 400 error.
- Pinning a version does not protect against rate limit or concurrency quota changes.
- Failing to handle unrecognized error types or extra response properties can cause your client to crash during non-breaking updates.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.