Python SDK
Use the official SDK to call ORYASTRA AI with typed, maintainable code.
This guide explains overview with the Python SDK. Keep configuration server-side and separate from business logic.
- Unified authentication, requests, and error handling.
- Support for responses, chat, files, agents, and multimodal capabilities.
- Synchronous, asynchronous, and streaming patterns.
Note
Set the API key through an environment variable instead of writing it directly in application code.
First request
Python
from oryastra import OryastraAI
client = OryastraAI()
response = client.responses.create(
model="oryastra-chat",
input="Hello",
)
print(response.output_text)Output
Hello! How can I help?