302.AI API Document
  1. Unified interface
  • Large Language Model
    • API Migration Guide
    • Exclusive Feature
      • Search Online
        • Chat(Search online)
      • Depth-First Search
        • Chat(Depth-First Search)
      • Image Analysis
        • Chat(Image analysis)
      • Reasoning mode
        • Chat(Reasoning mode)
      • Link Parsing
        • Chat(Link Parsing)
      • Tool Invocation
        • Chat(tool invocation)
      • Long-term memory (Beta)
        • Memobase
          • User Management
            • Create User
            • Get User
            • Update User
            • Delete User
          • Data Management
            • Insert Data
            • Get Datas
            • Get Data
            • Delete Data
          • Memory Management
            • Flush Buffer (Generate Memory)
            • Get User Profile (Get Memory)
            • Delete User Profile (Delete Memory)
        • Chat (Long-term Memory)
      • Simplified API
        • Chat (Simplified API)
    • Model Support
      • Models (List models)
      • Status(Model Status)
    • OpenAI
      • Chat(Talk)
      • Responses(Talk)
      • Chat(Streamed return.)
      • Chat (gpt-4o Image Analysis)
      • Chat (gpt-4o Structured Output)
      • Chat (gpt-4o function call)
      • Chat (gpt-4-plus image analysis)
      • Chat (gpt-4-plus image generation)
      • Chat(gpt-4o-image-generation modify image)
      • Chat (gpts model)
      • Chat (chatgpt-4o-latest)
      • Chat (o1 Series Model)
      • Chat (o3 Series Model)
      • Chat(o4 Series)
      • Chat(gpt-4o audio model)
    • Anthropic
      • Chat(Talk)
      • Chat(Analyze image)
      • Chat(Function Call)
      • Messages(Original format)
      • Messages(Function Call)
      • Messages(Thinking mode)
      • Messages(128k output)
    • Gemini
      • Chat(Talk)
      • Chat(Analyze image)
      • Chat(Image Generation)
    • China Model
      • Chat (Baidu ERNIE)
      • Chat (Tongyi Qianwen)
      • Chat (Tongyi Qianwen-VL)
      • Chat(Tongyi Qianwen-OCR)
      • Chat (Zhipu GLM-4)
      • Chat (Zhipu GLM-4V)
      • Chat (Baichuan AI)
      • Chat (Moonshot AI)
      • Chat (Moonshot AI-Vision)
      • Chat (01.AI)
      • Chat (01.AI-VL)
      • Chat (DeepSeek)
      • Chat (DeepSeek-VL2)
      • Chat (ByteDance Doubao)
      • Chat (ByteDance Doubao-Vision)
      • Chat(ByteDance Doubao Image Generation)
      • Chat (Stepfun)
      • Chat (Stepfun Multimodal)
      • Chat (iFLYTEK Spark)
      • Chat (SenseTime)
      • Chat(Minimax)
      • Chat (Tencent Hunyuan)
    • SiliconFlow
      • Chat(SiliconFlow)
    • PPIO
      • Chat(PPIO)
    • Open Source Model
      • Chat(LLaMA4)
      • Chat(LLaMA3.3)
      • Chat(LLaMA3.2 multimodal)
      • Chat(LLaMA3.1)
      • Chat(Mistral)
      • Chat(Pixtral-Large-2411multimodal)
      • Chat(Gemma-7B、Gemma-3-27b-it)
      • Chat(Gemma2-9B)
      • Chat(Command R+)
      • Chat(Qwen2)
      • Chat(Qwen2.5)
      • Chat(Qwen2.5-VL)
      • Chat(Qwen3)
      • Chat(Llama-3.1-nemotron)
      • Chat(QwQ-32B、QwQ-Plus、QwQ-32B-Preview)
    • Expert Model
      • Chat(WiseDiag Medical Model)
      • Chat (ChatLaw Legal Model)
      • Chat (Xuanyuan Financial Model)
      • Chat (Farui Legal Model)
      • Chat (Alibaba Math Model)
      • Chat(Perplexity search)
    • Other Models
      • Chat(grok-3)
      • Chat(grok-2)
      • Chat(grok-2-vision)
      • Chat(Nova)
  • Image Generation
    • Unified interface
      • Generate images
        POST
    • GPT-Image-1
      • Generations(Image generation)
      • Edits(Modify Image)
    • DALL.E
      • Generations(DALL·E 3和DALL·E 2)
      • Edits(DALL·E 2)
      • Variations(DALL·E 2)
    • Stability.ai
      • Text-to-image (Image Generation-V1)
      • Generate (Image Generation-SD2)
      • Generate (Image Generation-SD3-Ultra)
      • Generate (Image Generation-SD3)
      • Generate(Image Generation-SD3.5-Large)
      • Generate(Image Generation-SD3.5-Medium)
      • Generate(Image to Image-SD3)
      • Generate(Image to Image-SD3.5-Large)
      • Generate(Image to Image-SD3.5-Medium)
    • Midjourney
      • Imagine
      • Action
      • Blend
      • Describe
      • Modal
      • Fetch
      • Cancel
    • Midjourney-Relax
      • Imagine
      • Action
      • Blend
      • Describe
      • Modal
      • Fetch
      • Cancel
    • 302.AI
      • SDXL
      • SDXL-Lora
      • SDXL-Lightning
      • SDXL-Lightning-V2
      • SDXL-Lightning-V3
      • SD3
      • SD3-V2
      • Aura-Flow
      • Kolors
      • Kolors(Reference Image Generation-KLING)
      • QRCode Generation
      • Lora
      • SD-3.5-Large
      • SD-3.5-Large-Turbo
      • SD-3.5-Medium
      • Lumina-Image-V2(Image generated)
      • Playground-v25(Image generated)
      • Omnigen-V1(Image generated)
    • Glif
      • Glif(Claude+SD3)
      • Glif (Text-to-Sticker)
      • Glif (Text-to-Graffiti)
      • Glif (Text-to-Wojak Comic)
      • Glif (Text-to-Lego)
    • Flux
      • Official API
        • Generate
        • Finetune
        • Result
      • Flux-Ultra(v1.1)
      • Flux-Pro
      • Flux-Pro(v1.1)
      • Flux-Dev
      • Flux-Schnell
      • Flux-Realism
      • Flux-Lora
      • Flux-General
      • Flux-General-Inpainting(Advanced Customization)
      • Flux-Lora-Training(Training Lora)
      • Flux-Lora-Training(Fetch Results Asynchronously)
    • Ideogram
      • Generate(Text to ImageV3)
      • Generate(Text to Image)
    • Recraft
      • Recraft-V3(Text to Image)
      • Create-Style(Customized Styles)
      • Recraft-20B(Image Generation)
    • Luma
      • Luma-Photon(Image generation)
      • Luma-Photon-Flash(Fast image generation)
    • Doubao
      • Drawing(Doubao image generation)
    • Google
      • Imagen-4-Preview (Image generated)
      • Imagen-3 (Image generated)
      • Imagen-3-Fast (Image generated)
    • Minimax
      • image(Text-to-Image Generation)
    • ZHIPU
      • image(Text-to-Image Generation)
    • Baidu
      • iRAG(Text-to-Image Generation)
    • Hidream
      • Hidream-i1-full(Advanced Version)
      • Hidream-i1-dev(Intermediate Version)
      • Hidream-i1-fast(Entry-Level Version)
    • Bagel
      • Bagel(Image generation)
    • SiliconFlow
      • Create Image Generation Request
  • Image Processing
    • 302.AI
      • Upscale
      • Upscale-V2
      • Upscale-V3
      • Upscale-V4
      • Super-Upscale
      • Super-Upscale-V2
      • Face-upscale
      • Colorize
      • Colorize-V2
      • Removebg
      • Removebg-V2
      • Removebg-V3
      • Inpaint
      • Erase
      • Face-to-many
      • Llava
      • Relight
      • Relight-background
      • Relight-V2
      • Face-swap-V2
      • Fetch
      • HtmltoPng
      • SvgToPng
      • image-translate
      • image-translate-query
      • image-translate-redo
      • Flux-selfie
      • Trellis(Image to 3D model)
      • Pose-Transfer(Human Pose Transformation)
      • Pose-Transfer(Human Pose Transformation Result)
      • Virtual-Tryon
      • Virtual-Tryon(Fetch Result)
      • Denoise(AI Denoising)
      • Deblur(AI Deblurring)
    • 302.AI-ComfyUI
      • Create Outfit Change Task
      • Create Outfit Change Task (Upload Mask)
      • Query Outfit Change Task Status
      • Create Face Swap Task
      • Query Face Swap Task Status
      • Create a Task to Replace Any Item
      • Create Object Replacement Task (Upload Mask)
      • Check the Status of Any Object Replacement Task
      • Create a Task to Transform Cartoon Characters into Real People
      • Query the status of the task to turn a manga character into a real person
      • Create Style Transfer Task
      • Query the status of the style transfer task
      • Create Image Removal Task
      • Query Image Removal Task Status
      • Create Video Face Swap Task
      • Query Video Face Swap Task Status
    • Vectorizer
      • Vectorize
    • Stability.ai
      • Fast Upscale
      • Creative Upscale
      • Conservative Upscale
      • Fetch
      • Erase
      • Inpaint
      • Outpaint
      • Search-and-replace
      • Search-and-recolor
      • Remove-background
      • Sketch
      • Structure
      • Style
      • Replace-Background
      • Stable-Fast-3D
      • Stable-Point-3D(Image to 3D Model Conversion -New Version)
    • Glif
      • Glif(Portrait Photo Stylization)
      • Glif(Photo-to-Sculpture)
      • Glif(Photo Pixelation)
      • Glif(Logo Materialization)
      • Glif(Image-to-GIF)
    • Clipdrop
      • Cleanup
      • Upscale
      • Remove-background
      • Uncrop
    • Recraft
      • Vectorize Image
      • Remove Background
      • Clarity Upscale
      • Generative Upscale
    • BRIA
      • Remove Background
      • Blur Background
      • Generate Background
      • Erase Foreground
      • Eraser
      • Expand Image
      • Increase Resolution
      • Crop
      • Cutout
      • Packshot
      • Shadow
      • Scene
      • Caption
      • Register
      • Mask
      • Presenter info
      • Modify Presenter
      • Delayer Image
    • Flux
      • 官方API
        • Generate(Image Edit)
        • Result(Query Task)
      • Flux-V1.1-Ultra-Redux(Image-to-image generation-Ultra)
      • Flux-V1.1-Pro-Redux(Image-to-image generation-Pro)
      • Flux-Dev-Redux(Image-to-image generation-Dev)
      • Flux-Schnell-Redux(Image-to-image generation-Schnell)
      • Flux-V1-Pro-Canny(Object consistency)
      • Flux-V1-Pro-Depth(Depth consistency)
      • Flux-V1-Pro-Fill(Partial repainting)
      • Flux-Kontext-Pro(Image Edit)
      • Flux-Kontext-Max(Image Edit)
    • Hyper3D
      • Hyper3d-Rodin(Generate 3D models)
      • Hyper3d-Rodin(Obtain task results)
    • Tripo3D
      • Task(Task Submission)
      • Upload(Image Upload)
      • Fetch
    • FASHN
      • Fashn-Tryon(Virtual Try-On)
      • Fashn-Tryon(Virtual Try-On v1.5)
    • Ideogram
      • Edit(Image EditionV3)
      • Remix(Image to ImageV3)
      • Reframe(Image ExtensionV3)
      • Replace Background(V3)
      • Remix(Image to Image)
      • Upscale(Image Upscaling)
      • Describe(Image Description)
      • Edit(Image Edition)
    • Doubao
      • SeedEdit(Image Command Editing)
      • Character(Character Feature Preservation)
    • Kling
      • Virtual-Try-On
      • Fetch(Get Task Result)
    • StepFun
      • Step1x-Edit(Modify Image)
    • Bagel
      • Bagel-Edit(Image Edit)
  • Video Generation
    • Unified Interface
      • Create Video Generation Task
      • Retrieve Video Task Information
    • 302.AI
      • Image-to-video
      • Live-portrait
      • Video-To-Video
      • Fetch
      • Latentsync (Open source digital person)
      • Latentsync (get task results)
      • Upscale-Video(Video Enhancement)
      • Upscale-Video(Get Video Results)
    • Stable Diffusion
      • Image-to-video
      • Fetch Image-to-video
    • Luma AI
      • Submit(Text / Image to Video)
      • Extend(Video)
      • Fetch
    • Runway
      • Submit(Text to Video)
      • Submit(Image to Video)
      • Submit(Image to Video Rapid)
      • Submit(Image-to-Video Generation with Gen4)
      • Submit(Image to Video Generation Gen4-Turbo)
      • Submit(Video to Video)
      • Submit(Video to Video Rapid)
      • Submit(Act-one motion capture)
      • Submit(Video extension)
      • Fetch
    • Kling
      • 302 format
        • Txt2Video(Text to Video 1.0 Rapid-5s)
        • Txt2Video_HQ(Text to Video 1.5 HQ-5s)
        • Txt2Video_HQ(Text to Video 1.5 HQ-10s)
        • Image2Video(Image to Video 1.0 Rapid-5s)
        • Image2Video(Image to Video 1.0 Rapid-10s)
        • Image2Video(Image to Video 1.5 Rapid-5s)
        • Image2Video(Image to Video 1.5 Rapid-10s)
        • Image2Video_HQ(Image to Video 1.5 HQ-5s)
        • Image2Video_HQ(Image to Video 1.5 HQ-10s)
        • Txt2Video(Text to Video 1.6 Standard-5s)
        • Txt2Video(Text to Video 1.6 Standard-10s)
        • Txt2Video(Text to Video 1.6 HQ-5s)
        • Txt2Video(Text to Video 1.6 HQ-10s)
        • Image2Video(Image to Video 1.6 Standard-5s)
        • Image2Video(Image to Video 1.6 Standard-10s)
        • Image2Video(Image to Video 1.6 HQ-5s)
        • Image2Video(Image to Video 1.6 HQ-10s)
        • Txt2Video(Text-to-Video 2.0 – HD – 5s)
        • Image2Video(Image-to-Video 2.0 – HD – 5s)
        • Image2Video(Image-to-Video 2.0 – HD – 10s)
        • Image2Video (Multiple pictures for reference)
        • Image2Video(Multiple pictures for reference)
        • Extend_Video
        • Image2Video(Image video 2.1-5 seconds)
        • Image2Video(Image video 2.1-10 seconds)
        • Image2Video(Image Video 2.1-HD-10 seconds)
        • Image2Video(Image Video 2.1-HD-5 seconds)
        • Fetch
      • Official format
        • Text2video (Text-to-Video Official API)
        • Text2video (Text-to-Video Get Task Result)
        • Image2video (Image-to-Video Official API)
        • Image2video (Image-to-Video Get Task Result)
    • CogVideoX
      • Generations (text-generated video)
      • Generations(Image-generated video)
      • Results (get task results)
    • Minimax
      • Video(Text-to-Video)
      • Video(Image-to-video)
      • Video(Based on Subject Reference)
      • Video(Camera movement control)
      • Query(Result)
      • Files(Video Download)
    • Pika
      • 1.5 pikaffects(Image-to-Video Generation)
      • Turbo Generate(Text-to-Video Generation)
      • Turbo Generate(Text-to-Video Generation)
      • 2.1 Generate(Text-to-Video Generation)
      • 2.1 Generate(Image-to-Video Generation)
      • 2.2 Generate(Text-to-Video Generation)
      • 2.2 Generate(Image-to-Video Generation)
      • 2.2 Pikascenes(Generate scene videos)
      • Fetch(Result)
    • PixVerse
      • Pixverse Special Effect ID
      • Pixverse Sound Effect ID
      • Generate
      • Fetch
    • Genmo
      • Mochi-v1 (Get task results)
      • Mochi-v1(Text to Video)
    • Hedra
      • 2.0
        • Audio(Upload)
        • Portrait(Upload)
        • Characters(lip-synthesis)
        • Fetch(Result)
      • 3.0
        • List Models(Get a list of models)
        • Create Asset(Resource creation)
        • Upload Asset(Resource upload)
        • Generate Asset(Resource Synthesis)
        • Get Status(Get resource synthesis results)
    • Haiper
      • Haiper(Text to Video)
      • Haiper(Image to Video)
      • Haiper(Text to Video V2.5)
      • Haiper(Image to Video V2.5)
      • Haiper(Fetch Task Result)
    • Sync.
      • Generate
      • Fetch
    • Lightricks
      • Ltx-Video
      • Ltx-Video-I2V
      • Ltx-Video-v095(Text-to-video generation)
      • Ltx-Video-v095-I2V(Image-to-Video Generation)
    • Hunyuan
      • Hunyuan(Text-to-Video)
      • Hunyuan(Obtain Task Results)
    • Vidu
      • Vidu(Text-to-Video)
      • Vidu(Image to Video)
      • Vidu(Generate video from the first and last frames)
      • Vidu(Reference-based video generation)
      • Vidu(Generate scene video)
      • Vidu(Smart Ultra HD)
      • Fetch(Retrieve Task Results)
      • Vidu V2(Text-to-Video Generation)
      • Vidu V2(Image-to-Video)
      • Vidu V2(Start-and-End Frame Video Generation)
      • Vidu V2(Subject-Driven Video Generation)
      • Vidu(Scene Video Generation V2)
      • Vidu V2(AI Ultra HD – Premium)
      • Fetch V2(Retrieve Task Result)
    • Tongyi Wanxiang
      • T2V(Text-to-Video)
      • Tasks(Fetch Task Result)
      • wan-t2v(Text-to-video open source version)
      • wan-t2v(Fetch Task Result)
      • wan-i2v(Image-to-video open source version)
      • wan-i2v(Fetch Task Result)
      • wan-vace(Video Edit)
      • wan-vace(Fetch Task Result)
    • Jimeng
      • Seaweed (Text/picture generated video)
      • Seaweed (Fetch Task Results)
      • Seedance (Text/picture generated video)
      • Seedance (Fetch Task Results)
    • SiliconFlow
      • LTX-Video(Video Generation)
      • HunyuanVideo(Video Generation)
      • Mochi-1-Preview(Video Generation)
      • Tasks(Fetch Task Result)
    • Google
      • Veo2(Text-to-video)
      • Veo2-i2v(Image to video generation)
      • Veo2(Get task results)
      • Veo3 (Text-to-video)
      • Veo3 (Get task result)
    • Kunlun Tech
      • Skyreels(Image to Video)
      • Skyreels(Get task results)
    • Higgsfield
      • Generate(Image to Video)
      • Shortads(Image-Generated Advertising Video)
      • Fetch(Retrieve Task Results)
  • Audio/Video Processing
    • Unified interface
      • TTS
        • Text-to-Speech Generation
        • Query TTS Provider Information
    • 302.AI
      • Stable-Audio(instrumental generation)
      • Transcript (Audio/Video to Text)
      • Transcriptions(Speech to Text)
      • Alignments(Subtitle Timing)
      • WhisperX
      • F5-TTS(Text to Speech)
      • F5-TTS (Asynchronous Text-to-Speech)
      • F5-TTS (Asynchronously Retrieve Results)
      • mmaudio(Text-to-Speech)
      • mmaudio(AI Video Voiceover)
      • mmaudio (Asynchronous Result Retrieval)
      • Diffrhythm(Song Generation)
    • OpenAI
      • Speech(Text to Speech tts-1)
      • Transcriptions(Speech to Text whisper-1)
      • Translations(Speech to English Text whisper-1)
      • Realtime
    • Azure
      • AzureTTS(Text to Speech)
      • Voice-List
    • Suno
      • Music(Automatic Mode)
      • Music(Custom Mode)
      • Music(Generate Lyrics)
      • Music(Song Continuation)
      • Fetch
    • Doubao
      • tts_hd(Text to Speech)
      • vc-ata(Automatic subtitle timing)
      • fetch(Query Generation Status)
      • vc(Audio and video caption generation)
      • fetch(Query caption result)
    • Fish Audio
      • TTS(Text to Speech)
      • Model(Create Voice)
      • Model(Obtain Voice)
      • Model(Delete Voice)
      • Model(Update Voice)
      • Model(Get Voice List)
    • Minimax
      • T2A(Async extra content generation)
      • T2A(Status Inquiry)
      • T2V(Create Voice)
      • Files(Audio File Download)
      • Music_Upload(Upload original music)
      • Music Generation API
      • T2A (voice generation-synchronization)
    • Dubbingx
      • TTS(Text to Speech)
      • GetTTSList(Get Voice List)
      • GetTTSTask(Get Task Status)
      • Analyze(emotions)
    • Udio
      • Generate(Music Generation)
      • Generate(Music Continuation)
      • Query
    • Elevenlabs
      • Speech-to-text(Speech-to-Text)
      • Speech-to-text(Asynchronously fetch results)
      • TTS-Multilingual-v2(Text-to-Speech)
      • TTS-Multilingual-v2(Asynchronous result retrieval)
      • TTS-Flash-v2.5(Text-to-Speech)
      • TTS-Flash-v2.5(Asynchronous result retrieval)
    • Mureka
      • Upload Music
      • Generate Lyrics from a Prompt
      • Continue writing lyrics from existing lyrics
      • Generate a Song from Lyrics
      • Retrieve the Generated Song
      • Separate Music Stems
      • Generate Instrumental Music Track
      • Retrieve Instrumental Music Track
      • Text-to-Speech
      • Create Podcast Audio
    • SiliconFlow
      • Upload reference audio
      • Delete reference audio
      • Create speech-to-text request
      • Create text-to-speech request
  • Information Processing
    • Unified Search API
      • Unified Search API
    • 302.AI
      • Admin Dashboard
        • Balance(Account balance)
        • Price(Get API Pricing)
        • Retrieve User API Keys List Data
        • Retrieve Data for Specified API Key
        • Create API Key
        • Update API Key
        • Delete API Key
      • Information search
        • Xiaohongshu_Search
        • Xiaohongshu_Note
        • Get_Home_Recommend
        • Tiktok_Search
        • Douyin_Search
        • Twitter_Search
        • Twitter_Post(X_Post)
        • Twitter_User(X_User)
        • Weibo_Post
        • Search_Video
        • Youtube_Info
        • Youtube_Subtitles(Youtube Obtain Subtitles)
        • Bilibili_Info(Bilibili Obtain Video Information)
        • MP_Article_List(Get the list of WeChat official account articles)
        • MP_Article(Retrieve WeChat Official Account articles)
      • File processing
        • Parsing
        • Upload-File
        • Markitdown (File conversion to md format)
      • Code execution
        • Virtual Machine Sandbox
          • One-click Code Execution
          • Create Sandbox
          • Query Your Sandbox List
          • Destroy Sandbox
          • Run-Code
          • Run Command Line
          • Query File Information at Specified Path
          • Import File Data into Sandbox
          • Export Sandbox Files
        • Static Sandbox
          • Run-Code
      • Remote Browser
        • Create Browser Automation Task
        • Query Browser Task Status
    • Tavily
      • Search
      • Extract
    • SearchAPI
      • Search
      • Search(News)
      • Search(Images)
      • Search(Lens)
      • Search(Videos)
      • Search(Scholar)
      • Search(Patents)
    • Search1API
      • Search
      • News
      • Crawl
      • Sitemap(Site Map)
      • Trending (Popular Trends)
    • Exa
      • Search
      • Contents(Get content)
      • Answer
    • Bocha AI
      • Web-search
      • Ai-search
    • Doc2x
      • Version 2
        • PDF(Upload - Asynchronous)
        • Status(View Status)
        • Parse(Request Export File - Asynchronous)
        • Result(exported results)
      • Version 1 (Deprecated)
        • PDF(PDF-to-MD)
        • PDF-Async
        • IMG-to-MD
        • IMG-Async
        • Status
        • Export
    • Glif
      • Glif(Bot)
    • Jina
      • Reader(Web Page to Markdown)
      • Search
      • Grounding(Verification of Facts)
      • Classify
    • DeepL
      • Chat(Translate into English)
      • Chat(Translate into Chinese)
      • Chat(Translate into Japanese)
      • Translate(Translate into various language)
    • RSSHub
      • RSSHub
    • Firefly card
      • saveImg(Card Generation)
    • Youdao
      • Youdao(Youdao Translate)
    • Mistral
      • OCR(PDF Parsing)
    • Firecrawl
      • Scrape
      • Batch Scrape
      • Get Batch Scrape Status
      • Get Batch Scrape Errors
      • Map
      • Search
  • RAG-related
    • OpenAI
      • Embeddings
    • Jina
      • Embeddings
      • Rerank
      • Rerank(Multimodal Reordering)
      • Tokenizer
    • China Model
      • Embeddings(Zhipu)
      • Embeddings(BAAI)
      • Embeddings(Baichuan AI)
      • Embeddings(Youdao)
      • Rerank(Youdao)
      • Rerank(BAAI)
    • 302.AI
      • Chat(with KB)
      • Chat(with KB-OpenAI compatible)
      • Create(Knowledge Base)
      • Delete(Knowledge Base)
      • Upload
      • List(KB)
      • Info
      • Meta-Chunking(Text LLM slices)
      • Meta-Chunking(File LLM slices)
  • Tools API
    • AI Video Creation Hub
      • Scripts(Generate Video Content Copy)
      • Terms(Generate Video Material Search Keywords)
      • Videos(Create Video Material Generation Task)
      • Tasks(Get Video Task Progress)
    • AI Paper Writing
      • CO-STORM
        • Create generate article task
        • Continue to generate dialogue interfaces
        • Update article content interface
        • Get article information
      • Asynchronous Paper Generate
      • Fetch
    • AI Podcast Production
      • Asynchronous Generate Podcast Transcripts
      • Check the status of podcast text generation task
      • Asynchronously Generate Podcast Audio
      • Check the status of podcast audio generation task
    • AI Writing Assistant
      • Get Tools‘ List
      • Generate Copywriting
    • AI Video Real-Time Translation
      • Query Video Information
      • Video Download
      • Extract Audio from Video
      • Audio vocal separation and transcription
      • Subtitle Translation
      • Video Burning
      • Original sound clone
      • Query task status
    • AI Document Editor
      • Generate a long text outline
      • Generate article content
    • Web Data Extraction Tool
      • Generate Schema
      • Create an extraction task
      • Query extraction progress
    • AI Prompt Expert
      • Prompt Optimization
      • Image prompt generation
      • Create SPO Prompt Optimization Task
      • Query SPO Prompt Optimization Results
    • AI 3D Modeling
      • 3D model file type conversion
    • AI Search Master 3.0
      • AI Search
    • AI Vector Graphics Generation
      • SVG to video
    • Al Answer Machine
      • Answer
    • AI PPT Generator
      • Generate PPT interface with one click
      • File parsing
      • Generate an outline
      • Generate outline content
      • Get template options
      • Generate PPT interface (synchronous interface)
      • Load PPT data
      • Generate PPT interface (asynchronous interface)
      • Asynchronous query generates PPT status
      • Download PPT
      • Add/update custom PPT templates
      • Pagination query PPT template
    • AI Academic Paper Search
      • arxiv Paper Search
      • Google Paper Search
    • One-Click Website Deployment
      • Create Hosted Webpage (Form Parameter API)
      • Create Hosted Webpage (JSON Parameter API)
      • Create Hosted Webpage (Binary Parameter API)
      • Query the List of Hosted Projects under an API Key
    • AI Avatar Maker
      • Generate Avatar (JSON Parameter Example)
      • Avatar Generation (form-data parameter example)
    • AI Card Generation
      • Generate Knowledge Card
      • Generate Poster
      • Generate philosophical cards
      • Generate philosophical quotation sayings
      • 生成知识卡片
    • AI Image Creative Station API
      • Creative Image Generation API Usage Instructions
      • Get Model List
      • Generate Creative Images
  • Help Center
    • HTTP Status Codes
    • List of supported languages for image translation
  1. Unified interface

