Skip to content

List All Models

Retrieve a list of all models currently available in Siraya AI. This include LLMs, image models, video models, and more.

Request

Endpoint: GET https://llm.siraya.pro/v1/models

curl https://llm.siraya.pro/v1/models \
  -H "Authorization: Bearer <API_KEY>"
from openai import OpenAI

client = OpenAI(
    base_url="https://llm.siraya.pro/v1",
    api_key="<API_KEY>"
)

models = client.models.list()
for model in models:
    print(model.id)

Headers

Header Value
Authorization Bearer <API_KEY> (Required)

Response

Returns a list of model objects.

{
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai"
    },
    {
      "id": "claude-3-5-sonnet",
      "object": "model",
      "created": 1626777600,
      "owned_by": "anthropic"
    }
  ],
  "success": true
}

The id field can be used in the model parameter of completion and generation requests.