---
updatedAt: 2026-04-21T08:46:19.000Z
agentTools:
  projectIndex: https://docs.cast.ai/llms.txt
---

# Deprecated: Analytics are available via the analytics API.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "https://api.cast.ai/",
      "description": "US endpoint"
    },
    {
      "url": "https://api.eu.cast.ai/",
      "description": "EU endpoint"
    }
  ],
  "info": {
    "title": "CAST.AI API documentation",
    "version": "1.0.0",
    "description": "### Feature maturity indicators (may appear on resources, operations and request/response fields)\n - **(BETA)** - new or experimental features, subject to change\n - **(Deprecated)** - outdated or replaced features (a reason and removal date will be provided in the description)\n"
  },
  "tags": [
    {
      "description": "(BETA) Provides the API for the AI Enabler.",
      "name": "AIEnablerAPI"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    },
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/v1/llm/openai/chat-completions/reports/categories/{categoryId}/recommendations": {
      "get": {
        "operationId": "AIEnablerAPI_GetChatCompletionsCategoryRecommendationsReport",
        "parameters": [
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fromTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "toTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/aioptimizer.v1.GetChatCompletionsCategoryRecommendationsReportResponse"
                }
              }
            },
            "description": "A successful response."
          }
        },
        "summary": "Deprecated: Analytics are available via the analytics API.",
        "tags": [
          "AIEnablerAPI"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    },
    "schemas": {
      "aioptimizer.v1.Costs": {
        "properties": {
          "daily": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "totalPerTokensIn": {
            "type": "string"
          },
          "totalPerTokensOut": {
            "type": "string"
          },
          "perMilTokens": {
            "type": "string"
          },
          "perMilTokensIn": {
            "type": "string"
          },
          "perMilTokensOut": {
            "type": "string"
          }
        },
        "required": [
          "daily",
          "perMilTokens",
          "perMilTokensIn",
          "perMilTokensOut",
          "total",
          "totalPerTokensIn",
          "totalPerTokensOut"
        ],
        "type": "object"
      },
      "aioptimizer.v1.GetChatCompletionsCategoryRecommendationsReportResponse": {
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/aioptimizer.v1.RecommendationsSummary"
          },
          "recommendation": {
            "$ref": "#/components/schemas/aioptimizer.v1.RecommendationsItem"
          }
        },
        "type": "object"
      },
      "aioptimizer.v1.RecommendationsItem": {
        "properties": {
          "id": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "requestCount": {
            "format": "int32",
            "type": "integer"
          },
          "routing": {
            "$ref": "#/components/schemas/aioptimizer.v1.Routing"
          },
          "tokenCount": {
            "$ref": "#/components/schemas/aioptimizer.v1.TokenCount"
          },
          "costs": {
            "$ref": "#/components/schemas/aioptimizer.v1.Costs"
          },
          "recommendedModelCosts": {
            "$ref": "#/components/schemas/aioptimizer.v1.Costs"
          },
          "originalCost": {
            "type": "string"
          },
          "achievedSavings": {
            "type": "string"
          },
          "achievedSavingsPercentage": {
            "type": "string"
          },
          "routed": {
            "type": "boolean"
          },
          "originalModel": {
            "type": "string"
          }
        },
        "required": [
          "achievedSavings",
          "achievedSavingsPercentage",
          "category",
          "costs",
          "id",
          "originalCost",
          "originalModel",
          "recommendedModelCosts",
          "requestCount",
          "routed",
          "routing",
          "tokenCount"
        ],
        "type": "object"
      },
      "aioptimizer.v1.RecommendationsSummary": {
        "properties": {
          "costs": {
            "$ref": "#/components/schemas/aioptimizer.v1.Costs"
          },
          "recommendedModelCosts": {
            "$ref": "#/components/schemas/aioptimizer.v1.Costs"
          },
          "originalCost": {
            "type": "string"
          },
          "achievedSavings": {
            "type": "string"
          },
          "achievedSavingsPercentage": {
            "type": "string"
          }
        },
        "required": [
          "achievedSavings",
          "achievedSavingsPercentage",
          "costs",
          "originalCost",
          "recommendedModelCosts"
        ],
        "type": "object"
      },
      "aioptimizer.v1.Routing": {
        "properties": {
          "from": {
            "$ref": "#/components/schemas/aioptimizer.v1.RoutingModel"
          },
          "to": {
            "$ref": "#/components/schemas/aioptimizer.v1.RoutingModel"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "aioptimizer.v1.RoutingModel": {
        "properties": {
          "model": {
            "type": "string"
          },
          "fineTuned": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          }
        },
        "required": [
          "fineTuned",
          "model",
          "provider"
        ],
        "type": "object"
      },
      "aioptimizer.v1.TokenCount": {
        "properties": {
          "in": {
            "format": "int32",
            "type": "integer"
          },
          "out": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "in",
          "out"
        ],
        "type": "object"
      }
    }
  }
}
```