Skip to main content
The Lnar API lets you manage repositories, run code analysis, execute code, and configure integrations programmatically. All endpoints use JSON over HTTPS.

Base URL

https://api.lnar.dev

Versioning

All resource endpoints are prefixed with /v1. OAuth and discovery endpoints are unversioned.

Authentication

Most endpoints require a bearer token. Pass it in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lnar.dev/v1/repositories
You can create and manage API keys from the dashboard or via the API keys endpoints.

Response format

All responses return JSON. Successful responses use standard HTTP status codes:
CodeMeaning
200Success
201Resource created
204Success with no response body
422Validation error

Error responses

Validation errors return a 422 status with details about which fields failed:
{
  "detail": [
    {
      "loc": ["body", "field_name"],
      "msg": "description of the error",
      "type": "error_type"
    }
  ]
}

Endpoint groups

Use the sidebar to browse all available endpoints organized by group:
  • Repositories — Register, list, and manage repositories
  • Repository files — Browse files within a repository
  • Code analysis — Start, monitor, and manage code analyses
  • Code execution — Run code and retrieve execution results
  • Run streaming — Stream real-time stdout/stderr logs via SSE
  • API keys — Create and revoke API keys
  • Environment variables — Manage environment variables for execution
  • GitHub integration — Connect and manage GitHub repositories
  • OAuth 2.0 — Authorization, tokens, and client registration