Chat Completions

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
messageslist of objectsRequired
A list of messages comprising the conversation so far.
modelstringRequired

The model name used to generate the response. Currently, only "reka-flash-research" is supported for this endpoint.

streambooleanOptionalDefaults to false

Determines whether to stream the response incrementally. If set to true, the agent will return a stream of response chunks. If false, the response will be returned as a single object.

researchobjectOptional
response_formatobjectOptional

An object specifying the format that the agent must output. Setting this to { "type": "json_schema", "json_schema": {...} } enables Structured Outputs, which ensures the agent returns output that matches the supplied JSON schema. If not specified, the agent will return a plain text response.

Response

OK
CreateChatCompletionResponseobject

A chat completion response from the agent, containing the generated message and other metadata. This is used when stream is set to false in the request.

OR
CreateChatCompletionStreamResponseobject

A streamed response from the agent, containing a chunk of the chat completion. This is used when stream is set to true in the request.