Create Chat Completion
Generate the next assistant message for a conversation. The request and response follow the OpenAI Chat Completions shape.
Authentication
Your Reka API key, sent as Authorization: Bearer <key>.
Request
A model ID from GET /v1/models, such as reka-flash-3. IDs have no namespace prefix.
Return the response as server-sent events. Usage totals arrive on the final chunk.
Only sample from the top_k most likely tokens. Honored by models that list it in supported_sampling_parameters.
Random seed. Honored by models that list it in supported_sampling_parameters.
Penalize tokens by how often they have appeared. Honored by models that list it in supported_sampling_parameters.
Penalize tokens that have already appeared. Honored by models that list it in supported_sampling_parameters.
Functions the model may call. Supported by models that list tools in supported_features.
auto lets the model decide, none disables tool calls, required forces at least one call. Defaults to auto when tools is set.
Constrain the output to a JSON schema. Supported by models that list structured_outputs in supported_features.
Return log probabilities of the output tokens. Supported by models that list logprobs in supported_features.
Response
The completion. With stream set to true, the body is a stream of server-sent events, each carrying a chat.completion.chunk object.
chat.completion, or chat.completion.chunk for streamed events.