Models API
Access information about available AI models through the ModelProxy.ai Models API
Models API
The Models API provides information about all AI models available through ModelProxy.ai. Use this endpoint to discover models, check their pricing, and determine which models would be most suitable for your application.
Endpoint#
GET https://modelproxy.theitdept.au/api/v1/models
Headers#
Header | Value | Description |
---|---|---|
Authorization | Bearer YOUR_API_KEY | Your API key (optional) |
Parameters#
This endpoint does not accept any query parameters.
Response Format#
The response is a JSON object containing an array of model objects:
{
"data": [
{
"id": "openai/gpt-4o",
"name": "openai/gpt-4o",
"description": "Latest GPT-4 model with vision capabilities and improved performance",
"pricing": {
"prompt": "0.005",
"completion": "0.015"
}
},
{
"id": "claude-3-opus-20240229",
"name": "Claude 3 Opus",
"description": "Most powerful Claude model with exceptional understanding",
"pricing": {
"prompt": "0.015",
"completion": "0.075"
}
},
{
"id": "meta/llama-3.1-8b-instruct",
"name": "Llama 3.1 8B Instruct",
"description": "Meta's smaller Llama 3.1 model optimized for instruction following",
"pricing": {
"prompt": "0.0002",
"completion": "0.0002"
}
}
]
}
Response Fields#
Field | Type | Description |
---|---|---|
id | string | The model identifier to use in requests to the Chat Completions API |
name | string | Human-readable name of the model |
description | string or null | Description of the model's capabilities and use cases |
pricing | object | Pricing information for the model |
pricing.prompt | string | Cost per 1,000 input tokens, in USD |
pricing.completion | string | Cost per 1,000 output tokens, in USD |
Authorization#
This endpoint can be called without authentication to get a list of all available models. However, if you provide an API key:
- The response will be filtered to show only models that the specific API key is authorized to use (if the key has model restrictions)
- The request will count toward your API usage metrics for analytics purposes
Example Request#
curl https://modelproxy.theitdept.au/api/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
Error Codes#
Status Code | Error Type | Description |
---|---|---|
500 | Internal Server Error | Failed to fetch models |
Usage Tips#
- Call this endpoint to determine which models are available for your application
- Compare pricing information to estimate costs for your use case
- Use the model
id
values returned by this endpoint in your requests to the Chat Completions API - Consider calling this endpoint periodically in your application to detect newly added models
Related Endpoints#
- Chat Completions API - Use the models listed by this endpoint
- Usage API - Monitor your usage of different models