Skip to main content
Use the official client libraries to interact with the Orq.ai API.

Github

Our SDKs are available on Github:

Node.js

Python

Packages

Installation

Usage

To get your workspace API Keys, see API Keys.
Initialize the Orq.ai client with an API key:
Both clients default to the managed cloud at https://my.orq.ai. Self-hosted and on-premise deployments serve the API under their own hostname, which has to be passed explicitly as server_url or serverURL. See Base URLs.

Timeouts and retries

Both SDKs time out after 10 minutes (600000 ms). Node.js applies it to the whole request; Python applies it per read. Raise it before a long stream (the AI Router allows 30 minutes) or an agent run (the AI Gateway allows 12; see Request timeouts), as the sample below does.
Retries are off by default. With backoff both SDKs retry 429, 500, 502, 503 and 504: start at 500 ms, cap a wait at 60 seconds, multiply by 1.5 per attempt and give up after an hour, which are the four BackoffStrategy arguments in order. Node.js adds up to a second of jitter to every wait; Python adds jitter only when jitter_ms is set. A Retry-After or retry-after-ms header replaces the wait for that attempt in both SDKs. The AI Gateway retries model calls inside a request as well. A request with no retry configuration gets up to two retries on 408, 429, 500, 502, 503, 504 and 529; see Fallbacks and retries. Writes are retried too, and there is no idempotency key, so a retried create response or run agent can bill twice. Setting the SDK strategy to none stops the retries the client makes; the AI Gateway retries are configured separately.

Platform

Agents

Agents Responses

Alerts

Annotation Queues

Annotations

API Keys

Audit Log Destinations

Budgets

Chunking

Datasets

Deployments

Environments

Evals

Experiments

External Agents

Feedback

File Systems

Files

Guardrail Rules

Hub

Identities

Knowledge

Logs

Management Keys

MCP Gateways

MCP Servers

Memory Stores

Model Catalog

Model Fusions

Models

Monitors

Notifiers

PII

Projects

Prompts

Reporting

Responses

Routing Rules

Schedules

Sessions

Skills

Smart Routers

Telemetry

Tools

Traces

Users

Views

Web Search

Webhooks

Workspace Settings

Workspaces

Workspaces Security

Router / Gateway

OCR

Classify

Decisions

Chat Completions

Completions

Embeddings

Audio: Speech

Audio: Transcriptions

Audio: Translations

Images: Generations

Images: Edits

Images: Variations

Moderations

Rerank