Documentation

Authentication

Secure your API requests with API key authentication

Authentication Methods

API Key Authentication

For programmatic API access. Use API keys with Bearer token authentication for all API endpoints.

Session Authentication

For web applications. The Aionvision website uses secure session cookies for user authentication.

Getting Started

For API Access:

  1. Sign up at aionvision.tech
  2. Navigate to Dashboard → API Keys tab
  3. Create a new API key with required permissions
  4. Use the API key in your requests

For Web Dashboard:

Access the web interface directly at aionvision.tech and log in with your credentials. Session authentication is handled automatically.

Prerequisites for API Access
Active Aionvision account

Sign up at aionvision.tech/auth/register

STARTER plan or higher

API access requires STARTER ($15/month), PROFESSIONAL, or ENTERPRISE tier. Not available on Free tier. View pricing →

API key from dashboard

Create from Dashboard → API Keys tab (requires session authentication)

Quick Start Guide

API Key Authentication

API keys follow the format: aion_...

Keep your API keys secure:

  • Never commit API keys to version control
  • Use environment variables for API keys
  • Rotate keys regularly
  • Set expiration dates on API keys to limit exposure
  • Use different keys for different environments

Making Authenticated Requests

curl -X POST https://api.aionvision.tech/api/v2/uploads/request-presigned-url \
-H "Authorization: Bearer aion_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"filename": "image.jpg",
"content_type": "image/jpeg",
"size_bytes": 1048576
}'

Python Example

import requests
import os
API_KEY = os.getenv('AIONVISION_API_KEY')
headers = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json'}
# Request presigned URL for upload
response = requests.post(
'https://api.aionvision.tech/api/v2/uploads/request-presigned-url',
headers=headers,
json={'filename': 'image.jpg', 'content_type': 'image/jpeg', 'size_bytes': 1048576}
)
if response.status_code == 200:
data = response.json()
print(f"Upload URL: {data['upload_url']}")
else:
print(f"Error: {response.status_code} - {response.text}")
Rate Limiting

Default API Limits:

  • 10-500 requests per minute (varies by subscription tier)
  • See Rate Limits for tier-specific limits

Rate Limit Response Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1642360800

Handling Rate Limits

import time
import requests
def make_request_with_retry(url, headers, data, max_retries=3):
for attempt in range(max_retries):
response = requests.post(url, headers=headers, json=data)
if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
print(f"Rate limited. Waiting {retry_after} seconds...")
time.sleep(retry_after)
continue
return response
raise Exception("Max retries exceeded")

Best Practices

  • Implement exponential backoff for retries
  • Monitor rate limit headers in responses
  • Consider batching requests when possible
  • Cache results to reduce API calls
Common Questions

Why can't I create an API key?

API key creation requires: (1) Active account with session authentication, (2) STARTER plan or higher, (3) ADMIN permission (tenant owners have this by default).

Does the Free tier include API access?

No. API access is only available on STARTER ($15/month) and higher plans. View pricing

My API key returns "Insufficient subscription tier"

This means your account is on the Free tier. Upgrade to STARTER or higher at /pricing

What are the rate limits for each tier?

STARTER: 30 requests/minute, PROFESSIONAL: 100 requests/minute, ENTERPRISE: 500 requests/minute. See our rate limits documentation for details.

How do I rotate my API keys?

Create a new API key in the dashboard, update your applications to use the new key, then delete the old key once all applications are migrated.