Chat
Copy page
Chat completions endpoints
Chat (Vercel Streaming Protocol)
Authorization
bearerAuth Bearer token authentication. Use this for API clients and service-to-service communication. Set the Authorization header to "Bearer ".
In: header
Request Body
application/json
Headers data for template processing
Maximum tokens to generate
Run configuration
Whether to stream the response
trueResponse Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.pilot.inkeep.com/run/api/chat" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system" } ] }'{
"code": "bad_request",
"detail": "Bad Request",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 400,
"title": "Bad Request",
"error": {
"code": "bad_request",
"message": "Bad Request"
}
}{
"code": "unauthorized",
"detail": "Unauthorized",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 401,
"title": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}{
"code": "forbidden",
"detail": "Forbidden",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 403,
"title": "Forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden"
}
}{
"code": "not_found",
"detail": "Not Found",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 404,
"title": "Not Found",
"error": {
"code": "not_found",
"message": "Not Found"
}
}{
"code": "unprocessable_entity",
"detail": "Unprocessable Entity",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 422,
"title": "Unprocessable Entity",
"error": {
"code": "unprocessable_entity",
"message": "Unprocessable Entity"
}
}{
"code": "internal_server_error",
"detail": "Internal Server Error",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"status": 500,
"title": "Internal Server Error",
"error": {
"code": "internal_server_error",
"message": "Internal Server Error"
}
}Approve or deny tool execution
Authorization
bearerAuth Bearer token authentication. Use this for API clients and service-to-service communication. Set the Authorization header to "Bearer ".
In: header
Request Body
application/json
Whether the tool execution is approved
The conversation ID
Optional reason for the decision
The tool call ID to respond to
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.pilot.inkeep.com/run/api/tool-approvals" \ -H "Content-Type: application/json" \ -d '{ "approved": true, "conversationId": "string", "toolCallId": "string" }'{
"message": "string",
"success": true
}{
"error": "string"
}{
"error": "string"
}{
"error": "string",
"message": "string"
}Create chat completion
Authorization
bearerAuth Bearer token authentication. Use this for API clients and service-to-service communication. Set the Authorization header to "Bearer ".
In: header
Request Body
application/json
Conversation ID for multi-turn chat
Frequency penalty (-2 to 2)
Headers data for template processing (validated against context config schema)
Token logit bias
Maximum tokens to generate
The conversation messages
The model to use for the completion
Number of completions to generate
Presence penalty (-2 to 2)
Run configuration
Whether to stream the response
Controls randomness (0-1)
Available tools
Controls nucleus sampling
User identifier
Response Body
text/event-stream
application/json
application/json
application/json
curl -X POST "https://api.pilot.inkeep.com/run/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "content": "string", "role": "system" } ], "model": "string" }'"string"{
"details": [
{
"field": "string",
"message": "string",
"value": null
}
],
"error": "string"
}{
"error": "string"
}{
"error": "string",
"message": "string"
}