Start by testing the health check endpoint to ensure everything is working:
Copy
curl https://api.headlessagents.ai/health
You should receive:
Copy
{ "status": "healthy"}
Call an agent
Now let’s make your first call to an agent:
Copy
curl -X POST \ -H "X-API-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"request": "Hello, how are you?"}' \ https://api.headlessagents.ai/call/your_agent_id
You should receive a response like:
Copy
{ "thread_id": "50cc9455b84d48ffad6b4c9fd41b561e", "conversation_id": "bc8e506e4a6f49ad", "agent_id": "your_agent_id", "success": true, "response": "Hi there! How can I help you today?", "function_result": null}