Generate images

POST
/302/image/generate
Supports parameter passing via both application/json and multipart/form-data
Price: Charged according to the corresponding image model
Model list
模型名称描述备注
dall-e-3-t2iDALL·E's text-to-image modelSupported image sizes: 256x256, 512x512, or 1024x1024. Any other value will be treated as 1024x1024
dall-e-2-t2iDALL·E's text-to-image modelSupported image sizes: 256x256, 512x512, or 1024x1024. Any other value will be treated as 1024x1024
stable-v1-t2iStability.ai's text-to-image v1 model
stable-sd2-t2iStability.ai's text-to-image sd2 modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3-ultra-t2iStability.ai's text-to-image sd3-ultra modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3-t2iStability.ai's text-to-image sd3 modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3.5-medium-t2iStability.ai's text-to-image sd3.5-medium modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3.5-large-t2iStability.ai's text-to-image sd3.5-large modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3-turbo-t2iStability.ai's text-to-image sd3-turbo modelSupported aspect ratios: 16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21. Any other value will be treated as 1:1
stable-sd3-i2iStability.ai's image-to-image SD3 modelThe aspect_ratio parameter is not supported; the image parameter is required
stable-sd3.5-medium-i2iStability.ai's image-to-image SD3.5-medium modelThe aspect_ratio parameter is not supported; the image parameter is required
stable-sd3.5-large-i2iStability.ai's image-to-image SD3.5-large modelThe aspect_ratio parameter is not supported; the image parameter is required
stable-sd3-turbo-i2iStability.ai's image-to-image SD3-turbo modelThe aspect_ratio parameter is not supported; the image parameter is required
302ai-sdxl-t2iSDXL text-to-image model deployed by 302.ai
302ai-sdxl-lora-t2iSDXL-lora text-to-image model deployed by 302.ai
302ai-sdxl-lighting-t2iSDXL-lighting text-to-image model deployed by 302.ai
302ai-sdxl-lighting-v2-t2iSDXL-lighting-v2 text-to-image model deployed by 302.ai
302ai-sd3-t2iSD3 text-to-image model deployed by 302.ai
302ai-aura-flow-t2iaura-flow text-to-image model deployed by 302.ai
302ai-kolors-t2iOpen-source text-to-image model (Keling) deployed by 302.ai
302ai-kolors-i2iOpen-source image-to-image model (Keling) deployed by 302.aiThe image parameter is required
302ai-sd35-large-t2iSD3.5-large text-to-image model deployed by 302.ai
302ai-sd35-large-turbo-t2iSD3.5-large-turbo text-to-image model deployed by 302.ai
302ai-sd35-medium-t2iSD3.5-medium text-to-image model deployed by 302.ai
302ai-lumina-t2iLumina text-to-image model deployed by 302.ai
302ai-omnigen-v1-t2iomnigen-v1 text-to-image model deployed by 302.ai
302ai-playground-v25-t2iplayground-v25 text-to-image model deployed by 302.ai
302ai-lora-t2ilora text-to-image model deployed by 302.ai
302ai-lora-t2ilora text-to-image model deployed by 302.ai
flux-pro-1.1-ultra-t2iOfficial flux pro-1.1-ultra text-to-image model
flux-pro-1.1-t2iOfficial flux pro-1.1 text-to-image model
flux-pro-t2iOfficial flux pro text-to-image model
flux-dev-t2iOfficial flux pro-dev text-to-image model
flux-pro-1.0-fill-t2iOfficial flux pro-1.0-fill text-to-image model
flux-pro-1.0-canny-t2iOfficial flux pro-1.0-canny text-to-image model
flux-pro-1.0-depth-t2iOfficial flux pro-1.0-depth text-to-image model
flux-pro-1.1-ultra-finetuned-t2iOfficial flux pro-1.1-ultra-finetuned text-to-image model
flux-pro-1.0-finetuned-t2iOfficial flux pro-1.0-finetuned text-to-image model
flux-pro-1.0-depth-finetuned-t2iOfficial flux pro-1.0-depth-finetuned text-to-image model
flux-pro-1.0-canny-finetuned-t2iOfficial flux pro-1.0-canny-finetuned text-to-image model
flux-pro-1.0-fill-finetuned-t2iOfficial flux pro-1.0-fill-finetuned text-to-image model
302ai-flux-v1.1-ultra-t2iflux-v1.1-ultra text-to-image model deployed by 302.aiSupported aspect ratios: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21. Any other value will be treated as 16:9
302ai-flux-v1.1-pro-t2iflux-v1.1-pro text-to-image model deployed by 302.ai
302ai-flux-pro-t2iflux-pro text-to-image model deployed by 302.ai
302ai-flux-dev-t2iflux-dev text-to-image model deployed by 302.ai
302ai-flux-schnell-t2iflux-schnell text-to-image model deployed by 302.ai
302ai-flux-realism-t2iflux-realism text-to-image model deployed by 302.ai, enhanced with hyper-realistic LoRA
ideogram-v1-t2iOfficial Ideogram V_1 text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
ideogram-v1-turbo-t2iOfficial Ideogram V_1_turbo text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
ideogram-v2-t2iOfficial Ideogram V_2 text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
ideogram-v2-turbo-t2iOfficial Ideogram V_2_turbo text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
ideogram-v2a-t2iOfficial Ideogram V_2A text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
ideogram-v2a-turbo-t2iOfficial Ideogram V_2A_turbo text-to-image modelSupported aspect ratios: 1:1, 10:16, 16:10, 9:16, 16:9, 3:2, 2:3, 4:3, 3:4, 1:3, 3:1. Any other value will be treated as 1:1
recraft-v3-t2iOfficial Recraft V3 text-to-image model
recraft-20b-t2iOfficial Recraft 20B text-to-image model
luma-t2iOfficial Luma text-to-image modelSupported aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21. Any other value will be treated as 1:1
luma-flash-t2iOfficial Luma fast text-to-image modelSupported aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21. Any other value will be treated as 1:1
doubao-v2-t2iOfficial Doubao v2.0 text-to-image modelSupported image dimensions are limited to [256, 768]; any other value will be treated as 512
doubao-v2-l-t2iOfficial Doubao v2.0_L text-to-image modelSupported image dimensions are limited to [256, 768]; any other value will be treated as 512
doubao-v2.1-l-t2iOfficial Doubao v2.1_L text-to-image modelSupported image dimensions are limited to [256, 768]; any other value will be treated as 512
doubao-v3-t2iOfficial Doubao v3.0 text-to-image modelSupported image dimensions are limited to [256, 768]; any other value will be treated as 512
google-v3-t2iOfficial Google Imagen-3 text-to-image modelSupported aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21. Any other value will be treated as 1:1
google-v3-fast-t2iOfficial Google Imagen-3-fast text-to-image modelSupported aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21. Any other value will be treated as 1:1
minimaxi-t2iOfficial Minimaxi minimaxi-image-01 text-to-image modelSupported aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 9:21. Any other value will be treated as 1:1
cogview-4-t2iOfficial Zhipu CogView-4 text-to-image modelSupported image sizes: 1024x1024, 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, 720x1440. Any other value will be treated as 1024x1024
cogview-4-250304-t2iOfficial Zhipu cogview-4-250304 text-to-image modelSupported image sizes: 1024x1024, 768x1344, 864x1152, 1344x768, 1152x864, 1440x720, 720x1440. Any other value will be treated as 1024x1024
baidu-irag-t2iBaidu IRAG image generation model, which retrieves real images before generation to reduce hallucinations
hidream-i1-full-t2iZhixiang Future's i1-full text-to-image model
hidream-i1-dev-t2iZhixiang Future's i1-dev text-to-image model
hidream-i1-fast-t2iZhixiang Future's i1-fast text-to-image model

