# Vidu Vidu Q2 — Image To Image > Deploy vidu/viduq2 for professional-grade image-to-video generation. Experience high temporal consistency and cinematic rendering on the GPT Proto platform. ## Overview - **Endpoint**: `POST https://gptproto.com/api/v3/vidu/viduq2/image-to-image` - **Query endpoint**: `POST https://gptproto.com/api/v3/predictions/{{id}}/result` - **Model ID**: `viduq2` - **Vendor**: Vidu - **Scene**: `image-to-image` - **Category**: image-to-image - **Modalities**: input image → output image - **Model page**: https://gptproto.com/model/vidu/viduq2/image-to-image - **API documentation**: https://docs.gptproto.com/docs/allapi/Vidu/viduq2/gptproto-format/image-to-image - **Other scenes of this model**: `text-to-image`, `text-to-video`, `reference-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: `Authorization: Bearer $GPTPROTO_API_KEY`. ## Pricing Platform price by tier (USD, already includes the GPTProto discount): - Cheapest tier — **1080p · 1**: $0.032 per run - Most expensive tier — **4k · 4**: $0.12 per run - 21 priced tiers in total; the parameters below select the tier. - `resolution`: 1080p, 2k, 4k - `input_image_n`: 1–7 - Example — resolution=1080p, input_image_n=1: $0.032 - Example — resolution=2k, input_image_n=1: $0.048 - Example — resolution=4k, input_image_n=4: $0.12 Price range: $0.032 – $0.12 per generation. Prices may change. The model page always shows the live price: https://gptproto.com/model/vidu/viduq2/image-to-image ## 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 { "prompt": "Put a hat on the cat", "images": [ "https://tos.gptproto.com/resource/cat.png" ], "aspect_ratio": "1:1", "resolution": "1080p", "seed": 1 } ``` ## Usage Examples ### 1. Submit a request ```bash curl --request POST "https://gptproto.com/api/v3/vidu/viduq2/image-to-image" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "prompt": "Put a hat on the cat", "images": [ "https://tos.gptproto.com/resource/cat.png" ], "aspect_ratio": "1:1", "resolution": "1080p", "seed": 1 }' ``` ```python import os import requests url = "https://gptproto.com/api/v3/vidu/viduq2/image-to-image" headers = { "Authorization": f"Bearer {os.environ['GPTPROTO_API_KEY']}", "Content-Type": "application/json" } payload = { "prompt": "Put a hat on the cat", "images": [ "https://tos.gptproto.com/resource/cat.png" ], "aspect_ratio": "1:1", "resolution": "1080p", "seed": 1 } response = requests.request("POST", url, headers=headers, json=payload) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/api/v3/vidu/viduq2/image-to-image", { method: "POST", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "Put a hat on the cat", images: [ "https://tos.gptproto.com/resource/cat.png", ], aspect_ratio: "1:1", resolution: "1080p", seed: 1, }), }); 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/api/v3/predictions/{{id}}/result" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" ``` ```python import os import requests url = "https://gptproto.com/api/v3/predictions/{{id}}/result" headers = { "Authorization": f"Bearer {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/api/v3/predictions/{{id}}/result", { method: "POST", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, "Content-Type": "application/json", }, }); const data = await response.json(); console.log(data); ``` ## Example Prompts - Bold pop art poster, 4K resolution, vertical format. Use image2 as the reference for Albert Einstein’s face and famous tongue-out expression, keeping his facial features clearly recognizable. Place Einstein as the central figure in the composition, stylized in pop art with thick… - Surreal dreamcore landscape, soft focus, hazy atmosphere. Use image1 as the reference for the overall scene: the rolling green hills, the wide striped field, the clear blue sky with a single large pink cloud, and the blue–pink color palette. Remove the pink house in the center an… - Realistic street photography in Japan at sunset, 35mm film look. Use image1 as the reference for the alley: same buildings, shop signs, vending machines, bicycles, perspective and warm evening light on the wet pavement. Replace the single person in the center with a three-member… ## 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/vidu/viduq2/image-to-image) - [API documentation](https://docs.gptproto.com/docs/allapi/Vidu/viduq2/gptproto-format/image-to-image) - [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`