# Google Veo 3.1 Generate Preview — Text To Video > Try veo-3.1-generate-preview on GPT Proto. Generate high-quality 4-8s videos in 720p/1080p, text-to-video, image-to-video, and video-to-video. ## Overview - **Endpoint**: `POST https://gptproto.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning` - **Query endpoint**: `POST https://gptproto.com/v1beta/models/veo-3.1-generate-preview/operations/{{operation_id}}` - **Model ID**: `veo-3.1-generate-preview` - **Vendor**: Google - **Scene**: `text-to-video` - **Category**: text-to-video - **Modalities**: input text → output video - **Model page**: https://gptproto.com/model/google/veo-3.1-generate-preview - **API documentation**: https://docs.gptproto.com/docs/allapi/Google/veo-3.1-generate-preview/official-format/text-to-video - **Other scenes of this model**: `image-to-video`, `video-to-video` — same auth, different endpoint path and input schema ## Authentication Every request needs a GPTProto API key. Create one at https://gptproto.com/dashboard/api-key, then export it: ```bash export GPTPROTO_API_KEY="your-api-key" ``` Header: `x-goog-api-key: $GPTPROTO_API_KEY`. ## Pricing Platform price by tier (USD, already includes the GPTProto discount): - **Per run** — $3.2 per run Price range: $3.2 – $3.2 per generation. Prices may change. The model page always shows the live price: https://gptproto.com/model/google/veo-3.1-generate-preview ## API Information The examples below use this model's official request format. Submit the first request, then poll the query endpoint until the vendor operation finishes. ### Input Schema The accepted JSON body is the official request shape below: **Full Example**: ```json { "instances": [ { "prompt": "a cat" } ] } ``` ## Usage Examples ### 1. Submit a request ```bash curl --request POST "https://gptproto.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning" \ --header "x-goog-api-key: $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "instances": [ { "prompt": "a cat" } ] }' ``` ```python import os import requests url = "https://gptproto.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning" headers = { "x-goog-api-key": os.environ["GPTPROTO_API_KEY"], "Content-Type": "application/json" } payload = { "instances": [ { "prompt": "a cat" } ] } response = requests.request("POST", url, headers=headers, json=payload) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1beta/models/veo-3.1-generate-preview:predictLongRunning", { method: "POST", headers: { "x-goog-api-key": process.env.GPTPROTO_API_KEY ?? "", "Content-Type": "application/json", }, body: JSON.stringify({ instances: [ { prompt: "a cat", }, ], }), }); const data = await response.json(); console.log(data); ``` ### 2. Check status Replace `{{operation_id}}` (or the operation name in the URL) with the value returned by the submit request, and keep polling until the operation completes. ```bash curl --request POST "https://gptproto.com/v1beta/models/veo-3.1-generate-preview/operations/{{operation_id}}" \ --header "x-goog-api-key: $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" ``` ```python import os import requests url = "https://gptproto.com/v1beta/models/veo-3.1-generate-preview/operations/{{operation_id}}" headers = { "x-goog-api-key": os.environ["GPTPROTO_API_KEY"], "Content-Type": "application/json" } response = requests.request("POST", url, headers=headers) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1beta/models/veo-3.1-generate-preview/operations/{{operation_id}}", { method: "POST", headers: { "x-goog-api-key": process.env.GPTPROTO_API_KEY ?? "", "Content-Type": "application/json", }, }); const data = await response.json(); console.log(data); ``` ## Example Prompts - A teenage girl sketching in a notebook at a café window, rain tapping on the glass. Lo-fi music plays faintly. She whispers: "I just want to draw forever..." - Two best friends lying in a grassy field under the stars, pointing at constellations. One says: "Do you ever think about how big the universe is?" The other replies: "All the time... and it still amazes me." - A man walking alone on a forest trail in autumn, leaves crunching underfoot. Birds chirp in the distance. He murmurs: "Feels good to be away from everything for a while." ## HTTP Status Codes - `400` — malformed body, a parameter or value this model does not accept, or input blocked by the provider's content moderation - `401` — missing or invalid API key - `403` — insufficient credits - `413` — request body too large - `429` — rate limited; retry with backoff - `500` — An internal server error occurred - `502` — An internal server error occurred - `504` — Gateway timeout — upstream service did not respond in time; retry later ## Additional Resources - [Model page](https://gptproto.com/model/google/veo-3.1-generate-preview) - [API documentation](https://docs.gptproto.com/docs/allapi/Google/veo-3.1-generate-preview/official-format/text-to-video) - [All models](https://gptproto.com/model) - [API keys](https://gptproto.com/dashboard/api-key) - [Platform overview for LLMs](https://gptproto.com/llm-full.txt) - Any other model: `https://gptproto.com/model/{vendor}/{model}/{scene}/llms.txt`