Github
Our SDKs are available on Github:Node.js
Python
Packages
- Python:
orq-ai-sdkon PyPI - Node.js:
@orq-ai/nodeon npm
Installation
Usage
To get your workspace API Keys, see API Keys.
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 pasttimeoutMs 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.
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.