Quick Start

This is the documentation for the Reka APIs. We offer a Python SDK, as well as an HTTP API. This guide will help you get started with the Python SDK.

Find the documentation for API v0 (Python SDK < 2.0.0) at: https://v0.docs.reka.ai/.


First, obtain an API key by setting up an account in the Reka Platform Dashboard.

Then, install the Reka python SDK with pip install "reka-api>=2.0.0".

You can then use your API key to query the models:

1from reka.client import Reka
2
3# You can also set the API key using the REKA_API_KEY environment variable.
4client = Reka(api_key="YOUR_API_KEY")
5
6response = client.chat.create(
7 messages=[
8 {
9 "content": "What is the fifth prime number?",
10 "role": "user",
11 }
12 ],
13 model="reka-core-20240501",
14)
15print(response.responses[0].message.content)

This will print a response like:

The fifth prime number is 11. Here’s a quick breakdown of the first five prime numbers in order: 2, 3, 5, 7, 11.