Models
GET /v1/modelsReturns a list of all available models with their pricing and metadata.
Response
Section titled “Response”{ "object": "list", "data": [ { "id": "gpt-4o-mini", "object": "model", "created": 1700000000, "owned_by": "uni", "provider": "openai", "context_window": 128000, "description": "Fast, affordable small model for lightweight tasks", "pricing": { "input_per_1k": 0.00015, "output_per_1k": 0.0006 } } ]}Model object
Section titled “Model object”| Field | Type | Description |
|---|---|---|
id | string | Model identifier — use this as the model parameter in requests |
object | string | Always "model" |
created | integer | Unix timestamp |
owned_by | string | Always "uni" |
provider | string | Upstream provider name |
context_window | integer | Maximum context window size in tokens |
description | string | Human-readable model description |
pricing.input_per_1k | number | Cost per 1,000 input tokens (USD) |
pricing.output_per_1k | number | Cost per 1,000 output tokens (USD) |
Example
Section titled “Example”curl https://api.aiand.com/v1/models \ -H "Authorization: Bearer sk-your-api-key"Cost calculation
Section titled “Cost calculation”Token cost is calculated as:
cost = (input_tokens / 1000 * input_per_1k) + (output_tokens / 1000 * output_per_1k)Credits are deducted automatically after each successful request. Failed requests (4xx/5xx) are not billed.