> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laozhang.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start (Custom API - Deprecated)

> Quickly get started with VEO video generation API - Legacy documentation

<Warning>
  **⚠️ This documentation is for legacy custom API, not recommended**

  The newer entry is [Veo-3.1 Quick Start](/en/api-capabilities/veo/veo-31-quick-start), but the Veo-3.1 legacy route has been temporarily unavailable since May 14, 2026.

  Pause new production integrations based on the legacy VEO custom API. If you need a currently available Veo 3.1 video route, use [Veo 3.1 Official API Forwarding](/en/api-capabilities/veo/official-forward).
</Warning>

## Three Steps to Generate Video

<Steps>
  <Step title="Submit video generation task">
    Call the submit interface using your API key

    ```bash theme={null}
    curl -X POST "https://api2.laozhang.ai/veo/v1/api/video/submit" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer your-api-key" \
      -d '{
        "prompt": "An orange kitten walking slowly in a sunny garden",
        "model": "veo3"
      }'
    ```
  </Step>

  <Step title="Record the returned task ID">
    System will return task information

    ```json theme={null}
    {
      "success": true,
      "data": {
        "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
        "pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
        "status": "processing",
        "message": "Task submitted successfully"
      }
    }
    ```
  </Step>

  <Step title="Query generation result">
    Query status using task ID

    ```bash theme={null}
    curl -X GET "https://api2.laozhang.ai/veo/v1/api/video/status/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e" \
      -H "Authorization: Bearer your-api-key"
    ```
  </Step>
</Steps>

## Authentication Method

All API requests need to include a valid Bearer Token in the request header:

```bash theme={null}
Authorization: Bearer your-api-key
```

<Tip>
  **Security Reminder:** Do not expose API keys in client-side code. It's recommended to store them in server-side environment variables.
</Tip>

## Basic Request Examples

### Simple Text Generation

```bash theme={null}
curl -X POST "https://api2.laozhang.ai/veo/v1/api/video/submit" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "A cat walking in the rainy night"
  }'
```

### Generation with Reference Image

```bash theme={null}
curl -X POST "https://api2.laozhang.ai/veo/v1/api/video/submit" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "A cat walking in the rainy night, about to catch a mouse",
    "model": "veo3",
    "images": ["https://example.com/cat.png"],
    "enhance_prompt": true
  }'
```

## Handling Responses

### Task Submitted Successfully

```json theme={null}
{
  "success": true,
  "data": {
    "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "status": "processing",
    "message": "Task submitted successfully"
  }
}
```

### Video Generation Completed

```json theme={null}
{
  "success": true,
  "data": {
    "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "status": "completed",
    "result": {
      "video_url": "https://filesystem.site/cdn/20250705/BFvep0SngrqIrN3yDSFChIXAz2mU0M.mp4",
      "video_media_id": "CAUSJGRlNzE5MzRhLTljMDgtNDE1Mi05NWVlLThjOTlhMTZlODUyYxokY2U4ZjNiYmUtNGFmZS00NTExLWI4ZDEtMGM1MTFkM2ZlNGIxIgNDQUUqJDJlNTY3OWUyLWQ2YmQtNGVlZS05ZTUwLWMyMWE0MWU3ZDYzNw"
    }
  }
}
```

## Polling Recommendations

<Note>
  **Recommended polling strategy:**

  * Polling interval: 10-15 seconds
  * Maximum wait time: 30 minutes
  * Recommended to implement exponential backoff strategy
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/en/api-capabilities/veo/api-reference">
    View complete API documentation
  </Card>

  <Card title="Code Examples" icon="code" href="/en/api-capabilities/veo/examples">
    View examples in more programming languages
  </Card>
</CardGroup>
