Download a video or image

October 7, 2026

Table of contents

  1. Request Headers
  2. Response headers
  3. Responses
  4. Model
  5. Examples
  6. Try It

Download a finished video or image. The response body is the file itself, streamed from Google on each request and never stored by us.

Google’s file links open only with the Google account’s cookies, so a finished job returns a mediaId instead, and this endpoint fetches the file with the account that made it. Pass the result.mediaId of any job from POST /videos, POST /videos/extend, POST /videos/upscale, POST /videos/edit or POST /images, or the previewMediaId of a generated avatar.

Files are temporary: images stay available for a few hours, videos for at least half a day, then this endpoint answers 404. See How long files last.

https://api.useapi.net/v1/google-vids/media/mediaId

  • mediaId is a video or image mediaId, URL-encoded in the path (it contains : and @). An assetId cannot be downloaded.
Request Headers
Authorization: Bearer {API token}
# Optional, passed through to Google
Range: bytes=0-1048575
  • API token is required, see Setup useapi.net for details.
  • Range is optional. It is forwarded to Google, so a player can seek in a video or a client can resume a download. A range request answers 206 Partial Content with Content-Range.
Response headers
  • Content-Type: video/mp4 for a video, image/jpeg for an image.
  • Content-Disposition: inline; filename="video.mp4" or inline; filename="image.jpg".
  • Content-Length, Content-Range, Accept-Ranges: passed through from Google when it sends them.
Responses
  • 200 OK

    The raw file bytes (not JSON), for example:

    Content-Type: video/mp4
    Content-Length: 718046
    Content-Disposition: inline; filename="video.mp4"
    
  • 206 Partial Content

    The requested byte range of the file, when the request carried a Range header.

  • 400 Bad Request

    The path value is not a video or image mediaId.

    {
      "error": "Path parameter mediaId (…) is not a valid video / image id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden

    The mediaId was issued to a different API token.

    {
      "error": "video id does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found

    The file has expired at Google (images last a few hours, videos longer), or the account that made it is not connected.

    {
      "error": "This file has expired at Google (HTTP 403). Generated files are temporary: download them soon after they are made",
      "code": 404
    }
    
    {
      "error": "Account [email protected] (from the video id) is not configured",
      "code": 404
    }
    
  • 502 Bad Gateway

    Google did not serve the file, or answered with a page instead of the file. Retry shortly.

    {
      "error": "Google answered HTTP 500 for this file",
      "code": 502
    }
    
  • 596 Account Error

    Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Google Vids.

    {
      "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.",
      "code": 596
    }
    
    {
      "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-google-vids",
      "code": 596
    }
    
Model

A successful response is the file itself (not JSON), with the headers listed above. Errors return:

{ // TypeScript, all fields are optional
  error: string
  code: number
}
Examples
  • MEDIAID="user:[email protected]:eyJ1IjoiaHR0…"
    curl -H "Authorization: Bearer …" \
         "https://api.useapi.net/v1/google-vids/media/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$MEDIAID")" \
         --output video.mp4
    
  • const token = "API token";
    const mediaId = "mediaId from a finished job";
    const apiUrl = `https://api.useapi.net/v1/google-vids/media/${encodeURIComponent(mediaId)}`;
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    if (!response.ok)
      console.log("error", response.status, await response.json());
    else {
      const file = await response.arrayBuffer();
      console.log("downloaded", file.byteLength, response.headers.get("content-type"));
    }
    
  • import requests
    from urllib.parse import quote
    token = "API token"
    mediaId = "mediaId from a finished job"
    apiUrl = "https://api.useapi.net/v1/google-vids/media/" + quote(mediaId, safe="")
    headers = {
        "Authorization" : f"Bearer {token}"
    }
    with requests.get(apiUrl, headers=headers, stream=True) as response:
        response.raise_for_status()
        with open("video.mp4", "wb") as f:
            for chunk in response.iter_content(chunk_size=1 << 20):
                f.write(chunk)
    
Try It

The form fetches the file with your token and shows the video or image inline.