Skip to content

Model List

1. Overview

Returns the list of all models currently supported by the gateway.

2. Request

  • Method: GET
  • Endpoint:

    https://gateway.serevixai.ai/v1/models
    

3. Parameters

3.1 Header Parameters

Parameter Type Required Description Example
Authorization string Yes API key required for authentication, in the format Bearer $YOUR_API_KEY. Bearer $YOUR_API_KEY

4. Response

Status Code Description Schema
200 Model list returned successfully ModelsResponse
401 Authentication failed ErrorResponse

ModelsResponse

Field Type Description
data array Array of model objects. See below.
object string Fixed value list
success boolean Whether the request succeeded. true means success.

Model Object

Field Type Description
id string Model ID that can be used directly in API calls, for example o3-mini-2025-01-31-medium.
object string Fixed value model
created number Model creation time (Unix timestamp)
owned_by string Model owner, for example openai.
supported_endpoint_types array Supported endpoint protocol types, such as ["openai"]

5. Request Examples

GET /v1/models
Authorization: Bearer $YOUR_API_KEY
curl https://gateway.serevixai.ai/v1/models \
  -H "Authorization: Bearer $YOUR_API_KEY"
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/option"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("$YOUR_API_KEY"),
        option.WithBaseURL("https://gateway.serevixai.ai/v1"),
    )

    models, err := client.Models.List(context.Background())
    if err != nil {
        fmt.Println("error:", err)
        return
    }

    for _, m := range models.Data {
        fmt.Println(m.ID)
    }
}
from openai import OpenAI

client = OpenAI(
    api_key="$YOUR_API_KEY",
    base_url="https://gateway.serevixai.ai/v1"
)

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

6. Response Example

{
  "data": [
    {
      "id": "o3-mini-2025-01-31-medium",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai",
      "supported_endpoint_types": [
        "openai"
      ]
    }
  ],
  "object": "list",
  "success": true
}