# Flux Kontext
Source: https://docs.sinancode.com/en/api-reference/endpoint/flux-kontext
/en/openapi.yaml POST /generate/k/flux-kontext
Generate or edit images using Flux Kontext model (async)
Generate and edit images using [Black Forest Labs](https://bfl.ai)' FLUX.1 Kontext model with context-aware capabilities.
**Key Features:**
* **Context Understanding** - Modify existing images through text instructions without complex workflows
* **Character Consistency** - Maintain visual features of characters/objects across multiple scenes
* **Local Editing** - Precisely modify specific areas of an image without affecting other parts
* **Fast Iteration** - Generate 1MP images in 3-5 seconds, 8x faster than GPT-Image
# Flux 2 Flex Image-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/flux2-flex-image-to-image
/en/openapi.yaml POST /generate/k/flux2-flex-image-to-image
Edit images using Flux 2 Flex model (async)
Edit images using [Black Forest Labs](https://bfl.ai)' FLUX.2 Flex model.
**Key Features:**
* **Adjustable Quality-Speed Tradeoff** - Control generation steps to balance quality and speed
* **Superior Text Rendering** - Industry-leading text generation for posters and product images
* **Multi-Reference Blending** - Blend up to 10 reference images while maintaining style consistency
* **High Resolution Editing** - Supports up to 4MP resolution with excellent detail preservation
# Flux 2 Flex Text-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/flux2-flex-text-to-image
/en/openapi.yaml POST /generate/k/flux2-flex-text-to-image
Generate images using Flux 2 Flex model (async)
Generate high-quality images from text using [Black Forest Labs](https://bfl.ai)' FLUX.2 Flex model.
**Key Features:**
* **Adjustable Quality-Speed Tradeoff** - Control generation steps to balance quality and speed
* **Superior Text Rendering** - Industry-leading text generation for posters and product images
* **Multi-Reference Blending** - Blend up to 10 reference images while maintaining style consistency
* **High Resolution Output** - Supports up to 4MP resolution
# Flux 2 Pro Image-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/flux2-pro-image-to-image
/en/openapi.yaml POST /generate/k/flux2-pro-image-to-image
Edit high-quality images using Flux 2 Pro model (async)
Edit images professionally using [Black Forest Labs](https://bfl.ai)' FLUX.2 Pro model.
**Key Features:**
* **High-Fidelity Editing** - 4MP resolution editing while preserving original details and coherence
* **Natural Language Instructions** - Complete complex edits through text descriptions
* **Multi-Image Fusion** - Blend up to 10 reference images into new compositions
* **Realistic Physics** - 32B parameter model for precise lighting and material handling
# Flux 2 Pro Text-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/flux2-pro-text-to-image
/en/openapi.yaml POST /generate/k/flux2-pro-text-to-image
Generate high-quality images using Flux 2 Pro model (async)
Generate professional-grade images from text using [Black Forest Labs](https://bfl.ai)' FLUX.2 Pro model.
**Key Features:**
* **Photorealistic Quality** - 32B parameters with realistic lighting and physics, eliminating AI artifacts
* **4MP Ultra High Resolution** - Generate highly detailed images up to 4 megapixels
* **Precise Typography** - Reliably generate legible text, UI elements, and infographics
* **Brand Color Control** - Specify exact brand colors via HEX codes
# Get Task
Source: https://docs.sinancode.com/en/api-reference/endpoint/get-task
/en/openapi.yaml GET /tasks/{id}
Query task execution status and result by task ID
Query the execution status and generation results of asynchronous tasks by task ID. All image and video generation requires polling task status using this endpoint.
# GPT Image 2 Image-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/gpt-image-2-image-to-image
/en/openapi.yaml POST /generate/k/gpt-image-2-image-to-image
Edit images using GPT Image 2 model (async)
Edit images using OpenAI's GPT Image 2 model.
**Key Features:**
* **Image Editing** - Provide one or more input images (max 30MB each, jpeg/png/webp/jpg)
* **Long Prompts** - Supports prompts up to 20000 characters
* **Multiple Aspect Ratios** - Auto, 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, 2:3
* **High Resolution** - Supports 1K / 2K / 4K output
* **NSFW Filter** - Optional NSFW content check (enabled by default)
# GPT Image 2 Text-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/gpt-image-2-text-to-image
/en/openapi.yaml POST /generate/k/gpt-image-2-text-to-image
Generate images from text using GPT Image 2 model (async)
Generate images from text using OpenAI's GPT Image 2 model.
**Key Features:**
* **Long Prompts** - Supports prompts up to 20000 characters
* **Multiple Aspect Ratios** - Auto, 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, 2:3
* **High Resolution** - Supports 1K / 2K / 4K output
* **NSFW Filter** - Optional NSFW content check (enabled by default)
# GPT-4o Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/gpt4o-image
/en/openapi.yaml POST /generate/k/gpt4o-image
Generate images using OpenAI GPT-4o model (async)
Create and edit images using [OpenAI](https://openai.com)'s GPT-4o native image generation capabilities.
**Key Features:**
* **Native Multimodal** - Image generation built into GPT-4o architecture, not external model calls
* **Precise Text Rendering** - Significantly better text generation than DALL·E 3
* **Multi-Turn Consistency** - Refine images through natural conversation while maintaining style coherence
* **Image Understanding & Editing** - Support uploading images as input for understanding and transformation
# Grok Image-to-Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/grok-image-to-video
/en/openapi.yaml POST /generate/k/grok-image-to-video
Generate videos from images using xAI Grok model (async)
Transform static images into dynamic videos using [xAI](https://x.ai)'s Grok Imagine model.
**Key Features:**
* **Image Animation** - Transform static images into professional-grade short videos
* **Audio-Video Sync** - Automatically generate matching sound effects, dialogue, and even singing
* **Smooth Motion** - 24fps framerate with natural, jitter-free movement
* **Fast Output** - Complete generation within 15 seconds
# Grok Text-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/grok-text-to-image
/en/openapi.yaml POST /generate/k/grok-text-to-image
Generate images from text using xAI Grok model (async)
Generate high-quality images from text using [xAI](https://x.ai)'s Aurora image generation model.
**Key Features:**
* **Photorealistic Rendering** - Autoregressive mixture-of-experts architecture for lifelike portraits and entities
* **Precise Instruction Following** - Accurately understand and execute complex text descriptions
* **Text & Logo Rendering** - Excellent artistic text and brand logo generation capabilities
* **Celebrity/Entity Recognition** - Accurately generate images of real-world people and objects
# Grok Text-to-Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/grok-text-to-video
/en/openapi.yaml POST /generate/k/grok-text-to-video
Generate videos from text using xAI Grok model (async)
Generate short videos from text using [xAI](https://x.ai)'s Grok Imagine model.
**Key Features:**
* **Ultra-Fast Generation** - Complete video generation within 15 seconds, faster than Sora 2
* **Audio-Video Sync** - Native integrated audio generation with automatic sound effects and background music
* **Smooth Motion** - 24fps smooth framerate with no distortion in complex movements
* **Smart Camera Work** - Dynamic camera effects and intelligent focus shifting
# Imagen 4
Source: https://docs.sinancode.com/en/api-reference/endpoint/imagen4
/en/openapi.yaml POST /generate/k/imagen4
Generate images using Imagen4 model (async)
Generate high-quality images using [Google DeepMind](https://deepmind.google)'s Imagen 4 model.
**Key Features:**
* **2K High Resolution** - Generate detailed images up to 2K resolution
* **Realistic Texture Details** - Excellent fabric, water droplet, and animal fur rendering
* **Precise Text Typography** - Significantly improved text and typography generation
* **SynthID Watermark** - Built-in invisible digital watermark to identify AI-generated content
# Imagen 4 Fast
Source: https://docs.sinancode.com/en/api-reference/endpoint/imagen4-fast
/en/openapi.yaml POST /generate/k/imagen4-fast
Quickly generate images using Imagen4-Fast model (async)
Generate images quickly using [Google DeepMind](https://deepmind.google)'s Imagen 4 Fast model.
**Key Features:**
* **Ultra-Fast Generation** - Up to 10x faster than Imagen 3, ideal for high-frequency generation
* **Cost-Effective** - Half the cost of standard version, suitable for batch generation
* **Quality Maintained** - Excellent image quality despite speed improvements
* **SynthID Watermark** - Built-in invisible digital watermark
# Imagen 4 Ultra
Source: https://docs.sinancode.com/en/api-reference/endpoint/imagen4-ultra
/en/openapi.yaml POST /generate/k/imagen4-ultra
Generate high-quality images using Imagen4-Ultra model (async)
Generate top-tier quality images using [Google DeepMind](https://deepmind.google)'s Imagen 4 Ultra model.
**Key Features:**
* **Maximum Photorealism** - Highest quality output for marketing content and detailed designs
* **Complex Details** - Perfect handling of complex compositions and fine textures
* **Professional-Grade Output** - Ideal for professional scenarios requiring premium visuals
* **SynthID Watermark** - Built-in invisible digital watermark
# Kling 2.6 Image to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/kling26-image-to-video
/en/openapi.yaml POST /generate/k/kling26-image-to-video
Generate videos from images using Kling 2.6 model (async)
Generate videos from images using [Kuaishou](https://klingai.com)'s Kling 2.6 model.
**Key Features:**
* **Image-Driven** - Generate coherent dynamic videos based on input images
* **Extended Duration** - Generate 5 or 10-second high-quality videos
* **Audio Generation** - Optional sound effects to enhance video impact
* **HD Quality** - Output smooth, natural high-definition video content
# Kling 2.6 Text to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/kling26-text-to-video
/en/openapi.yaml POST /generate/k/kling26-text-to-video
Generate videos using Kling 2.6 model (async)
Generate videos from text using [Kuaishou](https://klingai.com)'s Kling 2.6 model.
**Key Features:**
* **Extended Duration** - Generate 5 or 10-second high-quality videos
* **Multiple Aspect Ratios** - Support 1:1, 16:9, 9:16 and other popular ratios
* **Audio Generation** - Optional sound effects to enhance video impact
* **HD Quality** - Output smooth, natural high-definition video content
# Midjourney Image to Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/midjourney-img2img
/en/openapi.yaml POST /generate/k/mj-img2img
Generate images from input images using Midjourney AI model (async)
Generate new artistic works from images using [Midjourney](https://midjourney.com) V7 model.
**Key Features:**
* **Feature Preservation** - Retain core features of original images while adding creative elements
* **Style Transformation** - Transform photos into unique Midjourney artistic styles
* **Flexible Control** - Control original image influence through weight parameters
* **High-Quality Output** - V7 enhanced textures and detail representation
# Midjourney Text to Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/midjourney-txt2img
/en/openapi.yaml POST /generate/k/mj-txt2img
Generate images from text using Midjourney AI model (async)
Generate artistic images from text using [Midjourney](https://midjourney.com) V7 model.
**Key Features:**
* **Unique Aesthetic Style** - Industry-leading artistic expression with highly recognizable style
* **Precise Prompt Understanding** - V7 significantly improves text instruction adherence
* **Perfect Detail Rendering** - Natural handling of bodies, hands, and objects
* **Rich Texture Quality** - Enhanced image textures with more coherent details
# Nano Banana 2
Source: https://docs.sinancode.com/en/api-reference/endpoint/nano-banana-2
/en/openapi.yaml POST /generate/k/nano-banana-2
Generate images using the Nano Banana 2 model (asynchronously), unifying text-to-image and image editing, with support for Google Search enhancement
Generate images using [Google DeepMind](https://deepmind.google)'s Nano Banana 2 (Gemini 2.0 Flash) model.
**Key Features:**
* **Unified Generation & Editing** - Text-to-image and image editing in a single endpoint
* **Google Search Enhancement** - Generate imagery based on real-time data with Google Search integration
* **Multi-Image Input** - Support up to 14 input images for editing and reference
* **Flexible Resolution** - Support 1K, 2K, and 4K output resolutions
* **Multiple Aspect Ratios** - Wide range of aspect ratios from 1:1 to 21:9
# Nano Banana Edit
Source: https://docs.sinancode.com/en/api-reference/endpoint/nano-banana-edit
/en/openapi.yaml POST /generate/k/nano-banana-edit
Edit images using Nano Banana Edit model (async)
Edit images using [Google DeepMind](https://deepmind.google)'s Nano Banana model.
**Key Features:**
* **Natural Language Editing** - Describe modifications through text instructions
* **Local Modifications** - Precisely edit specific areas of images
* **Style Adjustments** - Support image style and effect adjustments
* **Fast Processing** - Quick editing based on Gemini architecture
# Nano Banana Pro
Source: https://docs.sinancode.com/en/api-reference/endpoint/nano-banana-pro
/en/openapi.yaml POST /generate/k/nano-banana-pro
Generate high-quality images using Nano Banana Pro model (async), supports higher resolution and more advanced features
Generate and edit images using [Google DeepMind](https://deepmind.google)'s Nano Banana Pro (Gemini 3 Pro Image) model.
**Key Features:**
* **4K Ultra High Resolution** - Support 2K/4K high-definition image generation
* **Best-in-Class Text Rendering** - Industry-leading in-image text generation with multi-language support
* **Real-Time Knowledge** - Use Google Search to verify facts and generate imagery based on real-time data
* **Professional Controls** - Camera angles, lighting, depth of field, focus, and color grading
# Nano Banana Text to Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/nano-banana-text2image
/en/openapi.yaml POST /generate/k/nano-banana
Generate images using Nano Banana model (async)
Generate images from text using [Google DeepMind](https://deepmind.google)'s Nano Banana (Gemini 2.5 Flash) model.
**Key Features:**
* **Fast Generation** - Built on Gemini 2.5 Flash for quick image generation
* **Cost-Effective** - Lower cost, suitable for batch generation scenarios
* **1K Resolution** - Supports up to 1024x1024 pixel output
* **Strong Understanding** - Inherits Gemini's semantic understanding and reasoning capabilities
# Qwen Image 2.0
Source: https://docs.sinancode.com/en/api-reference/endpoint/qwen-image-2-0
/en/openapi.yaml POST /generate/bailian/qwen-image-2.0
Qwen Image 2.0 accelerated model, supports text-to-image and image editing with flexible resolution and multi-image output (1-6 images).
Generate images using [Alibaba Cloud](https://www.alibabacloud.com)'s Qwen Image 2.0 accelerated model.
**Key Features:**
* **Free Resolution** - Supports flexible width and height, total pixels between 512x512 and 2048x2048
* **Multi-Image Output** - Generate 1-6 images per request
* **Text-to-Image & Image Editing** - Supports both text-to-image generation and image editing modes
# Qwen Image Edit Plus
Source: https://docs.sinancode.com/en/api-reference/endpoint/qwen-image-edit-plus
/en/openapi.yaml POST /generate/bailian/qwen-image-plus
Alibaba Bailian Tongyi Wanxiang image generation model, supports text-to-image and image editing modes. Without images parameter for text-to-image, with images parameter (up to 3) for image editing.
Edit images using [Alibaba Cloud](https://www.alibabacloud.com)'s Qwen-Image-Edit model (qwen-image-edit-plus).
**Key Features:**
* **Multi-Image Input/Output** - Support multiple image inputs and outputs
* **Text Modification** - Precisely modify text within images
* **Object Manipulation** - Add, remove, or move objects, change subject actions
* **Style Transfer** - Transfer image styles and enhance visual details
# Qwen Image Plus
Source: https://docs.sinancode.com/en/api-reference/endpoint/qwen-image-plus
/en/openapi.yaml POST /generate/bailian/qwen-image-plus
Alibaba Bailian Tongyi Wanxiang image generation model, supports text-to-image and image editing modes. Without images parameter for text-to-image, with images parameter (up to 3) for image editing.
Generate images from text using [Alibaba Cloud](https://www.alibabacloud.com)'s Qwen-Image model.
**Key Features:**
* **Complex Text Rendering** - Excellent at complex text rendering with multi-line layout and paragraph-level text generation
* **Multiple Style Support** - Support various artistic styles and scene types
* **Fine-grained Details** - Fine-grained detail rendering capabilities
* **Mixed Text-Image Layout** - Achieve complex text-image mixed layout designs
# Seedance 2.0
Source: https://docs.sinancode.com/en/api-reference/endpoint/seedance-2-0
/en/openapi.yaml POST /generate/vol/seedance-2.0
ByteDance Seedance 2.0 video generation model, supports text-to-video, image-to-video (first frame / first & last frame), multimodal reference-to-video, and audio generation (async)
Generate videos using [Volcano Engine](https://www.volcengine.com)'s Seedance 2.0 model.
**Key Features:**
* **Multiple Generation Modes** - Text-to-video, image-to-video (first frame / first+last frame), and multi-modal reference-to-video
* **Audio Generation** - Built-in audio generation support
* **Fast & Standard Modes** - Choose between 2.0 Fast (faster, cheaper) and 2.0 Standard
* **Flexible Duration** - 4-15 seconds, or let the model decide automatically
# Seedance Pro 1.5
Source: https://docs.sinancode.com/en/api-reference/endpoint/seedance-pro-1-5
/en/openapi.yaml POST /generate/vol/seedance-pro-1.5
Generate videos using Volcano Engine Seedance 1.5 Pro model, supports text-to-video, image-to-video (first frame/keyframes), audio video, reference mode (async)
Generate videos using [Volcano Engine](https://www.volcengine.com)'s Seedance 1.5 Pro model, supporting multiple generation modes.
**Key Features:**
* **Multi-Mode Generation** - Supports text-to-video, image-to-video (first frame/keyframes), and reference mode
* **Native Audio Generation** - Generates synchronized voice, sound effects, and background music (place dialogue in double quotes for best results)
* **Draft Mode** - Quickly generate preview videos with fewer tokens consumed
* **Flexible Duration** - 4-12 seconds, or let the model auto-decide with `-1`
* **HD Resolution** - Supports 480p, 720p, and 1080p output
# Seedream Image Generation
Source: https://docs.sinancode.com/en/api-reference/endpoint/seedream
/en/openapi.yaml POST /generate/vol/seedream
Generate images using Volcano Engine's Seedream model, supporting single-image and batch modes, with optional versions 4.0, 4.5, or 5.0-lite (synchronous).
- max_images = 1: Generate a single image.
- max_images > 1: Generate a batch of images, up to N images.
- max_images not set: Automatic batch mode, up to 15 images.
Generate images using [ByteDance](https://seed.bytedance.com)'s Seedream model, supporting both single image and multi-image modes.
**Key Features:**
* **Multi-Version Support** - Supports 5.0-lite (default), 4.5, and 4.0
* **Flexible Output Modes** - Single image (`max_images=1`) or multi-image (`max_images=2-15`)
* **Text-to-Image & Image-to-Image** - Generate from text or reference images (up to 14)
* **HD Output** - 5.0-lite supports 2K/3K, 4.5/4.0 supports 2K/4K, or specify exact resolution
# Sora 2 Image to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/sora2-image-to-video
/en/openapi.yaml POST /generate/k/sora2-image-to-video
Generate videos from images using Sora 2 model (async)
Transform images into videos using [OpenAI](https://openai.com)'s Sora 2 model.
**Key Features:**
* **Image Animation** - Transform static images into smooth, natural dynamic videos
* **Audio Sync Generation** - Automatically add matching sound effects and background music
* **Physical Realism** - Motion effects following real physics laws
* **Style Preservation** - Maintain original image style and visual features
# Sora 2 Pro Image to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/sora2-pro-image-to-video
/en/openapi.yaml POST /generate/k/sora2-pro-image-to-video
Generate high-quality videos from images using Sora 2 Pro model (async)
Transform images into professional-grade videos using [OpenAI](https://openai.com)'s Sora 2 Pro model.
**Key Features:**
* **Professional Animation** - More natural and smooth motion effects and transitions
* **High-Quality Output** - Support standard/high quality levels
* **Precise Control** - Specify motion direction, speed, and camera effects
* **Audio-Video Sync** - Automatically generate matching high-quality audio
# Sora 2 Pro Text to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/sora2-pro-text-to-video
/en/openapi.yaml POST /generate/k/sora2-pro-text-to-video
Generate high-quality videos from text using Sora 2 Pro model (async)
Generate professional-grade videos using [OpenAI](https://openai.com)'s Sora 2 Pro model.
**Key Features:**
* **Dual Quality Levels** - Support standard and high quality modes
* **Longer Duration** - Generate high-quality videos up to 25 seconds
* **Enhanced Control** - More precise camera angles, shot types, and visual style control
* **Professional Output** - Ideal for commercial ads, short films, and professional scenarios
# Sora 2 Text to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/sora2-text-to-video
/en/openapi.yaml POST /generate/k/sora2-text-to-video
Generate videos from text using Sora 2 model (async)
Generate videos from text using [OpenAI](https://openai.com)'s Sora 2 model.
**Key Features:**
* **Native Audio-Video Sync** - Video with sound effects, speech, and background music generated together
* **Realistic Physics** - Accurate simulation of gravity, buoyancy, collisions, and other physical phenomena
* **Multi-Shot Narrative** - Support complex multi-shot instructions while maintaining scene coherence
* **1080P Output** - Support 10-15 second HD videos in cinematic/anime styles
# File Upload (Base64)
Source: https://docs.sinancode.com/en/api-reference/endpoint/upload-base64
/en/files-openapi.json POST /api/upload/base64
Upload a file encoded as a Base64 data URL. The MIME type is automatically detected from the data URL prefix.
Upload files to cloud storage using Base64 data URL format.
**Key Features:**
* **Frontend Friendly** - Ideal for Canvas, screenshots, and direct upload scenarios
* **Auto Parsing** - Automatically detects MIME type from data URL prefix
* **Large File Support** - Supports files up to 50MB
* **Dual Access** - Returns both global and China access URLs
# File Upload (Form-Data)
Source: https://docs.sinancode.com/en/api-reference/endpoint/upload-file
/en/files-openapi.json POST /api/upload/file
Upload a file using standard multipart/form-data encoding.
Upload files to cloud storage using standard multipart/form-data encoding.
**Key Features:**
* **Standard Format** - Uses multipart/form-data encoding, compatible with all HTTP clients
* **Large File Support** - Supports files up to 50MB
* **Auto Detection** - Automatically detects file MIME type
* **Dual Access** - Returns both global and China access URLs
# File Upload (URL)
Source: https://docs.sinancode.com/en/api-reference/endpoint/upload-url
/en/files-openapi.json POST /api/upload/url
Download a file from a remote URL and upload it to storage.
Download files from remote URLs and upload to cloud storage.
**Key Features:**
* **Remote Download** - Download files from any public URL and store them
* **Custom Filename** - Optionally specify the saved filename
* **Large File Support** - Supports files up to 50MB
* **Dual Access** - Returns both global and China access URLs
# Veo 3.1 Image to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/veo3-image-to-video
/en/openapi.yaml POST /generate/k/veo3-image-to-video
Generate videos from 1-2 images using Google Veo 3.1 model (async), supports first-last frame interpolation
Transform images into videos using [Google DeepMind](https://deepmind.google)'s Veo 3.1 model.
**Key Features:**
* **Dual Mode Support** - Single-image animation or start-to-end frame transition modes
* **Character Consistency** - Maintain character appearance across scenes
* **Audio Sync** - Automatically generate matching sound effects and ambient audio
* **HD Output** - 1080P quality with realistic physics effects
# Veo 3.1 Reference to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/veo3-reference-to-video
/en/openapi.yaml POST /generate/k/veo3-reference-to-video
Generate videos from 1-3 reference images using Google Veo 3.1 Fast model (async, only supports veo3_fast and 16:9)
Generate style-consistent videos from reference images using [Google DeepMind](https://deepmind.google)'s Veo 3.1 model.
**Key Features:**
* **Multi-Image Reference** - Support 1-3 reference images to control character, object, or style
* **Style Transfer** - Apply reference image style to generated videos
* **Character Consistency** - Ideal for creating multi-shot content with consistent characters
# Veo 3.1 Text to Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/veo3-text-to-video
/en/openapi.yaml POST /generate/k/veo3-text-to-video
Generate videos from text prompts using Google Veo 3.1 model (async)
Generate videos from text using [Google DeepMind](https://deepmind.google)'s Veo 3.1 model.
**Key Features:**
* **Native Audio Generation** - Synchronized dialogue, sound effects, and ambient audio with precise lip-sync
* **Ultra-Realistic Visuals** - 1080P HD output with improved physics and human rendering
* **Camera Control** - Specify camera movements, cinematic styles, and scene transitions
# Wan2 Image-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/wan2-image-to-image
/en/openapi.yaml POST /generate/bailian/wan2-image-to-image
Use Tongyi Wanxiang Wan2 image-to-image model (wan2.5-i2i-preview) for image editing and multi-image fusion
Edit and fuse images using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Wan2.5 model.
**Key Features:**
* **Subject Consistency** - Image editing based on subject consistency
* **Multi-Image Fusion** - Support multiple image inputs for creative fusion
* **One-Sentence Editing** - Complete complex edits through simple text instructions
* **Native Chinese** - Describe editing requirements directly in Chinese
# Wan2 Image-to-Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/wan2-image-to-video
/en/openapi.yaml POST /generate/bailian/wan2-image-to-video
Use Tongyi Wanxiang Wan2.6 image-to-video model (wan2.6-i2v) to generate smooth videos from first frame image and text prompt, supports automatic dubbing, custom audio and multi-shot narrative
Generate smooth videos from a first-frame image using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Wan2.6 model.
**Key Features:**
* **First-Frame Driven** - Generate coherent dynamic videos from a first-frame image
* **Smart Audio** - Support automatic audio generation or custom audio sync
* **Multi-Resolution** - Support 720P, 1080P HD output
* **Flexible Duration** - Support 5/10/15 second video generation
* **Multi-Shot Mode** - Support single and multi-shot modes with subject consistency
# Wan2 Keyframe-to-Video
Source: https://docs.sinancode.com/en/api-reference/endpoint/wan2-keyframe-to-video
/en/openapi.yaml POST /generate/bailian/wan2-keyframe-to-video
Use Tongyi Wanxiang Wan2.2 keyframe-to-video model (wan2.2-kf2v-flash), only requires first and last frame images, combined with prompt to generate smooth dynamic videos, supports effect templates
Generate smooth dynamic videos by providing just the first and last frame images using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Keyframe-to-Video model.
**Key Features:**
* **Keyframe Control** - Precise control over video start and end frames
* **Smooth Transition** - Automatically generate silky smooth intermediate frame animations
* **Multi-Resolution** - Support 480P, 720P, 1080P output
* **Smart Rewrite** - Support prompt intelligent rewriting for better results
* **Effect Templates** - Support preset video effect templates
# Wan2 Text-to-Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/wan2-text-to-image
/en/openapi.yaml POST /generate/bailian/wan2-text-to-image
Use Tongyi Wanxiang Wan2 series models to generate images, supports three models: wan2.5-t2i-preview/wan2.2-t2i-flash/wan2.2-t2i-plus
Generate images from text using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Wan2 series models.
**Key Features:**
* **Multiple Model Options** - Support wan2.5-t2i-preview/wan2.2-t2i-flash/wan2.2-t2i-plus
* **Native Multimodal** - Single architecture supporting text and image modality input/output
* **Native Chinese** - Industry-leading Chinese understanding, use Chinese prompts directly
* **Complex Instruction Understanding** - Support camera movements and complex continuous instructions
# Wan 2.7 Image
Source: https://docs.sinancode.com/en/api-reference/endpoint/wan27-image
/en/openapi.yaml POST /generate/bailian/wan27-image
Wanx 2.7 image generation and editing model, supports text-to-image and image editing. Omit images for text-to-image mode, provide images (up to 9) for image editing mode.
Generate and edit images using [Alibaba Cloud](https://www.alibabacloud.com)'s Wanxiang 2.7 image model.
**Key Features:**
* **Text-to-Image & Image Editing** - Supports both text-to-image generation and image editing (up to 9 reference images)
* **High Resolution** - Supports 1K and 2K output resolution
* **Long Prompts** - Supports prompts up to 5000 characters
# Z-Image Turbo
Source: https://docs.sinancode.com/en/api-reference/endpoint/z-image-turbo
/en/openapi.yaml POST /generate/f/z-image-turbo
Generate images using Tongyi Wanxiang Z-Image Turbo model (async, 6B parameters ultra-fast text-to-image)
Generate images ultra-fast using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Z-Image Turbo model.
**Key Features:**
* **Lowest Price** - The most affordable image generation model on our platform
* **Fastest Speed** - 6B parameter distilled model, sub-second inference on H800 GPU with only 8 steps, the fastest on our platform
* **Bilingual Text Rendering** - Excellent Chinese and English text rendering in images
* **Photorealistic Quality** - Outstanding skin texture, lighting, depth of field in portraits and realistic scenes
* **Open Source Commercial** - Apache-2.0 license, achieving SOTA among open-source models
# Z-Image Turbo Free
Source: https://docs.sinancode.com/en/api-reference/endpoint/z-image-turbo-free
/en/openapi.yaml POST /generate/hf/z-image-turbo
Generate images using Tongyi Wanxiang Z-Image Turbo free version (async)
Generate images for **FREE** using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Z-Image Turbo model.
This is the free version with limited features. For production use, please consider the paid [Z-Image Turbo](/en/api-reference/endpoint/z-image-turbo) version.
**Key Features:**
* **FREE** - No cost for image generation
* **Fast Speed** - 6B parameter distilled model with quick inference
* **Bilingual Text Rendering** - Excellent Chinese and English text rendering in images
* **Multiple Resolutions** - Support for various aspect ratios (1024x1024, 1280x720, etc.)
# SinanCode API Docs - AI Image & Video Generation API
Source: https://docs.sinancode.com/en/index
SinanCode provides unified AI image and video generation APIs, supporting Midjourney, Sora, Imagen and more. One API key for all services
## About SinanCode
**SinanCode** is a professional AI model API platform dedicated to providing developers with a one-stop solution for easily accessing the world's best image and video generation models.
One API key to access all mainstream AI models
Integrate the world's leading image and video generation models
Standardized API interface for quick integration into your applications
Stable and reliable service to ensure your business continuity
## Quick Start
View complete API documentation to learn how to use our services
## Supported Model Types
### 🎨 Image Generation Models
Through SinanCode, you can easily call industry-leading image generation models to create high-quality AI images.
### 🎬 Video Generation Models
Access the latest video generation technology to empower your applications with powerful video creation capabilities.
## Why Choose SinanCode?
No need to integrate with multiple model providers separately. SinanCode provides a unified interface, significantly reducing development costs and maintenance difficulties.
We continuously integrate the latest and best AI models to ensure you always have access to the most advanced technology in the industry.
Pay-as-you-go with no minimum consumption requirements, perfectly matching your costs with business scale.
Providing professional technical support and detailed documentation to help you quickly resolve issues during integration.
## Start Exploring
Complete your first API call in minutes
View detailed API interface documentation
## Need Help?
Visit [sinancode.com](https://sinancode.com) for more information, or check out our API documentation to get started.
# Quickstart
Source: https://docs.sinancode.com/en/quickstart
Get started with SinanCode API in 5 minutes
## Step 1: Get Your API Key
Visit the [API Keys Management Page](https://sinancode.com/dashboard/keys) to create your API key.
1. Log in to your SinanCode account
2. Navigate to Dashboard → API Keys
3. Click "Create New Key"
4. Save the generated API Key (keep it secure, it's only shown once)
## Step 2: Make an API Request
All API requests require authentication in the HTTP Header:
```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```
### Basic Request Example
Here's a complete example of generating an image using Imagen4:
```bash theme={null}
curl -X POST https://api.sinancode.com/v1/generate/k/imagen4 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a beautiful sunset over the mountains",
"aspect_ratio": "16:9",
"num_images": 1
}'
```
**Response Example:**
```json theme={null}
{
"task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
```
## Step 3: Check Task Status
Since AI model generation takes time, most APIs work asynchronously. Use the returned `task_id` to check the task status:
```bash theme={null}
curl -X GET https://api.sinancode.com/v1/tasks/01234567-89ab-cdef-0123-456789abcdef \
-H "Authorization: Bearer YOUR_API_KEY"
```
**Response Example:**
```json theme={null}
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status": "completed",
"result": [
"https://storage.example.com/generated-image.jpg"
]
}
```
### Task Status Descriptions
* `pending` - Task is queued
* `processing` - Generation in progress
* `completed` - Generation completed
* `failed` - Generation failed
## Popular Models Quick Reference
### Image Generation Models
#### Imagen 4
* **Endpoint**: `POST /generate/k/imagen4`
* **Features**: Google's latest image generation model with excellent quality
* **Parameters**: `prompt`, `aspect_ratio`, `num_images`, `seed`
#### Midjourney
* **Endpoint**: `POST /generate/k/midjourney-txt2img`
* **Features**: Strong artistic style, ideal for creative design
* **Parameters**: `prompt`, `aspectRatio`, `version`, `stylization`
#### Flux Kontext
* **Endpoint**: `POST /generate/k/flux-kontext`
* **Features**: Supports Chinese prompts with automatic translation
* **Parameters**: `prompt`, `aspect_ratio`, `model`, `enable_translation`
### Video Generation Models
#### Sora 2
* **Endpoint**: `POST /generate/k/sora2-text-to-video`
* **Features**: OpenAI's video generation model
* **Parameters**: `prompt`, `aspect_ratio`, `n_frames`
#### Veo 3
* **Endpoint**: `POST /generate/k/veo3-text-to-video`
* **Features**: Google's video generation model with image-to-video support
* **Parameters**: `prompt`, `aspectRatio`, `model`
## Complete Code Examples
### Python Example
```python theme={null}
import requests
import time
API_KEY = "your_api_key_here"
BASE_URL = "https://api.sinancode.com/v1"
# Create task
response = requests.post(
f"{BASE_URL}/generate/k/imagen4",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"prompt": "a futuristic cityscape at sunset",
"aspect_ratio": "16:9",
"num_images": 1
}
)
task_id = response.json()["task_id"]
print(f"Task created successfully, ID: {task_id}")
# Poll task status
while True:
status_response = requests.get(
f"{BASE_URL}/tasks/{task_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
)
task = status_response.json()
status = task["status"]
print(f"Task status: {status}")
if status == "completed":
print(f"Generation completed! Image URL: {task['result'][0]}")
break
elif status == "failed":
print(f"Generation failed: {task.get('error_msg', 'Unknown error')}")
break
time.sleep(2) # Wait 2 seconds before retrying
```
### JavaScript/TypeScript Example
```javascript theme={null}
const API_KEY = "your_api_key_here";
const BASE_URL = "https://api.sinancode.com/v1";
async function generateImage() {
// Create task
const createResponse = await fetch(`${BASE_URL}/generate/k/imagen4`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "a serene mountain landscape",
aspect_ratio: "16:9",
num_images: 1
})
});
const { task_id } = await createResponse.json();
console.log(`Task created successfully, ID: ${task_id}`);
// Poll task status
while (true) {
const statusResponse = await fetch(`${BASE_URL}/tasks/${task_id}`, {
headers: { "Authorization": `Bearer ${API_KEY}` }
});
const task = await statusResponse.json();
console.log(`Task status: ${task.status}`);
if (task.status === "completed") {
console.log(`Generation completed! Image URL: ${task.result[0]}`);
break;
} else if (task.status === "failed") {
console.log(`Generation failed: ${task.error_msg}`);
break;
}
await new Promise(resolve => setTimeout(resolve, 2000)); // Wait 2 seconds
}
}
generateImage();
```
## Next Steps
* 📖 [View Full API Documentation](/en/api-reference/introduction) - Learn about all available models and parameters
## Frequently Asked Questions
### How do I choose the right model?
* **For Quality**: Imagen 4 Ultra, Midjourney v7
* **For Speed**: Imagen 4 Fast, Nano Banana
* **For Chinese Prompts**: Flux Kontext, Tongyi Wanxiang
* **For Video Generation**: Sora 2 Pro, Veo 3
### What are the rate limits?
Each API Key has rate limits depending on your subscription plan. When limits are exceeded, you'll receive a `429 Too Many Requests` error.
Need help? Visit [sinancode.com](https://sinancode.com) to contact our technical support team.