Heta compiler API

Introduction

This is part of the Heta project.

Entry points

See also

Privacy Policy

Heta Compiler API - Developer Documentation

The Heta Compiler API provides an interface for compiling Heta platforms, customizing compilation workflows, and exporting results. This documentation details the API structure, parameters, and examples for developers.

Base URL: https://heta-api.insysbio.com

OpenAPI specification: /schema

1. Compile a Platform

Method: POST

Endpoint: /build

This endpoint compiles a Heta platform and generates files based on the provided configuration. All operations are synchronous, and results are returned immediately.

Request Body

Example Request

{
    "lifetime": 1800,
    "inputFiles": [
        {
            "filepath": "index.heta",
            "format": "utf8",
            "filebody": "x1 @Record := 1.2;\nc1 @Compartment .= 5;"
        }
    ],
    "declaration": {
        "importModule": {
            "source": "index.heta",
            "type": "heta"
        },
        "export": [
            { "format": "JSON" }
        ]
    }
}

Response

Success (200): Returns outputFiles (including generated file content), logs, taskId, lifeend, downloadLink and filesLink. Check logs for compilation diagnostics even when the HTTP status is 200.

Errors:

2. Download Build Results

Method: GET

Endpoint: /download/{taskId}

Download a ZIP archive containing the files from a compilation task using its task ID. The link is available until the task expires.

Path Parameters

Response

Success (200): A ZIP archive is returned as binary data.

Errors:

3. Get API Info

Method: GET

Endpoint: /info

Retrieve version and connectivity details for the Heta Compiler API.

Response

Returns a description, the running Heta compiler version, the Node.js version, and the /schema path. Versions depend on the deployed server.

4. Retrieve OpenAPI Schema

Method: GET

Endpoint: /schema

Retrieve the complete OpenAPI schema for the Heta Compiler API.

Response

Returns the full OpenAPI 3.1.0 JSON document, including paths, request and response schemas, and examples.

5. Connect an MCP Client

Transport: Streamable HTTP (POST)

Endpoint: https://heta-api.insysbio.com/mcp

Configure this URL in an MCP client to use the Heta compiler. The endpoint does not require authentication and does not keep client sessions.

Build results can be downloaded through the existing /download/{taskId} URL. A browser GET request to /mcp returns 405 because MCP requests use POST.

For more details or support, contact the API team.