Orbit AI Python SDK — official client for the Orbit AI API by Alaada
Project description
alaada — Orbit AI Python SDK
Official Python client for the Orbit AI API by Alaada.
pip install alaada-orbit
Quickstart
import alaada as orbit
orbit.configure(api_key="orbit_live_...")
# Single prompt
res = orbit.prompt("simplex1", "What is the capital of France?")
print(res.text)
# Streaming
for chunk in orbit.stream("simplex1", "Write a short poem about the ocean"):
print(chunk.delta, end="", flush=True)
# Multi-turn chat (history stored automatically)
chat = orbit.chat("simplex1", system="You are a Python coding assistant.")
r1 = chat.send("What is a decorator?")
r2 = chat.send("Show me an example.") # full context retained
print(r2.text)
Models
| Model | Best for |
|---|---|
simplex1 |
Fast everyday tasks |
complex1 |
Heavy reasoning, long documents |
imagery1 |
Image generation |
API reference
orbit.configure()
orbit.configure(
api_key="orbit_live_...", # or set ORBIT_API_KEY env var
privacy=False, # True = server logs no prompt/response content
default_model="simplex1",
timeout=120,
)
orbit.prompt(model, prompt)
res = orbit.prompt(
"simplex1",
"Summarise this article: ...",
system = "You are a helpful assistant.",
tools = ["websearch"], # optional
temperature = 0.7,
max_tokens = 1000,
privacy = True, # override per-call
session_id = "chat_abc123", # attach to a session
)
print(res.text) # the response text
print(res.usage) # {"input_tokens": 12, "output_tokens": 40}
print(res.image_url) # set when using imagery1
orbit.stream(model, prompt)
for chunk in orbit.stream("simplex1", "Tell me a joke"):
print(chunk.delta, end="", flush=True)
if chunk.finish_reason == "stop":
print(f"\n\nTokens used: {chunk.usage}")
orbit.chat(model)
session = orbit.chat(
"complex1",
system = "You are an expert data scientist.",
short_history = True, # only keep the last chat_max exchanges
chat_max = 20,
privacy = True,
)
# .send() — full response
res = session.send("Explain gradient descent")
print(res.text)
# .stream() — streamed response
for chunk in session.stream("Now show Python code for it"):
print(chunk.delta, end="", flush=True)
print(f"\nSession has {session.turns} turns")
session.clear() # delete session from server
Tools
# Available tools: "websearch", "calculator", "datetime"
res = orbit.prompt(
"simplex1",
"What is the latest news on AI regulation?",
tools=["websearch"],
)
Privacy
When privacy=True, the Orbit server will never log your prompt or response content — only routing metadata (method, status, duration) is recorded.
orbit.configure(api_key="...", privacy=True) # global
res = orbit.prompt("simplex1", "...", privacy=True) # per-call
Environment variables
| Variable | Description |
|---|---|
ORBIT_API_KEY |
Your API key (alternative to configure()) |
ORBIT_BASE_URL |
Override the API server URL |
Error handling
from alaada import AuthenticationError, RateLimitError, ValidationError, APIError
try:
res = orbit.prompt("simplex1", "Hello!")
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Resets at {e.reset_at}")
except ValidationError as e:
print(f"Bad request: {e}")
except APIError as e:
print(f"Server error: {e}")
License
MIT — © Alaada
All rights reserved by the company and Arzo Das.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alaada_orbit-1.0.0.tar.gz.
File metadata
- Download URL: alaada_orbit-1.0.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf84c9e9155ac4878e5aeea807dc71f716995146b68bd627634c41ca2f855fe7
|
|
| MD5 |
30a4ac6d882efea627cb7827adaf19f1
|
|
| BLAKE2b-256 |
e029d5f27f74aed55b59ca49ad7d0fa55260682c009cd8c1730e0c3ee02fc61e
|
File details
Details for the file alaada_orbit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alaada_orbit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
741af8352d88b7dcdd882454d851139619ff8490ef5eac527ae36a50a1825c75
|
|
| MD5 |
dfe09bf5917ded36c40d43bc8cec2be3
|
|
| BLAKE2b-256 |
a8ca3ae6630c3499b48fb060f617fddc91e16dd227b6d234104d39670a01e012
|