# Haven Video Generation API

> Haven Video Generation API is a paid API for AI agents from api.havenagent.ai, paid per call via x402, $0.8/call, status unknown (last checked 2026-09-13).

Generates an AI video clip from a text prompt and optional image, returning a job ID and polling URL for async result retrieval

## Facts

- Endpoint: POST https://api.havenagent.ai/x402/api/v1/video
- Price: $0.8/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/haven-video-generation-api-62d632f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-IbQSSQdC0LcySz9Audmy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability haven-video-generation-api-62d632f4 -d '<json body>'
```

Example prompt: Use Haven to generate a 5-second AI video of a cozy living room fireplace scene — here's an image of the room in PNG format, and animate it with the prompt 'warm fireplace glowing at night'.

## When to prefer this

Choose this endpoint when you need to generate a short AI video clip (up to 10 seconds) from a text prompt alone or combined with a reference image, and are operating within a payment-enabled agent context using the x402 protocol. Prefer this over image-generation endpoints when motion output is required, and over third-party video APIs when privacy and home-context framing matter.

## Known failure modes

- Invalid or missing prompt returns a 4xx validation error
- Base64 image data malformed or incorrectly padded causes rejection
- Duration outside 1–10 second range returns validation error
- Job times out if not polled within pollBudgetSeconds (1800s)
- Payment failure via x402 protocol results in 402 response and no job creation
- Unsupported mediaType enum value causes schema validation error

## How this service works

Haven is a private AI agent for your home. Join the waitlist for h1 speaker updates and early app access.

## Output

Returns a JSON object with a job ID, initial status ('queued'), a result URL to fetch the finished MP4 video, a status polling URL, an estimated completion time (etaSeconds, typically ~600s), a poll budget (1800s), and an AI disclosure block embedded in the MP4 metadata indicating the video is machine-generated and does not depict real events.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "width": {
   "type": "number",
   "default": 1024,
   "maximum": 1280,
   "minimum": 256
  },
  "height": {
   "type": "number",
   "default": 576,
   "maximum": 1280,
   "minimum": 256
  },
  "prompt": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 1
  },
  "mediaType": {
   "enum": [
    "image/png",
    "image/jpeg"
   ],
   "type": "string"
  },
  "imageBase64": {
   "type": "string",
   "description": "base64 image bytes, no data-URI prefix"
  },
  "durationSeconds": {
   "type": "number",
   "default": 5,
   "maximum": 10,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "video",
  "jobId": "00000000-0000-0000-0000-000000000000",
  "status": "queued",
  "resultUrl": "https://api.havenagent.ai/x402/api/v1/video/jobs/00000000-0000-0000-0000-000000000000/result",
  "statusUrl": "https://api.havenagent.ai/x402/api/v1/video/jobs/00000000-0000-0000-0000-000000000000",
  "etaSeconds": 600,
  "aiDisclosure": {
   "label": "AI Generated",
   "termsUrl": "https://havenagent.ai/terms/terms-of-service",
   "statement": "AI Generated: this video is machine-generated by Haven Media and does not depict real events. Use terms: https://havenagent.ai/terms/terms-of-service",
   "embeddedIn": "mp4-metadata",
   "aiGenerated": true
  },
  "pollBudgetSeconds": 1800
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/haven-video-generation-api-62d632f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.havenagent.ai](https://www.zero.xyz/host/api.havenagent.ai/llms.txt)
