Models
List Models
GET https://chat.maritaca.ai/api/models
The model list provides an overview of the models available in the API, including basic information such as owner and availability.
Request Example
- Default
- Direct API Call
import openai
client = openai.OpenAI(
api_key=maritaca_key,
base_url="https://chat.maritaca.ai/api",
)
client.models.list()
import requests
import json
base_url = "https://chat.maritaca.ai/api/models"
headers = {
"Authorization": f"Key {api_key}",
"Content-Type": "application/json"
}
# Makes a direct GET request to the API
response = requests.get(base_url, headers=headers)
# Checks the response status and displays the content
if response.status_code == 200:
models = response.json()
print(models["data"]) # Displays available models
else:
print(f"Error: {response.status_code}")
print(response.text)