We use cookies to enhance your experience and measure how the site performs. Choose "Essential Only" to disable analytics. Read our Privacy Policy.

    Odeus Docs

    Models for Assistant API

    Retrieve all available models for use with the Assistant API.

    Models for Assistant API

    Retrieve all available models for use with the Assistant API.

    The Assistants API will be deprecated on 30 April.

    For new projects, we recommend using the Agents API. The Agents API provides native Vercel AI SDK compatibility and removes custom transformations.

    See the migration guide to learn about the differences.

    Retrieve the list of models and their ids, available for use with the Assistant API. This endpoint is useful when you want to see which models you can use when creating a temporary assistant.

    Example Request

    const axios = require("axios");
    
    async function getAvailableModels() {
      try {
        const response = await axios.get("https://api.odeus.ai/assistant/v1/models", {
          headers: {
            Authorization: "Bearer YOUR_API_KEY",
          },
        });
    
        console.log("Available models:", response.data.data);
      } catch (error) {
        console.error("Error fetching models:", error);
      }
    }
    

    Response Format

    The API returns a list of available models in the following format:

    Response Fields

    Always 'list', indicating the top-level JSON object type.

    "> Array containing available model objects.

    Unique identifier of the model (e.g., gpt-5).
    
    
    
    Always 'model', indicating the object type.
    
    
    
    Unix timestamp (ms) when the model was created.
    
    
    
    Region where the model is available (e.g., "eu", "us", "global").
    
    
    
    Whether this model supports extended thinking mode.
    
    {
      "object": "list",
      "data": [
        {
          "id": "gpt-5",
          "object": "model",
          "created": 1686935735000,
          "region": "eu",
          "supportsExtendedThinking": false
        }
        // …other models
      ]
    }
    

    Error Handling

    try {
      const response = await axios.get("https://api.odeus.ai/assistant/v1/models", {
        headers: {
          Authorization: "Bearer YOUR_API_KEY",
        },
      });
    } catch (error) {
      if (error.response) {
        switch (error.response.status) {
          case 400:
            console.error("Invalid request parameters");
            break;
          case 500:
            console.error("Internal server error");
            break;
        }
      }
    }
    

    You can use any of these model IDs when creating a temporary Assistant through the assistant API. Simply specify the model ID in the model field of your assistant configuration:

    const response = await axios.post("https://api.odeus.ai/assistant/v1/chat/completions", {
      assistant: {
        name: "Custom Assistant",
        instructions: "You are a helpful Assistant",
        model: "gpt-5", // Specify the model ID here
      },
      messages: [
        { role: "user", content: "Hello!" },
      ],
    });
    
    curl https://api.odeus.ai/assistant/v1/chat/completions \
      -H "Authorization: Bearer $API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "assistant": {
          "name": "Custom Assistant",
          "instructions": "You are a helpful assistant",
          "model": "gpt-5"
        },
        "messages": [
          { "role": "user", "content": "Hello!" }
        ]
      }'
    

    Migrating to Agents API

    The new Agents API offers improved compatibility with modern AI SDKs. The models endpoint has identical functionality.

    See the equivalent endpoint in the Agents API:

    Odeus intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

    OpenAPI

    openapi: 3.0.0
    info:
      title: Odeus API
      version: 3.0.0
    servers:
      - url: https://api.odeus.ai
    security:
      - bearerAuth: []
    paths:
      /assistant/v1/models:
        get:
          tags:
            - Assistant
          summary: '[Deprecated] Lists the available models'
          description: >-
            This endpoint is deprecated. Please use /agent/v1/models for new
            integrations. Returns a list of models that are available for use with
            the API.
          parameters: []
          responses:
            '200':
              description: List of available models
              content:
                application/json:
                  schema:
                    type: object
                    required:
                      - object
                      - data
                    properties:
                      object:
                        type: string
                        enum:
                          - list
                      data:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - object
                            - created
                            - owned_by
                          properties:
                            id:
                              type: string
                              description: The model identifier
                            object:
                              type: string
                              enum:
                                - model
                              description: The object type, which is always "model"
                            created:
                              type: integer
                              format: int64
                              description: >-
                                Unix timestamp (in milliseconds) of when the model
                                was created
                            owned_by:
                              type: string
                              enum:
                                - system
                              description: The organization that owns the model
                  example:
                    object: list
                    data:
                      - id: gpt-5
                        object: model
                        created: 1686935735000
                        owned_by: system
                      - id: gpt-5-mini
                        object: model
                        created: 1686935735000
                        owned_by: system
            '400':
              description: Invalid request parameters
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      message:
                        type: array
                        items:
                          type: object
                          description: Validation error details
            '429':
              description: Rate limit exceeded
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      message:
                        type: string
            '500':
              description: Internal server error
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Internal Server Error
          deprecated: true
    components:
      securitySchemes:
        bearerAuth:
          type: http
          scheme: bearer
          bearerFormat: API Key
          description: API key as Bearer token. Format "Bearer YOUR_API_KEY"