Connect Python
There is no Python SDK for Recursiv. The @recursiv/sdk is TypeScript only. From Python you connect directly to the REST API at https://api.recursiv.io/api/v1 using any HTTP client. This guide uses requests for plain calls and httpx for streaming.
The REST API exposes the same resources as the SDK. Project-scoped responses use a { "data": ... } envelope, and some return { "data": ..., "meta": ... }.
Install
Configure the key
No account yet? Sign up and mint a key at recursiv.io/account/api-keys.
Send the key as a bearer token on every request:
First authenticated call
Most resources hang off a project. Create one, then run a query. Project IDs are UUIDs, so always use the id the API returns.
Run an agent
Create an agent against any model, then chat with it. The model field is model agnostic. Pass any supported model id.
Stream an agent
The streaming endpoint returns Server-Sent Events. Use httpx to read the stream line by line. Each data: line is a JSON chunk with a type. Text arrives as text_delta chunks; the stream ends with [DONE].
Run code in a sandbox
The sandbox runs code without an account. It returns a { "data", "meta" } envelope. This call needs no Authorization header.
Where to go next
- Quickstart for the canonical first calls
- API Reference for every REST endpoint, request shape, and response envelope
- Recursiv ships hundreds of data integrations (Slack, email, databases, and more) that agents can call as tools