Copilot Chat
POST
/api/copilotkit
const url = 'http://localhost:8000/api/copilotkit';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/copilotkitMain CopilotKit chat endpoint — streams AI responses with tool use.
Accepts: messages: list of {role, content} conversation_id: optional, to continue an existing conversation context: optional application context
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
example