Getting Your API Key
If you need fully headless onboarding for agents, follow Agent Onboarding for API-first signup/login and non-interactive skill installation.1
Create an account
Go to app.trynia.ai and sign in or create a new account.
2
Navigate to API Keys
Open Settings → API Keys from the sidebar.
3
Generate a key
Click Create new API key, give it a name, and copy the key. You won’t be able to see it again.
Client Setup
High-Level SDK (Recommended)
- Python
- TypeScript
Low-Level Client
For full control over individual API calls, use the underlying authenticated client directly.- Python
- TypeScript
Environment Variables
Store your API key in an environment variable instead of hardcoding it:- Python
- TypeScript
Advanced Configuration
Request Timeout
- Python
- TypeScript
httpx.Timeout:Retry Configuration
Both SDKs include automatic retries with exponential backoff for server errors (5xx) and network failures.- Python
- TypeScript
Context Manager (Python)
The Python low-level client supports context managers for automatic resource cleanup:Rate Limits
API rate limits depend on your plan:Rate limit headers are included in every response:
X-RateLimit-Limit— maximum requests allowedX-RateLimit-Remaining— requests remaining in windowX-RateLimit-Reset— seconds until window resets
Error Handling
- Python
- TypeScript
High-level SDK raises typed exceptions:Low-level client returns
Response objects with status codes:Authentication Methods
The API accepts your key via either header:
Both SDKs use the
Authorization: Bearer format by default. The Python low-level client allows customizing the header:

