Python

Install and initialize the official OrbitalsAI Python client.

The orbitalsai package provides synchronous and asynchronous clients for recorded transcription, text operations, text-to-speech, voice cloning, and chat, plus dedicated realtime streaming clients.

Install

pip install orbitalsai

To convert audio files or capture microphone input before streaming:

pip install "orbitalsai[audio]"

The package supports Python 3.8 and newer.

Configure your API key

Store the key in the environment rather than in source code:

export ORBITALSAI_API_KEY="your_api_key"

Create a synchronous client:

import os
import orbitalsai
 
client = orbitalsai.Client(
    api_key=os.environ["ORBITALSAI_API_KEY"],
)

The default REST base URL is https://api.orbitalsai.com/api/v1.

For an asynchronous application, use the context-managed client so its HTTP session is closed correctly:

import asyncio
import os
import orbitalsai
 
async def main():
    async with orbitalsai.AsyncClient(
        api_key=os.environ["ORBITALSAI_API_KEY"],
    ) as client:
        result = await client.translate(
            "Sannu da zuwa",
            source_language="Hausa",
            target_language="English",
        )
        print(result.text)
 
asyncio.run(main())

Choose a guide

See Pricing and usage for current rate discovery through client.get_pricing().

On this page