App Builder
The App Builder API allows you to pass inputs similarly to the Hatz UI.
WORKFLOWS ARE COMING SOON
Get All Apps
You can hit the /v1/app/list endpoint to get a list of all the apps you have access to
curl 'https://ai.hatz.ai/v1/app/list' \
-H 'X-API-Key: $HATZ_API_KEY'
Example Response
{
"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
}
]
},
]
}
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' \
--header '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
}'