# Estimate embedding cost

Estimates the cost of generating embeddings for posts. If no modelId is provided, uses the currently configured model. Returns whether this is a full recalculation (different model) or partial (only missing).

RBAC: requires AdminSettings.Manage

Endpoint: GET /api/v1/admin/embeddings/estimate-cost
Version: 1.0
Security: header

## Query parameters:

  - `modelId` (string,null)
    Model ID to estimate cost for. Uses current model if not provided.
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

## Response 200 fields (application/json):

  - `modelId` (string, required)
    Model ID used for estimation
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `modelExternalId` (string, required)
    Model external ID (e.g., text-embedding-3-small)

  - `modelName` (string, required)
    Model name

  - `postsToProcess` (integer, required)
    Number of posts to process

  - `estimatedTokens` (integer, required)
    Estimated total tokens

  - `estimatedCostUsd` (number, required)
    Estimated cost in USD

  - `inputPer1MTokens` (number,null, required)
    Price per 1M input tokens in USD

  - `vectorDimensions` (integer, required)
    Vector dimensions for this model

  - `isFullRecalculation` (boolean, required)
    Whether this is a full recalculation (new model) or partial (only missing embeddings)

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


