The Platform API

Direct Chat (Simple Q&A)

Manage your videos, ask questions, and build applications with the Platform API. Explore the operations below for request details, responses, and examples.

Direct Chat (Simple Q&A)

Ask simple factual questions about video content. Get concise answers grounded in your video. Use this for simple questions; use the Agent endpoint for complex analysis requiring tools.

POST/api/v1/projects/:projectId/chatBetaSend chat message

Send chat message

Beta: this operation may change before it is final.

Request body:

{
  "message": "What is happening in this video?",
  "videoId": "VIDEO_ID",
  "stream": true
}

message — single message (or use messages array for multi-turn)

messages — full conversation: [{ "role": "user", "content": "..." }]

videoId — target video. If omitted, uses first completed video in project.

stream — SSE streaming (default: true). Set false for JSON response.

# Streaming response
curl -N -X POST https://platform.endlessai.com/api/v1/projects/PROJECT_ID/chat \
  -H "X-Api-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "What happens in this video?"}'

# Non-streaming
curl -X POST https://platform.endlessai.com/api/v1/projects/PROJECT_ID/chat \
  -H "X-Api-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "What happens?", "stream": false}'

Non-streaming response:

{
  "choices": [{
    "message": {
      "content": "In this video, a person is preparing food in a kitchen..."
    }
  }]
}

Streaming response (SSE):

data: {"choices":[{"message":{"content":"In this video..."}}]}

data: [DONE]
Agent vs Direct Chat:Direct Chat is fast and cheap — direct Q&A against video content. Use it for simple factual questions. The Agent endpoint is for complex analysis: it can answer questions across videos and supporting documents and provide detailed findings.