txtovid
CreateMy GenerationsPricing
Log inGet started free
txtovid

Turn any text prompt into a stunning AI video in minutes.

Featured on There's An AI For That

Product

  • Create
  • Explore
  • Pricing
  • Free AI Video Generator
  • No Watermark Generator

Tools

  • AI Video Generator
  • Text to Video
  • Image to Video AI
  • Reference Images to Video
  • AI Video Editing
  • Free AI Video Generator
  • No Watermark Generator
  • TikTok Video Generator
  • YouTube Shorts Generator
  • Instagram Reels Generator
  • Anime Video Generator
  • Uncensored Adult Video Generator

Learn

  • Prompt Guide
  • API Documentation
  • HappyHorse 1.1 Model
  • HappyHorse Text to Video
  • HappyHorse Image to Video
  • HappyHorse References to Video
  • Wan 2.7 AI
  • Wan 2.7 Text to Video
  • Wan 2.7 Image to Video
  • Wan 2.7 References to Video
  • AI Video for Marketing
  • FAQ

© 2026 txtovid.com — AI text to video generator.

ImprintPrivacy PolicyTerms of ServiceContact

txtovid API v1

API Documentation

Generate AI videos programmatically with the same models that power the txtovid generator — HappyHorse 1.1 and Wan 2.7: text-to-video, image-to-video, reference-images-to-video and AI video editing. Transparent per-second pricing — you are only charged for successful generations (failures are refunded automatically).

Create keys under Settings → API keys · every request appears under Settings → API activity and in My Generations.

Authentication

Pass your key in the Authorization header of every request: Authorization: Bearer txtovid_sk_…. Keys are shown once at creation and stored hashed. Keys can be restricted to specific models and to specific request domains (matched against the Origin/Referer header). Never expose a key in client-side code — call the API from your backend.

Pricing

Identical to the web generator and always charged against your account balance. List price per engine: HappyHorse 1.1 — 720P $0.14/second · 1080P $0.18/second; Wan 2.7 — 720P $0.10/second · 1080P $0.15/second. A flat $0.05/second platform fee is added on top — e.g. a 5-second 720P HappyHorse video costs $0.95, the same video with Wan 2.7 costs $0.75. API generations are private (no public-share discount). Failed or moderation-blocked generations are refunded automatically; the effective charge applies only to successful videos.

Choosing an engine

Every create-generation request accepts an optional engine field: "happyhorse" (default) or "wan" (Wan 2.7). Wan 2.7 supports longer prompts (up to 5,000 characters) and an optional negative_prompt (up to 500 characters) describing what should NOT appear in the video. All other parameters are identical across engines.

Create a generation

POST https://txtovid.com/api/v1/generations — returns 202 with the generation id. Video generation takes 1–5 minutes; poll the status endpoint (below) every 10–15 seconds.

Text to Video — model: "t2v" (happyhorse-1.1-t2v · wan2.7-t2v)

FieldTypeDescription
modelstring, required"t2v"
enginestring, optional"happyhorse" (default) or "wan" — selects HappyHorse 1.1 or Wan 2.7
promptstring, required3–2,000 characters (happyhorse) / 3–5,000 characters (wan) describing the video.
negative_promptstring, optionalWan 2.7 only — up to 500 characters describing what to exclude.
resolutionstring, optional"720P" (default) or "1080P"
ratiostring, optional"16:9" (default), "9:16" or "1:1"
duration_secinteger, optional3, 5, 8, 10 or 15 (default 5)
curl -X POST https://txtovid.com/api/v1/generations \
  -H "Authorization: Bearer $TXTOVID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "t2v",
  "prompt": "A golden retriever surfing a turquoise wave at sunset, cinematic slow motion",
  "resolution": "720P",
  "ratio": "16:9",
  "duration_sec": 5
}'

Same request with the Wan 2.7 engine and a negative prompt:

curl -X POST https://txtovid.com/api/v1/generations \
  -H "Authorization: Bearer $TXTOVID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "t2v",
  "engine": "wan",
  "prompt": "A golden retriever surfing a turquoise wave at sunset, cinematic slow motion",
  "negative_prompt": "low resolution, worst quality, deformed",
  "resolution": "720P",
  "ratio": "16:9",
  "duration_sec": 5
}'

Image to Video — model: "i2v" (happyhorse-1.1-i2v · wan2.7-i2v)

FieldTypeDescription
modelstring, required"i2v"
enginestring, optional"happyhorse" (default) or "wan"
promptstring, required3–2,000 characters (happyhorse) / 3–5,000 characters (wan) describing the motion.
negative_promptstring, optionalWan 2.7 only — up to 500 characters describing what to exclude.
image_urlstring, requiredPublicly reachable first-frame image URL. JPEG/JPG/PNG/BMP/WEBP, ≤20 MB, every edge ≥300 px, aspect ratio between 2:5 and 5:2.
resolutionstring, optional"720P" (default) or "1080P"
duration_secinteger, optional3, 5, 8, 10 or 15 (default 5)

No ratioparameter — per the model docs the output follows the input image's aspect ratio.

curl -X POST https://txtovid.com/api/v1/generations \
  -H "Authorization: Bearer $TXTOVID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "i2v",
  "prompt": "Slow push-in, steam rising from the cup, warm morning light shifting",
  "image_url": "https://example.com/product-shot.jpg",
  "resolution": "720P",
  "duration_sec": 5
}'

References to Video — model: "r2v" (happyhorse-1.1-r2v · wan2.7-r2v)

