# Estimate cost

URL: https://clippie.ai/developers/docs/estimate-cost

Shows what a create tool would charge (credits and voiceover, caption and export minutes) and whether it would go through, without spending anything. Pass the tool name and the same input you would send it. Confirm the cost with the user before creating.

## At a glance

| Property | Value |
| --- | --- |
| REST | `POST https://api.clippie.ai/v1/estimate` |
| MCP tool | `estimate_cost` |
| Scope | `read` |
| Cost | Free. Works with a read-only key. |

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `tool` | body | string | Yes |  | A create tool name, e.g. generate_image. 1-80 chars. |
| `input` | body | object | No | `{}` | The tool's input. |

## Example

curl:

```bash
curl https://api.clippie.ai/v1/estimate \
  -H "Authorization: Bearer $CLIPPIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "create_ai_story_video",
    "input": {
      "prompt": "The lost library of Alexandria",
      "aspectRatio": "9:16",
      "durationSeconds": 60
    }
  }'
```

estimate-cost.mjs:

```js
const auth = { Authorization: `Bearer ${process.env.CLIPPIE_API_KEY}` };

const res = await fetch('https://api.clippie.ai/v1/estimate', {
  method: 'POST',
  headers: { ...auth, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "tool": "create_ai_story_video",
    "input": {
      "prompt": "The lost library of Alexandria",
      "aspectRatio": "9:16",
      "durationSeconds": 60
    }
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
console.log(await res.json());
```

## Response

`200` with JSON. The full response schema is in the [OpenAPI spec](https://api.clippie.ai/v1/openapi.json).

## From an MCP client

Your AI calls `estimate_cost` with the same fields as JSON arguments. See [MCP server](https://clippie.ai/developers/docs.md#mcp) to connect one.

tools/call:

```json
{
  "name": "estimate_cost",
  "arguments": {
    "tool": "create_ai_story_video",
    "input": {
      "prompt": "The lost library of Alexandria",
      "aspectRatio": "9:16",
      "durationSeconds": 60
    }
  }
}
```
