> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate expected LLM usage for an agent

> Reserved compatibility endpoint. Authorized requests return HTTP 503 while LLM cost estimates are unavailable.

<Warning>
  LLM cost estimates are currently unavailable. This endpoint returns `llm_estimate_unavailable` with HTTP 503. Retrying the request does not make an estimate available.
</Warning>


## OpenAPI

````yaml api-reference/openapi.json POST /v1/convai/agent/{agent_id}/llm-usage/calculate
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/agent/{agent_id}/llm-usage/calculate:
    post:
      tags:
        - Agents Platform
      summary: Calculate Expected Llm Usage For An Agent
      description: >-
        Reserved compatibility operation. Product-owned LLM cost estimates are
        not currently available, so authorized requests return
        llm_estimate_unavailable (HTTP 503).
      operationId: get_agent_llm_expected_cost_calculation
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LLMUsageCalculatorRequestModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLMUsageCalculatorResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/HTTPValidationError'
                  - $ref: '#/components/schemas/APIErrorResponse'
                title: Response 422 Get Agent Llm Expected Cost Calculation
        '503':
          description: LLM cost estimates are not currently available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        default:
          description: >-
            API error. Depending on the operation: 400 invalid request, 401
            authentication required, 402 insufficient credits, 403 permission
            denied, 404 resource not found, 409 conflict, 429 rate limit, 500
            internal failure, 502 upstream failure, 503 service unavailable, or
            504 upstream timeout. A failed response does not establish whether a
            state-changing operation completed; do not retry such operations
            without checking their outcome.
          headers:
            X-Request-Id:
              description: Request identifier, when available.
              schema:
                type: string
            Retry-After:
              description: >-
                When supplied, the delay in seconds or HTTP date before a
                subsequent request.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
components:
  schemas:
    LLMUsageCalculatorRequestModel:
      properties:
        prompt_length:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Length
          description: Length of the prompt in characters.
        number_of_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Number Of Pages
          description: Pages of content in pdf documents OR urls in agent's Knowledge Base.
        rag_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rag Enabled
          description: Whether RAG is enabled.
      type: object
      title: LLMUsageCalculatorRequestModel
    LLMUsageCalculatorResponseModel:
      properties:
        llm_prices:
          items:
            $ref: '#/components/schemas/LLMUsageCalculatorLLMResponseModel'
          type: array
          title: Llm Prices
      type: object
      required:
        - llm_prices
      title: LLMUsageCalculatorResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    APIErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/APIErrorDetail'
      type: object
      required:
        - detail
      title: APIErrorResponse
    LLMUsageCalculatorLLMResponseModel:
      properties:
        llm:
          $ref: '#/components/schemas/CatalogModelId'
        price_per_minute:
          type: number
          title: Price Per Minute
        price_per_message:
          type: number
          title: Price Per Message
      type: object
      required:
        - llm
        - price_per_minute
        - price_per_message
      title: LLMUsageCalculatorLLMResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    APIErrorDetail:
      properties:
        status:
          type: string
          title: Status
          description: >-
            Stable application error identifier, separate from the HTTP status
            code.
        message:
          type: string
          title: Message
          description: Customer-facing explanation of the error.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Request identifier for support and troubleshooting, when available.
      additionalProperties: true
      type: object
      required:
        - status
        - message
      title: APIErrorDetail
      description: Public error fields; domains may supply additional customer-safe detail.
    CatalogModelId:
      type: string
      maxLength: 128
      minLength: 3
      pattern: ^[a-z][a-z0-9_-]*/[A-Za-z0-9][A-Za-z0-9._:-]*$
      description: Provider-qualified model identifier.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.