Skip to main content

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.
Keep your API key secure. Never commit it to version control or expose it in client-side code.

Client Setup

Low-Level Client

For full control over individual API calls, use the underlying authenticated client directly.

Environment Variables

Store your API key in an environment variable instead of hardcoding it:

Advanced Configuration

Request Timeout

For the low-level client, pass an httpx.Timeout:

Retry Configuration

Both SDKs include automatic retries with exponential backoff for server errors (5xx) and network failures.

Context Manager (Python)

The Python low-level client supports context managers for automatic resource cleanup:
Or async:

Rate Limits

API rate limits depend on your plan:
Rate limit headers are included in every response:
  • X-RateLimit-Limit — maximum requests allowed
  • X-RateLimit-Remaining — requests remaining in window
  • X-RateLimit-Reset — seconds until window resets

Error Handling

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: