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 send a 10-minute request timeout (600000 ms). Node.js applies it to the whole request, so a stream that runs past timeoutMs is aborted. Python applies it per read, so a stream fails only after that long without receiving data. A streamed model request through the AI Router can run for up to 30 minutes, so raise the Node.js timeout before starting a long stream and lower it for calls that must fail fast.
Retries are off by default. With the backoff strategy, both SDKs retry 429, 500, 502, 503, and 504, starting at 500 ms, capped at 60 seconds per attempt, over up to one hour. The AI Gateway retries model calls inside the request as well; see Fallbacks and retries.

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

Router

Classify

Decisions

Chat Completions

Completions

Embeddings

Audio: Speech

Audio: Transcriptions

Audio: Translations

Images: Generations

Images: Edits

Images: Variations

Moderations

Rerank