---
title: "Calculate video generation cost"
method: POST
path: "/ai/generate-video/cost"
tags: ["AI"]
---

# Calculate video generation cost

`POST /ai/generate-video/cost`

## Request

- Base URL: `https://api.rendley.com/v1`
- URL: `https://api.rendley.com/v1/ai/generate-video/cost`
- Auth: API key in header `Authorization`

Calculate the credit cost of generating a video clip.

## Request body

- AiManagerTypesGenerateVideoDTO
  - `model_id` string
  - `params` object: Params is model-specific: its accepted fields are defined by the model in model_id, not by this endpoint. Fetch the JSON Schema for a model from GET /v1/ai/models/{model_id} — it is generated from the runtime validator and is the source of truth. GET /v1/ai/models lists the model ids.
  - `project_id` string
  - `workspace_id` string

## Response `200`

OK

- object
  - `data` integer: Success data
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/rendley/apis/rendley-api.md) - [All operations](https://skmtc.dev/rendley/apis/rendley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rendley/apis/rendley-api/revisions/7eb8713bbf78?raw)
