Skip to main content

Send Message

POST /v1/chat
Send a message to an agent and receive a response.
curl -X POST https://api.orka.sh/v1/chat \
  -H "Authorization: Bearer $ORKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_abc123",
    "message": "What were the key findings in the Q4 report?"
  }'
Response
{
  "data": {
    "response": "Based on the Q4 report, the key findings were...",
    "sources": [
      {
        "document": "Q4-2025-Report.pdf",
        "chunk": "Revenue increased 23% year-over-year...",
        "score": 0.94
      }
    ],
    "conversation_id": "conv_abc123"
  }
}

Continue Conversation

Include conversation_id to maintain context:
Request
{
  "agent_id": "agent_abc123",
  "conversation_id": "conv_abc123",
  "message": "Can you break that down by region?"
}

List Conversations

GET /v1/agents/:id/conversations
Returns all conversations for an agent.

Streaming

Add "stream": true to receive Server-Sent Events:
curl -X POST https://api.orka.sh/v1/chat \
  -H "Authorization: Bearer $ORKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "agent_abc123", "message": "...", "stream": true}'