Request

Header Params
Authorization
string 
required
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
prompt
string 
生成图片的提示词
required
Prompt for image generation
model
string 
选择的模型
required
Selected model
See the documentation for the model list
height
integer 
生成的图片高度
optional
Height of the generated image
Only some models are supported
Default:
1024
width
integer 
生成的图片宽度
optional
Width of the generated image
Only some models are supported
Default:
1024
negative_prompt
string 
负面提示词,不希望图片出现的内容
optional
undesired content in the image
Only some models are supported
aspect_ratio
string 
图像宽高比
optional
Image aspect ratio
Only some models are supported
output_format
string 
输出图片的格式
optional
Output image format
Only some models are supported
Default:
png
image
string 
图片
optional
Image
Supports uploading binary files, accessible public URLs, or base64-encoded strings (must start with http or data:image)
Example
{
    "prompt": "sky city",
    "model": "baidu-irag-t2i"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.302.ai/302/image/generate' \
--header 'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "sky city",
    "model": "baidu-irag-t2i"
}'

Responses

🟢200成功
application/json
Body
image_url
string 
生成的图片链接
required
data
object 
模型原始的返回
required
The returned data structure varies for different models
Example
{"image_url":"https://file.302.ai/gpt/imgs/4dce725a4b1aa5e6b7f4711dae61199f.png","data":{"completed_at":"2025-04-18T10:29:16.80035912Z","created_at":"2025-04-18T10:29:10.071Z","error":"","id":"17449721508952","model":"sdxl","output":"[\"https://file.302.ai/gpt/imgs/4dce725a4b1aa5e6b7f4711dae61199f.png\"]","started_at":"2025-04-18T10:29:10.079674739Z","status":"succeeded"}}
🟠422参数错误
🔴500生成失败
🟠401apikey错误
🔴500服务器错误
Modified at 2025-04-21 07:45:26
Previous
Chat(Nova)
Next
Generations(Image generation)
Built with