Manage AI agents
Hyfn Public API (1.0.0)
Public REST API for managing your AI workforce programmatically. Create and manage AI agents, knowledge sources, scheduled jobs, track billable work tasks, and access invoices.
⚠️ SECURITY WARNING: This API is currently in development and uses a system-wide API key. Do not use in production without implementing per-organization API keys. See documentation for details.
Download OpenAPI description
Overview
Languages
Servers
Mock server
https://hyfn.redocly.app/_mock/openapi/
Production server
https://your-domain.replit.app/api/public/
Local development server
http://localhost:5000/api/public/
- Mock serverhttps://hyfn.redocly.app/_mock/openapi/work_items
- Production serverhttps://your-domain.replit.app/api/public/work_items
- Local development serverhttp://localhost:5000/api/public/work_items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://hyfn.redocly.app/_mock/openapi/work_items \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-org-id: YOUR_API_KEY_HERE'Response
application/json
{ "workItems": [ { … } ] }
Bodyapplication/jsonrequired
Type of work performed
Enum"model_call""knowledge_call""skill_call""job_task"
Example: "model_call"
- Mock serverhttps://hyfn.redocly.app/_mock/openapi/work_items
- Production serverhttps://your-domain.replit.app/api/public/work_items
- Local development serverhttp://localhost:5000/api/public/work_items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://hyfn.redocly.app/_mock/openapi/work_items \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-org-id: YOUR_API_KEY_HERE' \
-d '{
"agentId": "6310db44-39c9-4e4d-8b67-83c45700e545",
"jobId": "deaf5733-cb4c-40ec-9b59-5de3fab80a80",
"type": "model_call",
"description": "Customer support chat",
"timeSpent": "0.5",
"metadata": {
"modelName": "gpt-4",
"tokensUsed": 1500
}
}'Response
application/json
{ "workItem": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39", "type": "model_call", "description": "Customer support chat", "timeSpent": "0.5", "humanInLoop": false, "metadata": { … }, "createdAt": "2019-08-24T14:15:22Z" } }
- Mock serverhttps://hyfn.redocly.app/_mock/openapi/work_items/{workItemId}
- Production serverhttps://your-domain.replit.app/api/public/work_items/{workItemId}
- Local development serverhttp://localhost:5000/api/public/work_items/{workItemId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://hyfn.redocly.app/_mock/openapi/work_items/5f6bce01-643e-4f68-a976-02f9a9cdba9f \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-org-id: YOUR_API_KEY_HERE'Response
application/json
{ "workItem": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39", "type": "model_call", "description": "Customer support chat", "timeSpent": "0.5", "humanInLoop": false, "metadata": { … }, "createdAt": "2019-08-24T14:15:22Z" } }
- Mock serverhttps://hyfn.redocly.app/_mock/openapi/work_items/{workItemId}
- Production serverhttps://your-domain.replit.app/api/public/work_items/{workItemId}
- Local development serverhttp://localhost:5000/api/public/work_items/{workItemId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
https://hyfn.redocly.app/_mock/openapi/work_items/5f6bce01-643e-4f68-a976-02f9a9cdba9f \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-org-id: YOUR_API_KEY_HERE' \
-d '{
"description": "string",
"metadata": {}
}'Response
application/json
{ "workItem": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39", "type": "model_call", "description": "Customer support chat", "timeSpent": "0.5", "humanInLoop": false, "metadata": { … }, "createdAt": "2019-08-24T14:15:22Z" } }
- Mock serverhttps://hyfn.redocly.app/_mock/openapi/work_items/{workItemId}
- Production serverhttps://your-domain.replit.app/api/public/work_items/{workItemId}
- Local development serverhttp://localhost:5000/api/public/work_items/{workItemId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://hyfn.redocly.app/_mock/openapi/work_items/5f6bce01-643e-4f68-a976-02f9a9cdba9f \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-org-id: YOUR_API_KEY_HERE'