For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordGet API Key
  • Getting Started
    • Overview
    • Quickstart
    • Errors
    • Pricing
  • Chat
    • Overview
    • Chat with Image, Video, and Audio
    • Function Calling
    • Models
  • Vision
    • Overview
    • Rate Limits
    • Pricing
    • MCP Server
    • Video Management
    • Video Group Management
    • Video Search
    • Video QA
    • Clip Generation
    • Metadata Tagging
    • Image Management
    • Image Search
  • Research
    • Overview
    • Streaming
    • Reasoning Steps
    • Web Search
    • Structured Output
    • Parallel Thinking
    • Best Practices
    • Errors
    • Examples
      • POSTChat Completions
  • Speech
    • Overview
    • Audio Transcription
    • Speech Translation
    • Speech-to-Speech Translation
  • Resources
    • FAQs
    • Changelog
    • System Status
LogoLogo
DiscordGet API Key
ResearchAPI Reference

Chat Completions

POST
https://api.reka.ai/v1/chat/completions
POST
/v1/chat/completions
$curl -X POST https://api.reka.ai/v1/chat/completions \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "messages": [
> {
> "role": "user",
> "content": "string"
> }
> ],
> "model": "reka-flash-research"
>}'
200Successful
1{
2 "id": "string",
3 "choices": [
4 {
5 "finish_reason": "stop",
6 "index": 1,
7 "message": {
8 "role": "assistant",
9 "reasoning_steps": [
10 {
11 "role": "assistant",
12 "reasoning_content": "string",
13 "tool_calls": [
14 {
15 "id": "string",
16 "name": "search_web",
17 "args": {
18 "urls": [
19 "string"
20 ],
21 "task": "string"
22 }
23 }
24 ],
25 "content": {
26 "tool_name": "search_web",
27 "tool_output": [
28 {
29 "url": "string",
30 "title": "string",
31 "snippet": "string",
32 "age": "string"
33 }
34 ],
35 "tool_error": "string"
36 },
37 "tool_call_id": "string"
38 }
39 ],
40 "reasoning_content": "string",
41 "content": "string",
42 "annotations": [
43 {
44 "type": "url_citation",
45 "url_citation": {
46 "end_index": 1,
47 "start_index": 1,
48 "url": "string",
49 "title": "string"
50 }
51 }
52 ]
53 }
54 }
55 ],
56 "created": 1,
57 "model": "string",
58 "usage": {
59 "completion_tokens": 0,
60 "prompt_tokens": 0,
61 "total_tokens": 0
62 }
63}
Was this page helpful?
Previous

Speech API Overview

Next
Built with

Authentication

AuthorizationBearer

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.
modelstringRequiredDefaults to reka-flash-research

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.