block-quote On this pagechevron-down
GitBook Assistant Ask chevron-down Product Guides API Reference Excellent! Below is a detailed and well-structured API Reference section for the Uniport AI Docs , covering all the submenus with comprehensive content, developer-friendly guidance, and examples.
📑 API Reference
🔐 Authentication
All requests to the Uniport API must be authenticated using your API key. Authentication is done using the Authorization header with the Bearer schema.
How to Authenticate
Include your API key in every request:
Copy Authorization : Bearer YOUR_API_KEY Example with curl:
Copy curl https://api.uniportai.site/v1/chat/completions \
-H " Authorization: Bearer sk-abc123xyz " \
-H " Content-Type: application/json " \
-d ' {...} ' ⚠️ Keep your key secure. Do not expose it in frontend apps or public repositories.
🧠 Models & Capabilities
Uniport provides access to a wide range of AI models, including open-source and commercial models. Supported categories include:
Each model includes metadata such as:
Supported input/output format
You can browse model details in the Playgroundarrow-up-right or via the /v1/models endpoint.
All accounts have default rate limits based on their plan:
How Limits Work
Rate limits are per API key .
Exceeding limits returns:
429 Too Many Requests
Headers Returned:
❌ Error Handling
Uniport returns standard HTTP status codes with informative error messages.
Example Error Response:
📊 Usage & Billing
How Usage Is Tracked
Each request contributes to your billing:
Text : Billed per 1,000 tokens
Image : Billed per generation
Audio : Billed per second of audio processed
Embeddings : Billed per input unit (e.g., tokens or docs)
How to View Usage
Go to Billing → Usage Logs
See token counts, requests per model, and estimated cost
Billing Intervals
Billed monthly for Pro and Enterprise plans
Free tier resets every 30 days
Use streaming for chat models to reduce latency.
Cache embeddings for repeated queries.
Rotate models easily with minimal code changes thanks to Uniport's consistent API format.
Compare real-time cost/performance in the Model Comparator .
Would you like me to proceed with content for the AI Endpoints section next (e.g., /v1/chat/completions, /v1/embeddings, etc.)?
Last updated 8 months ago