Use the versioned API with clear access boundaries.
Public integrations should use /api/v1. Existing v2 routes remain available for compatibility. The walkthrough below is illustrative; it does not send requests or collect credentials.
GET /api/v1/projects
POST /api/v1/projects (write scope)
GET /api/v1/projects/:id
GET /api/v1/projects/:id/status
GET /api/v1/models
POST /api/v1/messages (write scope; active API plan + credits)
GET /api/v1/usage
Authorization: Bearer <leo_live_api_key>
X-Request-ID: optional client request ID
Model inference supports both JSON responses and server-sent-event streaming (`stream: true`) in v1, and bills measured provider token usage. Account, model-list, and project metadata routes do not consume inference credits. An authenticated, allowlisted proxy handler exists at /api/docs/playground. The Studio below does not call that handler; keep API keys server-side and use the documented API from your own trusted environment.
Follow the integration, one step at a time.
Explore real LeonardX contracts with sample code and a simulated terminal. This walkthrough never uses credentials, contacts endpoints, or changes account data.
Walkthrough scenario
A scoped read request to the implemented projects API.
Authorize the request
Send a server-side API key as a Bearer token. The masked value below is only illustrative.
GET /api/v1/projectsAuthorization: Bearer leo_live_<your-key>X-Request-ID: <optional-client-id>Execution preview
Synchronized to the highlighted code
[SIMULATION] No request sent
> GET /api/v1/projects
Authorization: Bearer leo_live_<masked>
List projects: step 1 of 2. Authorize the request