Skip to main content

Web API (OpenAPI)

Leapter generates an OpenAPI specification for your project, giving you a standard REST API to call any published Blueprint from any application.

Get the OpenAPI spec URL

  1. Open any Blueprint in the editor.
  2. Click the Share button in the toolbar.
  3. Select Connect.
  4. In the Connect dialog, select the Web API (OpenAPI) tab.
The Connect dialog showing the Web API (OpenAPI) tab with the spec URL and curl example The dialog shows your OpenAPI specification URL:
https://lab.leapter.com/runtime/api/v1/{appspace}/{project-id}/openapi
Click the Copy button to copy it to your clipboard.
The OpenAPI spec covers all published Blueprints in the project, not just the one you currently have open.

Authentication

All API calls require an API key passed as a header:
  • Header name: X-API-Key
  • Header value: your API key
See API Keys to create and manage your keys.

Example: call a Blueprint with curl

The Connect dialog provides a ready-made curl command for the Blueprint you have open — it has the appspace, project ID, Blueprint ID, and a sample API key already filled in. The general pattern is:
curl -X POST "https://lab.leapter.com/runtime/api/v1/{appspace}/{project-id}/models/{blueprint-id}/runs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{"input1": "value1", "input2": "value2"}'
Replace the placeholders with your actual values and the request body with your Blueprint’s input parameters.

Use with Postman

  1. Copy the OpenAPI spec URL from the Connect dialog.
  2. In Postman, click Import and paste the URL.
  3. Postman generates a collection with all your Blueprint endpoints.
  4. Set the X-API-Key header in the collection’s authorization settings.
  5. Fill in the request body with your input values and send a request.

Use with Swagger UI

You can also paste the OpenAPI spec URL into Swagger Editor or any OpenAPI-compatible tool to explore and test your endpoints interactively.

What to do next