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.
No matching documentation. Try a different search.
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}'import requests
# Non-streaming
resp = requests.post(
f"{BASE}/projects/{PROJECT_ID}/chat",
headers={"X-Api-Key": API_KEY, "Content-Type": "application/json"},
json={"message": "What happens in this video?", "stream": False},
timeout=60,
)
data = resp.json()
print(data["choices"][0]["message"]["content"])
# Multi-turn conversation
messages = [
{"role": "user", "content": "What is the person doing?"},
{"role": "assistant", "content": "The person is cooking."},
{"role": "user", "content": "What are they cooking?"},
]
resp = requests.post(
f"{BASE}/projects/{PROJECT_ID}/chat",
headers={"X-Api-Key": API_KEY, "Content-Type": "application/json"},
json={"messages": messages, "stream": False},
)
print(resp.json()["choices"][0]["message"]["content"])// Non-streaming
const res = await fetch(`${BASE}/projects/${projectId}/chat`, {
method: "POST",
headers: { "X-Api-Key": API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ message: "What happens?", stream: false })
});
const data = await res.json();
console.log(data.choices[0].message.content);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]