App Builder

The App Builder API allows you to pass inputs similarly to the Hatz UI.

For running multi-step AI workflows, see the Workflows documentation.

Get All Apps

You can hit the /v1/app/list endpoint to get a list of all the apps and workflows you have access to.

Results are paginated using limit/offset. Pagination applies after any name filter.

  • name (optional): Filter by name (case-insensitive partial match)
  • limit (optional, integer): Number of results to return (1-1000, default: 100)
  • offset (optional, integer): Number of results to skip (default: 0)
curl 'https://ai.hatz.ai/v1/app/list' \
  -H 'X-API-Key: $HATZ_API_KEY'
curl 'https://ai.hatz.ai/v1/app/list?name=coding' \
  -H 'X-API-Key: $HATZ_API_KEY'
curl 'https://ai.hatz.ai/v1/app/list?limit=20&offset=40' \
  -H 'X-API-Key: $HATZ_API_KEY'

Example Response

The response contains a list of apps and/or workflows. Apps include prompt_sections and default_model, while workflows include steps and dependencies.

{
    "data": [
        {
            "name": "coding",
            "description": "This app helps you learn basic coding skills",
            "default_model": "gemini-1.5-pro",
            "files": [],
            "constants": [],
            "user_inputs": [
                {
                    "position": 0,
                    "required": false,
                    "object_id": "id1m4fs77qg1if11melm",
                    "description": "",
                    "display_name": "language",
                    "variable_name": "language",
                    "variable_type": "short_answer"
                }
            ],
            "prompt_sections": [
                {
                    "body": "write me hello world in the programming langugage of  {{inputs.language}}",
                    "position": 0
                }
            ]
        },
    ]
}

Workflow item example:

{
    "id": "$APP_ID",
    "name": "New Workflow",
    "files": [],
    "constants": [],
    "user_inputs": [],
    "steps": [
        {
            "id": "00000000-0000-0000-0000-000000000000",
            "config": {
                "model": "google.gemini-3.1-pro-preview"
            },
            "position": 0,
            "step_type": "prompt",
            "display_name": "Prompt 1",
            "prompt_sections": []
        }
    ],
    "dependencies": []
}

Get App By ID

If you just want to see the data for a specific app, you can hit the /v1/app/$APP_ID endpoint

curl 'https://ai.hatz.ai/v1/app/$APP_ID' \
  -H 'X-API-Key: $HATZ_API_KEY'

Query App By ID

To query an app, you can pass an array of inputs through the body to mimic how you would use the app within the Hatz AI Platform. You would send a POST request to the /v1/app/$APP_ID/query endpoint (replacing $APP_ID with the actual id of the app.

curl 'https://ai.hatz.ai/v1/app/$APP_ID/query' \
  -H 'X-API-Key: $HATZ_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "inputs": {
      "test": 1
    },
    "stream": false
  }'