The `orq-ai-sdk` is a Python Client SDK for the Orq API, enabling developers to build, ship, and optimize LLM applications at scale. It provides a type-safe interface for interacting with Orq.ai's platform functionalities, including prompt management, model routing, RAG (Retrieval Augmented Generation), observability, and evaluation. The SDK supports both synchronous and asynchronous operations and is actively maintained with regular updates.
pip install orq-ai-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `Orq` client using an API key from an environment variable and then invoke a deployment. Ensure `ORQ_API_KEY` is set in your environment. Replace `"your-deployment-key"` with an actual deployment key from your Orq.ai workspace. The client supports context managers for proper resource management, especially in long-lived applications.
Pin your usage to a specific package version (`pip install orq-ai-sdk==X.Y.Z`) to avoid unexpected breaking changes and manually review changelogs before upgrading.
Regularly update your Python environment to actively supported versions (>=3.10 is currently required). Monitor the Python EOL schedule and plan upgrades accordingly.
Always initialize the `Orq` client within a `with` statement: `with Orq(...) as client:` to ensure proper closing of resources. For async operations, use `async with Orq(...) as client:`.
Only enable debug logging (`debug_logger` parameter or `ORQ_DEBUG` environment variable) during local development. Never use it in production where logs might be accessible.
Ensure the `ORQ_API_KEY` environment variable is set with a valid key, or pass it directly (`api_key="your_key"`). Verify your API key in the Orq.ai dashboard (Workspace Settings -> API Keys) and ensure it has the necessary permissions.
Review your API usage and quota limits on the Orq.ai dashboard. Consider implementing retry logic with exponential backoff in your application, or contact Orq.ai support to discuss upgrading your plan.
Ensure your `Orq` client instance is correctly initialized. Consult the official Orq.ai Python SDK documentation for the exact API structure and available resources for your installed version. Upgrade the SDK to the latest version if you expect a specific resource to be available.