# Using from Claude Code & Cursor Source: https://agenthook.mintlify.app/agents Hand the CLI to your coding agent — it's built for this. AgentHook is designed to be driven by agents, not humans in a dashboard. **The CLI is the agent surface today**: any agent that can run shell commands (Claude Code, Cursor, Codex-style agents, n8n exec nodes) can generate media with it. An MCP server and an installable skill pack are coming later — both will be thin wrappers over the same API. ## Setup Install and authenticate once on the machine your agent runs on: ```bash theme={null} npm i -g getagenthook agenthook login # paste an API key from the console ``` (Keys are created in the [console](https://getagenthook.com) — see [Authentication](/authentication).) ## Tell your agent about it Add a note to your project's agent instructions (`CLAUDE.md`, Cursor rules, etc.): ```markdown theme={null} ## Media generation The `agenthook` CLI generates videos and images (real credits — don't run speculatively): - `agenthook tools` — print every tool and its full input schema - `agenthook run make_video --prompt "..."` — video; put spoken lines in the prompt ('She says: "..."'); flags: --captions, --enhance-prompt; with reference images, --owns-references is required (likeness consent) - `agenthook run make_image --prompt "..."` — images (refs = editing) - `agenthook run caption_video --video-url ` — burn in subtitles - `agenthook list --search ""` — find past generations before making new ones - `agenthook balance` — check credits first Runs print a durable media URL when done. ``` ## Why this works well for agents * **Self-describing schemas.** `agenthook tools` (backed by `GET /api/v1/tools`) prints every argument, type, default, and enum — the agent never has to guess or memorize the API. * **Local pre-validation.** The CLI checks everything deterministically checkable — enum values, prompt length caps, references without the `owns_references` attestation — *before* any network call, and fails with a message the agent can read and self-correct from. No credits are spent on malformed requests. * **Submit–poll handled for you.** `run` blocks until the media is ready and prints the URL — one command, one result, no polling loop for the agent to write. * **Searchable memory.** `agenthook list --search "..."` full-text-searches past runs (prompt, enhanced prompt, transcript), so an agent can reuse yesterday's video instead of paying to regenerate it. ## No CLI? Use HTTP directly Everything the CLI does is plain REST — agents that only speak HTTP can hit the API directly: ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_image/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "Flat-lay of a lime-green running shoe on dark slate", "aspect_ratio": "1:1"}' ``` Then poll `GET /api/v1/runs/{run_id}` until `completed`. See the [Quickstart](/quickstart) for the full flow. ## Coming later * **MCP server** — the same three tools over the Model Context Protocol, for MCP-native clients. * **Skill pack** — installable agent skills that wrap the CLI with usage guidance. Both will read their schemas from `GET /api/v1/tools`, same as the CLI — one schema source, no drift. # Authentication Source: https://agenthook.mintlify.app/authentication Bearer API keys on every request. Every API request must carry an API key as a Bearer token: ```bash theme={null} curl https://getagenthook.com/api/v1/me \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" ``` ## Creating keys API keys are created and revoked in the [console](https://getagenthook.com) after signup. A key's secret is **shown exactly once at creation** — copy it then; only a hashed form is stored on our side, so it cannot be recovered later. Lost a key? Revoke it and create a new one. For the CLI, run `agenthook login` once and paste the key; it is stored locally and attached to every request. ## Scope and safety * A key acts with the full permissions of the account that created it: it can create runs, spend the account's credits, and read the account's runs, balance, and ledger. It can never see another account's data. * Credits are **prepaid**, and every run debits atomically before any work is dispatched — a leaked key can never spend more than the account's remaining balance. Revoke leaked keys immediately in the console. * Keys are hashed at rest. ## Auth errors | Status | Meaning | | ------ | ----------------------------------------------------------------------------------------------------------- | | `401` | Missing, malformed, or revoked key. | | `403` | Valid key, but the account is suspended (see [moderation](/credits-and-refunds#moderation-and-suspension)). | Error responses share one shape everywhere: ```json theme={null} { "error": "invalid API key", "code": "unauthorized" } ``` `code` is machine-readable (`validation_error`, `insufficient_credits`, `rate_limited`, …); `details` carries per-field issues on validation failures; `retry_after` accompanies `429`s. See [rate limits](/credits-and-refunds#rate-limits). # Credits & refunds Source: https://agenthook.mintlify.app/credits-and-refunds Prepaid credits, per-run pricing, instant refunds on failure, rate limits. ## How credits work **1 credit = \$0.01.** Credits are prepaid: every run debits your balance atomically at creation, before any work is dispatched. If your balance can't cover a run, the API returns `402` with `code: "insufficient_credits"` and nothing is charged. Check your balance and full ledger any time: ```bash theme={null} curl https://getagenthook.com/api/v1/me \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" curl https://getagenthook.com/api/v1/credits/history \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" ``` The ledger records every movement — `grant`, `debit`, `refund` — with the run it belongs to, so spend is fully auditable. ## What runs cost The exact charge for a run is returned as `credits_charged` in the `202` response — that number is authoritative. The shape of the pricing: * **`make_video`** — priced per second, scaled by model and `quality` (`pro` renders 1080p and costs a multiple of `standard`'s 720p). Attaching reference images adds a small surcharge on some models. * **`make_image`** — priced per image (`count` multiplies), scaled by `resolution` (`1k` \< `2k` \< `4k`) and the routed model. * **`caption_video`** — flat **15 credits** per video. Add-ons, on top of the base: | Add-on | Cost | | --------------------------------------- | ---------------------------------------------------------------- | | `enhance_prompt: true` (video or image) | +3 credits | | `captions: true` on `make_video` | +15 credits (the flat caption charge, chained into the same run) | Representative examples at current rates (subject to change — always trust `credits_charged`): | Run | Credits | | ------------------------------------------------------ | ------- | | `make_video`, seedance-2, `standard`, 5s | 100 | | `make_video`, seedance-2, `pro`, 5s | 313 | | `make_video`, kling-3, `standard`, 5s, audio on | 94 | | `make_image`, no refs (gpt-image-2), 1 image, 9:16 | 10 | | `make_image`, with refs (nano-banana-2), `1k`, 1 image | 12 | | `caption_video` | 15 | ## Instant refunds on failure If a run ends in `failed` — a provider error, a moderation rejection, an infrastructure hiccup — **the full charge is refunded to your balance instantly and automatically**, as a compensating `refund` entry in the ledger. No support ticket, no waiting period. A run that got stuck without ever finishing is detected by a background sweep, marked failed, and refunded the same way. You only ever pay for runs that complete. ## Trial credits New accounts receive a **one-time grant of 30 trial credits** at signup — enough to try image generation and captioning end to end. Top-ups are self-serve: buy a credit pack from the [console credits page](https://getagenthook.com/credits) — checkout is handled by Polar, credits land on your account automatically, and they never expire. ## Rate limits Limits are per API key, over a one-minute window: | Bucket | Limit | | ------------------------------------------- | ----------- | | Run creation (`POST /api/v1/tools/*/run`) | 10 / minute | | Reads (runs, generations, balance, history) | 60 / minute | Exceeding a limit returns `429` with a `Retry-After` header and a `retry_after` field (seconds) in the body: ```json theme={null} { "error": "rate limit exceeded", "code": "rate_limited", "retry_after": 42 } ``` Back off for `retry_after` seconds and retry. Rate-limited requests are never charged. ## Moderation and suspension AgentHook is a **SFW-only** service. Generations that violate the underlying providers' content rules fail with a clear moderation error — and are refunded like any other failure. However, repeated moderation rejections accumulate strikes against the account; past a threshold the account is suspended and new runs are refused with `403`. Don't use refunds as a free retry loop on disallowed content. # Introduction Source: https://agenthook.mintlify.app/introduction An agent-facing media generation API — video, images, and captions over one REST surface. AgentHook is a hosted media-generation API built for AI agents. Claude Code, Cursor, n8n — anything that can run a CLI command or make an HTTP call — can create social-media-ready content: UGC-style talking-head video, images (including reference-driven edits), and burned-in captions. There is no timeline editor and no render farm to babysit. Your agent describes what it wants, the API returns a durable URL to the finished media. ## The tools | Tool | What it does | | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`make_video`](/tools/make-video) | Prompt (+ optional reference images) → video with native audio. A person described in the prompt speaks the lines you write. Optionally chains captioning onto the result. | | [`make_image`](/tools/make-image) | Prompt (+ optional reference images) → images. With references it edits/composes from them; without, it generates from text. | | [`caption_video`](/tools/caption-video) | Existing video URL → the same video with styled, burned-in subtitles (`movie` or `tiktok` preset). | | [`create_influencer`](/tools/create-influencer) | Rough idea + name → a reusable, account-bound character (portrait + character sheet). Reference it by slug via `--influencer` on every later `make_video` and `make_image` to keep the same person across generations. | ## How every run works All three tools share one uniform, async shape: 1. `POST /api/v1/tools/{tool}/run` with a JSON body → `202` with a `run_id`. Credits are debited atomically at this moment. 2. Poll `GET /api/v1/runs/{run_id}` until `status` is `completed` or `failed`. 3. `completed` → `output` holds durable URLs to your media. Outputs are stored on our CDN and do not expire. 4. `failed` → your credits are **refunded instantly and automatically**. See [Credits & refunds](/credits-and-refunds). Run states: `queued` → `processing` → `completed` | `failed`. ## Built for agents * **Self-describing.** `GET /api/v1/tools` serves the full input schema for every tool — names, types, defaults, enums. Wrappers (the CLI today; MCP and a skill pack later) read schemas from the API instead of duplicating them. * **Deterministic validation.** The [CLI](/quickstart) pre-validates inputs locally against those schemas before spending a network call or a credit; the server enforces the same rules authoritatively. * **Searchable history.** `GET /api/v1/generations?q=...` full-text-searches your past runs by prompt, enhanced prompt, and transcript — so an agent can find "that video about the standing desk" without storing anything itself. * **Credit-metered.** Prepaid credits, atomic debits, instant refunds on failure, and a full ledger at `GET /api/v1/credits/history`. ## Next steps Sign up, grab a key, and generate your first talking-head video in minutes. Bearer API keys — how to create and use them. Every argument, type, default, and enum for the three tools. Hand the CLI to your coding agent. # Quickstart Source: https://agenthook.mintlify.app/quickstart From zero to a talking-head video URL. Base URL for all API calls: `https://getagenthook.com/api/v1` ## 1. Sign up and create an API key 1. Sign up at the [console](https://getagenthook.com) (email + password, bot-check gated). New accounts receive a one-time grant of trial credits. 2. In the console, create an API key. **The key is shown once at creation — copy it immediately.** Export it for the examples below: ```bash theme={null} export AGENTHOOK_API_KEY="" ``` ## 2. Install the CLI ```bash theme={null} npm i -g getagenthook agenthook login # paste your API key when prompted ``` The CLI is a thin wrapper over the API: it fetches the tool schemas from `GET /api/v1/tools` and validates your input locally — bad enum values, over-long prompts, or reference images without the ownership attestation are rejected before any network call or credit spend. ## 3. First talking-head video (CLI) Describe the person and put the spoken lines in the prompt — the video model generates the speech audio natively: ```bash theme={null} agenthook run make_video \ --prompt 'A woman in her late 20s with shoulder-length brown hair, sitting in a bright home office, talking directly to camera in a casual selfie framing. She says: "I tested this standing desk for 30 days — here is what nobody tells you."' ``` The CLI submits the run, polls until it finishes, and prints the MP4 URL. Useful commands: ```bash theme={null} agenthook tools # print every tool schema agenthook balance # credit balance agenthook history # credit ledger agenthook list # your past runs agenthook list --search "standing desk" # full-text search past runs ``` ## 4. First talking-head video (curl) Submit the run: ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_video/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A woman in her late 20s with shoulder-length brown hair, sitting in a bright home office, talking directly to camera in a casual selfie framing. She says: \"I tested this standing desk for 30 days — here is what nobody tells you.\"", "aspect_ratio": "9:16" }' ``` Response (`202`): ```json theme={null} { "run_id": "run_abc123", "status": "queued", "credits_charged": 100 } ``` Poll until it completes: ```bash theme={null} curl https://getagenthook.com/api/v1/runs/run_abc123 \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" ``` When `status` is `completed`, `output` holds the playable MP4 URL: ```json theme={null} { "id": "run_abc123", "tool": "make_video", "model": "seedance-2", "status": "completed", "output": ["https://media.agenthook.com/users/u_1/runs/run_abc123/0.mp4"], "credits_charged": 100, "error": null } ``` If `status` is `failed`, the debited credits have already been refunded — see [Credits & refunds](/credits-and-refunds). ## 5. Explore the rest of the API ```bash theme={null} # Tool schemas (the single source the CLI validates against) curl https://getagenthook.com/api/v1/tools \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" # Your balance curl https://getagenthook.com/api/v1/me \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" # Past runs, filterable and searchable curl "https://getagenthook.com/api/v1/generations?tool=make_video&q=standing+desk" \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" # Credit ledger curl https://getagenthook.com/api/v1/credits/history \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" ``` Next: the full argument reference for [`make_video`](/tools/make-video), [`make_image`](/tools/make-image), and [`caption_video`](/tools/caption-video). # caption_video Source: https://agenthook.mintlify.app/tools/caption-video Burn styled subtitles into an existing video. ``` POST /api/v1/tools/caption_video/run ``` Takes a video URL, transcribes the speech with word-level timestamps, and returns the same video with styled subtitles burned in. Two presets: `movie` (clean cinematic lower-thirds) and `tiktok` (bold word-by-word social style). Works on any video you have a URL for — including videos generated here. (If you're generating the video in the same breath, prefer [`make_video` with `captions: true`](/tools/make-video) — it chains both steps in one run.) ## Arguments | Argument | Type | Required | Default | Description | | ----------- | ------------ | -------- | --------- | ------------------------------------------------------------- | | `video_url` | string (URL) | yes | — | Publicly fetchable URL of the video to caption. | | `style` | string | no | `"movie"` | One of `movie`, `tiktok`. | | `language` | string | no | `"auto"` | Spoken-language hint for transcription. Default auto-detects. | ## Example ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/caption_video/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "video_url": "https://media.agenthook.com/users/u_1/runs/run_abc123/0.mp4", "style": "tiktok" }' ``` ## Response `202` with `run_id`; poll `GET /api/v1/runs/{run_id}`. On `completed`: * `output[0]` — the captioned MP4, on durable storage. * `transcript` — the full transcription text, stored on the run and full-text searchable via `GET /api/v1/generations?q=...`. On `failed`, the flat caption charge is [refunded instantly](/credits-and-refunds#instant-refunds-on-failure). ## Pricing Captioning is a flat **15 credits** per video, regardless of length or style — see [Credits & refunds](/credits-and-refunds#what-runs-cost). # create_influencer Source: https://agenthook.mintlify.app/tools/create-influencer Create a reusable, account-bound character — a hero portrait plus a multi-view character sheet — usable on every later run with --influencer. ``` POST /api/v1/tools/create_influencer/run ``` Turns a rough idea (`"a warm, freckled woman in her late 20s, indie-brand founder energy"`) plus a name into a **reusable character bound to your account**: a hero portrait and a composite multi-view character sheet. Save it once, then reference it by slug on every later `make_video` and `make_image` — the server attaches the portrait and sheet as references and prepends the stored appearance description, so the same person carries across generations. The idea prompt is **rewritten server-side before generation** into a director-grade portrait prompt — there is no `enhance_prompt` flag on this tool, the rewrite is always on and included in the flat price. ## Arguments | Argument | Type | Required | Default | Description | | -------- | ------ | -------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `prompt` | string | yes | — | A rough idea of the character. It is auto-rewritten server-side into a full portrait prompt before generation — write a brief, not a screenplay. | | `name` | string | yes | — | Display name, 1–60 chars (e.g. `Maya`). | | `slug` | string | no | derived from `name` | The reference handle you pass later as `--influencer `. Lowercase `[a-z0-9-]`, up to 40 chars. Omit it to derive one from the name. Must be unique within your account — a collision returns `409`. | ## Create one ```bash theme={null} agenthook run create_influencer \ --prompt "a warm, freckled woman in her late 20s, indie skincare founder energy, natural makeup" \ --name Maya --slug maya ``` Or over the API: ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/create_influencer/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "a warm, freckled woman in her late 20s, indie skincare founder energy, natural makeup", "name": "Maya", "slug": "maya" }' ``` Flat **20 credits** — see [pricing](/credits-and-refunds#what-runs-cost). Use `--dry-run` (or `"dry_run": true`) to confirm the price for free first; it reports 20. ## Response `202` with the queued run; poll `GET /api/v1/runs/{run_id}` as with any tool. On `completed`, `output` holds **two durable URLs**: * `output[0]` — the hero portrait. * `output[1]` — the composite multi-view character sheet (full-body and close-up views on a neutral background). Both are saved to your account as the influencer's references. On `failed`, the 20 credits are [refunded instantly](/credits-and-refunds#instant-refunds-on-failure). ## Use an influencer Pass `--influencer ` (API: `"influencer": ""`) to `make_video` or `make_image`. The server attaches the influencer's portrait and character sheet as references and prepends its appearance description to your prompt — you write only the action, not the looks. ```bash theme={null} agenthook run make_video \ --influencer maya \ --prompt 'talking to camera in a bright bathroom: "Okay, here is my actual morning routine."' ``` ```bash theme={null} agenthook run make_image \ --influencer maya \ --prompt "holding a serum bottle at a sunlit kitchen counter, editorial product shot" ``` A few things to know: * **Consistency is strong, not pixel-perfect.** Reference-conditioned identity holds the character across generations well, but expect small drift in fine details from run to run. * **No `owns_references` needed for the influencer's own refs** — they are platform-generated, so the ownership attestation does not apply to them. If you *also* attach your own `reference_images` in the same run, those still require `owns_references: true`. * **Reference surcharge on Seedance.** A referenced `seedance-2` run carries the standard **+10%** reference surcharge (the provider charges it). * **Kling reference cap.** On `kling-3`, an influencer occupies 2 of the model's 4 reference slots, so you can attach **at most 2** of your own `reference_images` alongside it. Over that returns a `400`. * **Unknown slug → `400` before any charge.** If the slug does not exist on your account, the run is rejected with a message naming the slug, and nothing is debited. ## Manage your influencers List and delete over the CLI: ```bash theme={null} agenthook influencers # list slug, name, portrait URL agenthook influencers:delete maya # remove the influencer ``` Or over the API, with your API key: ```bash theme={null} curl https://getagenthook.com/api/v1/influencers \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" curl -X DELETE https://getagenthook.com/api/v1/influencers/maya \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" ``` An account can hold up to **100** influencers. Deleting one removes the saved asset (you can no longer reference it by slug), but any media you already generated with it keeps its permanent CDN URLs — deletion does not touch your gallery history. ## Pricing Flat **20 credits** (\$0.20) per influencer, regardless of the prompt — the always-on prompt rewrite, the portrait, and the character sheet are all included. See [Credits & refunds](/credits-and-refunds#what-runs-cost). # make_image Source: https://agenthook.mintlify.app/tools/make-image Generate or edit images from a prompt and optional reference images. ``` POST /api/v1/tools/make_image/run ``` Generates images from a text prompt. With `reference_images` attached it edits/composes from them (put a product on a model, restyle a photo, keep a face consistent); without references it generates purely from text. ## Routing The default `model: "auto"` routes by whether references are attached: * **With `reference_images`** → `nano-banana-2` (reference-driven editing/composition). * **Without** → `gpt-image-2` (text-to-image). You can pin `model` explicitly, with one hard rule: **`nano-banana-2` requires at least one reference image** — it is an edit model and a ref-less request to it is rejected with a `400`. ## Arguments | Argument | Type | Required | Default | Description | | ------------------ | ----------------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `prompt` | string | yes | — | What to generate, or the edit to apply to the references. | | `reference_images` | array of strings (URLs) | no | — | Up to **14** publicly fetchable image URLs. Attaching any requires `owns_references: true`. | | `owns_references` | boolean | with refs | — | Likeness-consent attestation, identical to [`make_video`](/tools/make-video#owns_references-consent): required `true` when references are attached, otherwise `400` with no debit; persisted on the run with a timestamp as an audit trail. | | `model` | string | no | `"auto"` | One of `auto`, `nano-banana-2`, `gpt-image-2`. | | `aspect_ratio` | string | no | `"9:16"` | One of `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`. | | `resolution` | string | no | `"1k"` | One of `1k`, `2k`, `4k`. Higher resolutions cost more — see [pricing](/credits-and-refunds#what-runs-cost). | | `count` | number | no | `1` | Number of images to generate, 1–4 — all are variations of the *same* prompt. For distinct scenes or outfits, submit one run per prompt. Cost is per image. | | `enhance_prompt` | boolean | no | `false` | Rewrite a rough prompt via a prompt-writing model before generation (+3 credits); both prompts are stored and searchable. Same semantics as [`make_video`](/tools/make-video#enhance_prompt). | | `influencer` | string | no | — | Slug of a saved [influencer](/tools/create-influencer). The server attaches its portrait + character sheet as references and prepends its appearance description to your prompt, keeping the same character across generations. An unknown slug → `400`, no debit. | ## Example — text-to-image ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_image/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Product shot of a matte-black water bottle on a concrete plinth, soft studio light, pale lime accent backdrop", "aspect_ratio": "1:1", "count": 2 }' ``` ## Example — reference-driven edit ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_image/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Put the person from image 1 in a denim jacket, golden-hour street background", "reference_images": ["https://example.com/my-face.jpg"], "owns_references": true, "resolution": "2k" }' ``` ## Response `202` with `run_id` and `credits_charged`; poll `GET /api/v1/runs/{run_id}`. On `completed`, `output` is an array of durable image URLs — one per `count`. On `failed`, credits are [refunded instantly](/credits-and-refunds#instant-refunds-on-failure). # make_video Source: https://agenthook.mintlify.app/tools/make-video Generate a video — talking-head with native audio — from a prompt and optional reference images. ``` POST /api/v1/tools/make_video/run ``` Generates a video from a text prompt, optionally grounded in reference images. Speech is native: describe the person and write their lines in the prompt (e.g. `She says: "..."`) and the model generates matching audio and lip movement. Optionally chains [captioning](/tools/caption-video) onto the finished video in the same run. ## Arguments | Argument | Type | Required | Default | Description | | ------------------ | ----------------------- | --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `prompt` | string | yes | — | What to generate, including any spoken lines. Max length is per model: **4000** chars for `seedance-2`, **2500** for `kling-3`. Over-cap prompts are rejected with a `400` — never silently truncated. | | `reference_images` | array of strings (URLs) | no | — | Up to **14** publicly fetchable image URLs to ground the generation (a person, a product, a setting). Attaching any requires `owns_references: true`. | | `owns_references` | boolean | with refs | — | Likeness-consent attestation — see [below](#owns_references-consent). | | `model` | string | no | `"seedance-2"` | One of `seedance-2`, `kling-3`. | | `quality` | string | no | `"standard"` | One of `standard`, `pro`. `standard` renders at 720p, `pro` at 1080p (each model's premium tier). Pro costs more — see [pricing](/credits-and-refunds#what-runs-cost). | | `duration` | number | no | `5` | Video length in seconds. The server accepts `4, 5, 6, 8, 10, 12, 15` on `seedance-2` and `3, 5, 8, 10, 15` on `kling-3`; other values are rejected with a `400`. Cost scales with duration. | | `aspect_ratio` | string | no | `"9:16"` | One of `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`. | | `audio` | boolean | no | `true` | Generate native audio (speech, ambience). Leave on for talking-head content. | | `captions` | boolean | no | `false` | When `true`, burns styled subtitles into the finished video within the same run, for an extra flat [caption charge](/credits-and-refunds#what-runs-cost). | | `caption_style` | string | no | `"tiktok"` | One of `movie`, `tiktok`. Only used when `captions` is `true`. | | `enhance_prompt` | boolean | no | `false` | Rewrite a rough prompt into a production-grade one before generation — see [below](#enhance_prompt). | | `influencer` | string | no | — | Slug of a saved [influencer](/tools/create-influencer). The server attaches its portrait + character sheet as references and prepends its appearance description to your prompt. On `seedance-2` this adds the standard +10% reference surcharge; on `kling-3` the influencer takes 2 of the 4 reference slots (so at most 2 of your own `reference_images` alongside it). An unknown slug → `400`, no debit. | ## `owns_references` consent Any run that attaches `reference_images` **must** set `owns_references: true` — you attest that you own, or have the rights to use, the likenesses in the uploaded images. This applies to `make_video` and `make_image` alike. * References attached without `owns_references: true` → `400`, **no credits debited**. * Accepted attestations are persisted on the run record (flag, timestamp, and the API key that made it) as an audit trail. ## `enhance_prompt` When `true`, your prompt is first rewritten by a prompt-writing model trained on what makes these video models perform — hook, framing, delivery — while preserving your intent and any spoken lines. The rewritten prompt is what gets generated; **both** the original and enhanced prompts are stored on the run (and are full-text searchable via `GET /api/v1/generations?q=...`). Costs **3 credits** extra. When `false` (the default), your prompt is sent to the model exactly as written. ## Example — talking-head with captions ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_video/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A man in his 30s in a gym, talking to camera, handheld selfie style. He says: \"Three exercises. Ten minutes. No equipment. Save this.\"", "quality": "standard", "duration": 5, "aspect_ratio": "9:16", "captions": true, "caption_style": "tiktok" }' ``` ## Example — with a reference image ```bash theme={null} curl -X POST https://getagenthook.com/api/v1/tools/make_video/run \ -H "Authorization: Bearer $AGENTHOOK_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "The person from the reference image unboxes a pair of headphones at a kitchen table and says: \"Okay, these are lighter than they look.\"", "reference_images": ["https://example.com/my-face.jpg"], "owns_references": true }' ``` ## Response `202` with the queued run: ```json theme={null} { "run_id": "run_abc123", "status": "queued", "credits_charged": 115 } ``` Poll `GET /api/v1/runs/{run_id}`; on `completed`, `output[0]` is the durable MP4 URL. On `failed`, credits are [refunded instantly](/credits-and-refunds#instant-refunds-on-failure).