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

# Get Asset Pricing

> Dry-run cost calculation for a model with given parameters — does not debit credits

## Overview

Returns the exact credit cost for a generation with the given parameters, without submitting a job and without debiting credits. Useful to display a price preview before letting the user submit.

## Authentication

<Info>
  This endpoint requires API key authentication. Include your API key in the `Authorization` header.
</Info>

## Request Body

<ParamField body="model" type="string" required>
  Model identifier (e.g. `veo-3.1`).
</ParamField>

<ParamField body="duration" type="integer">
  Duration **in seconds** (e.g. `8`). Used by video models. See the model's supported durations via [Get Model](/api-reference/assets/model).
</ParamField>

<ParamField body="resolution" type="string">
  Resolution (e.g. `720p`, `1080p`, `2K`).
</ParamField>

<ParamField body="model_settings" type="object">
  Custom model settings such as `generateAudio`. Some settings affect cost — see the model page.
</ParamField>

<ParamField body="image_count" type="number">
  Number of reference images. Used by models with per-image pricing (e.g. `reve-fast`).
</ParamField>

<ParamField body="generation_count" type="number" default="1">
  Number of variations. Multiplies `cost_per_generation`.
</ParamField>

## Response

<ResponseField name="model" type="string" />

<ResponseField name="cost_per_generation" type="number">
  Credits for one generation.
</ResponseField>

<ResponseField name="total_cost" type="number">
  `cost_per_generation × generation_count`.
</ResponseField>

<ResponseField name="currency" type="string">
  Always `credits`.
</ResponseField>

<ResponseField name="generation_count" type="number" />

<ResponseField name="normalized" type="object">
  Present **only when the engine coerced one of your inputs** to a different supported value
  (e.g. an unsupported duration snapped to the nearest valid one). Each field appears only if it
  differs from what you sent. Omitted entirely when nothing was changed.

  <Expandable title="properties">
    <ResponseField name="duration" type="number">
      Resolved duration in seconds.
    </ResponseField>

    <ResponseField name="resolution" type="string" />
  </Expandable>
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://app.hoox.video/api/public/v1/asset/pricing" \
    -H "Authorization: Bearer your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "veo-3.1",
      "duration": 8,
      "resolution": "1080p",
      "generation_count": 2
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://app.hoox.video/api/public/v1/asset/pricing",
      headers={"Authorization": "Bearer your_api_key"},
      json={
          "model": "veo-3.1",
          "duration": 8,
          "resolution": "1080p",
          "generation_count": 2,
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.hoox.video/api/public/v1/asset/pricing', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer your_api_key',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'veo-3.1',
      duration: 8,
      resolution: '1080p',
      generation_count: 2,
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "model": "veo-3.1",
    "cost_per_generation": 80,
    "total_cost": 160,
    "currency": "credits",
    "generation_count": 2
  }
  ```

  ```json 200 OK (input coerced) theme={null}
  {
    "model": "veo-3.1",
    "cost_per_generation": 80,
    "total_cost": 160,
    "currency": "credits",
    "generation_count": 2,
    "normalized": {
      "duration": 8
    }
  }
  ```

  ```json 400 Missing Model theme={null}
  {
    "error": "Validation failed",
    "details": [
      { "code": "missing_field", "message": "model is required", "field": "model" }
    ]
  }
  ```

  ```json 404 Unknown Model theme={null}
  {
    "error": "Model \"not-a-real-model\" not found",
    "details": [
      { "code": "model_not_found", "message": "Model \"not-a-real-model\" not found" }
    ]
  }
  ```
</ResponseExample>