FieldTypeDescription
modelstring, required"r2v"
enginestring, optional"happyhorse" (default) or "wan"
promptstring, required3–2,500 characters (happyhorse) / 3–5,000 characters (wan). Reference images with "[Image 1]", "[Image 2]" … in array order.
negative_promptstring, optionalWan 2.7 only — up to 500 characters describing what to exclude.
reference_image_urlsstring[], required1–9 publicly reachable images of the same subject. JPEG/JPG/PNG, ≤20 MB each, shorter side >400 px.
resolutionstring, optional"720P" (default) or "1080P"
ratiostring, optional"16:9" (default) or "9:16" — 1:1 is not supported by this model
duration_secinteger, optional3, 5, 8, 10 or 15 (default 5)
curl -X POST https://txtovid.com/api/v1/generations \
  -H "Authorization: Bearer $TXTOVID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "r2v",
  "prompt": "The character from [Image 1] walks through a neon-lit alley at night, rain reflections, cinematic tracking shot",
  "reference_image_urls": [
    "https://example.com/character-front.jpg",
    "https://example.com/character-side.jpg"
  ],
  "resolution": "720P",
  "ratio": "9:16",
  "duration_sec": 5
}'

Video Editing — model: "ve" (happyhorse-1.0-video-edit · wan2.7-videoedit)

FieldTypeDescription
modelstring, required"ve"
enginestring, optional"happyhorse" (default) or "wan"
promptstring, required3–2,500 characters (happyhorse) / 3–5,000 characters (wan) describing the edit (style transfer, object swap, weather change…).
negative_promptstring, optionalWan 2.7 only — up to 500 characters describing what to exclude.
video_urlstring, requiredPublicly reachable input video URL. MP4/MOV/WEBM, 1–15 seconds.
reference_image_urlsstring[], optional0–5 images guiding the edit (e.g. the outfit or product to apply).
resolutionstring, optional"720P" (default) or "1080P"
duration_secinteger, requiredThe input video's length in seconds (1–15) — the billing basis; the output keeps this duration.

No ratio— the output keeps the input video's aspect ratio and duration per the model docs.

curl -X POST https://txtovid.com/api/v1/generations \
  -H "Authorization: Bearer $TXTOVID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "ve",
  "prompt": "Turn the entire video into a watercolor animation, keep the camera motion unchanged",
  "video_url": "https://example.com/clip.mp4",
  "reference_image_urls": [],
  "resolution": "720P",
  "duration_sec": 5
}'

Success response (202)

{
  "data": {
    "id": "cmrk4gpbf0005lj04…",
    "status": "SUBMITTED",
    "model": "t2v",
    "cost": "$0.95",
    "cost_cents": 95,
    "created_at": "2026-07-17T10:30:00.000Z",
    "poll_url": "https://txtovid.com/api/v1/generations/cmrk4gpbf0005lj04…"
  }
}

Poll status & get the video

GET https://txtovid.com/api/v1/generations/{id} — poll every 10–15 seconds until status is SUCCEEDED (video URLs included) or a failure state (error object included, charge refunded). Download the video promptly and store it on your side.

curl https://txtovid.com/api/v1/generations/GENERATION_ID \
  -H "Authorization: Bearer $TXTOVID_API_KEY"

Success response (200)

{
  "data": {
    "id": "cmrk4gpbf0005lj04…",
    "status": "SUCCEEDED",
    "cost": "$0.95",
    "cost_cents": 95,
    "duration_sec": 5,
    "resolution": "720P",
    "generation_time_sec": 84,
    "created_at": "2026-07-17T10:30:00.000Z",
    "completed_at": "2026-07-17T10:31:24.000Z",
    "error": null,
    "video": {
      "id": "vid_…",
      "url": "https://media.txtovid.com/videos/…/original.mp4",
      "thumbnail_url": "https://media.txtovid.com/videos/…/thumb.jpg",
      "width": 1280,
      "height": 720
    }
  }
}

Errors

Every error is JSON with a stable machine-readable code: { "error": { "code", "message" } }. Provider errors from Model Studio are translated into clear messages and correct HTTP codes.

HTTPcodeMeaning
401missing_api_key / invalid_api_keyNo key sent, or the key does not exist / was revoked.
402insufficient_creditsAccount balance is below the generation cost. The message contains both amounts.
403model_not_allowedThe key is restricted and this model is not on its allow-list.
403domain_not_allowedThe key is domain-restricted and the request Origin/Referer does not match.
422validation_errorThe request body violates the schema (unknown fields, wrong types, out-of-range values). The message lists every violation.
422provider_rejected_inputThe video model rejected the input (e.g. media URL unreachable, image too small). Forwarded from Model Studio with detail.
422content_moderation_blockedPrompt or media blocked by content moderation. Not charged.
429rate_limited20 generations/hour per key; 120 status polls/minute.
429too_many_activeToo many generations running in parallel on the account.
429provider_busyThe video model is at capacity. Retry with backoff.
502provider_errorUpstream failure at the video service. Automatically refunded.

Limits & best practices

  • 20 generation requests per hour and 120 status polls per minute, per API key.
  • All media URLs must be publicly reachable over HTTPS — the video model downloads them directly.
  • Poll every 10–15 seconds; generations typically finish in 1–5 minutes.
  • Result URLs are permanent on our CDN, but download and store important videos on your side.
  • Rotate keys regularly and scope them: restrict models and domains per integration.
  • Handle provider_busy and rate_limited with exponential backoff.