LEONARDX / WORKSPACE

API v1

Authenticated programmatic access to LEO OS resources.

Developer reference

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.

Available API-key routes
GET /api/v1/me
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.

Integration StudioSimulation · no request sent

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.

Source-backed examples

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.

request.http1 / 2
GET /api/v1/projectsAuthorization: Bearer leo_live_<your-key>X-Request-ID: <optional-client-id>

Execution preview

Synchronized to the highlighted code

Illustrative request · not executed
leo · apisimulated

[SIMULATION] No request sent

> GET /api/v1/projects

Authorization: Bearer leo_live_<masked>

What is live? The examples describe existing API, SDK, CLI, and webhook behavior. This preview itself is local UI only and does not report a real execution.

List projects: step 1 of 2. Authorize the request