1. OpenAI Format
FuhuAPI_EN
  • Quick Start
    • Quick Start
    • Must-read for beginners
    • FuhuAPI Announcement
  • API Reference
    • Error status code description
    • OpenAI Format
      • Veo3-chat format
        POST
      • seedance
        POST
      • response
        POST
      • generate video
        POST
      • image
        POST
      • Image Editing (gpt-image-1)
        POST
      • embed
        POST
      • Realtime
        POST
      • Get model list
        GET
      • Response ID to obtain results
        GET
      • Hunyuan3D
        POST
    • Anthropic Format
      • Anthropic Claude
    • Midjourney Image Generation
      • Quick teaching-complete process in one go
      • Task Query
        • pagination query
        • Specify ID to obtain task
      • Submit Imagine task
      • Submit video task
      • Submit editing task
      • Submit Action Task
      • Submit Blend task
      • Submit Describe task
      • Submit Modal
    • Image Generation
      • ideogram(images)
        • Official documentation (updated in real time)
        • Generate 3.0 (illustrated in the text)
        • Reframe 3.0 (Refactoring)
        • Replace Background 3.0
        • Remix 3.0 (Mixed Graph)
        • Edit 3.0 (Edit)
        • Generate (text and image)
        • Remix (mixed image)
        • Upscale (enlarged high-definition)
        • Describe
        • Edit
      • Flux(images)
        • Create Task - General
        • generate image
        • Fine tuning (temporarily unavailable)
        • query task
        • Generate image (replica format)
      • Replicate(image)
        • Create Task - General
        • Create task - float kontext pro, max
        • Create task-black forest labs/flux-1.1-pro
        • Create task-black forest labs/flux-1.1-pro ultra
        • query task
        • Create task
      • Recraft(images)
        • 附录
        • Generate Image
        • Vectorize Image
        • Remove Background
        • Clarity Upscale
        • Create style
        • Generative Upscale
    • Music Generation
      • Suno
        • Set suno version
        • Suno API Scenario Application Guide
        • Generate lyrics
        • Generate music
        • Upload music
        • Song Splicing
        • Full track acoustic separation
        • Single track acoustic separation
        • Create a new Persona
        • Query a single task
        • Generate MP4 MV video
        • Retrieve WAV format files
        • Timing: Lyrics, audio timeline
        • Batch query task
        • Create music using persona_id
      • Udio (not available yet)
        • Generate music
        • Query a single task
    • Video Generation
      • veo3
        • veo3-chat format
        • Submit video generation task
        • Check the video generation status
      • Dream Test
        • seedance
      • runway(video)
        • Official format
          • Generate videos from images
          • Get detailed task information
        • Reverse format
          • Generate (text)
          • Generate (refer to image)
          • Video2video video to video style redrawing
          • Act one emoji transfer
          • Feed - Get Task
      • kling (video)
        • Callback Protocol
        • image expansion
        • generate image
        • text-to-video
        • image-to-video
        • Video extension
        • Virtual try on
        • lip-sync
        • video effects
        • Query task (single)
      • luma (video)
        • Official API format
          • generate video
          • Single query task
      • MiniMax Conch (video)
        • Official Documentation
        • video generation
        • query task
        • File Download
      • PIKA(video)
        • Universal version
          • generate video
          • Query video tasks
        • Generate (reference video/extended video)
        • Generate (refer to image)
        • Generate (text)
        • feed
      • sora
        • Reverse format
          • Create video
          • Generate Video
          • Query video tasks
    • Audio
      • Text to audio conversion
      • audio to text
      • Create translation
  • Code Sample
    • Code Sample
  • Integration Guide
    • Best Practices
      • Gemini CLI Access Instructions
      • Claude code access instructions
      • FuhuAPI Account Balance Query API Usage Instructions
      • Retry logic documentation using FuhuAPI and OpenAI's official API
      • Midjorney Calling Best Practices
      • Runway Call Best Practices
    • Application Integration Guide
  • Pricing and Billing
    • About Price
    • About Grouping
  • Help Center
    • Help Center
    • Interface stability
    • Common Misconceptions
    • Use confusion
    • Privacy Policy
    • Terms of Service
  • Schemas
    • 示例数据模型
    • Sample Schemas
      • Pet
      • Category
      • Tag
    • Schemas
      • 双人特效
      • 单人特效
      • VideoGenerationRequest
      • TextGenerateRequest
      • ImageGenerateRequest
      • VideoGenerateRequest
      • BaseResponse
      • TextToImageRequest
      • VideoGenerationResponse
      • GenerateResponse
      • EditImageRequest
      • ErrorResponse
      • BlendImagesRequest
      • UpscaleRequest
      • DescribeImageRequest
      • ImageGenerationResponse
      • ImageDescriptionResponse
      • ErrorResponse
  1. OpenAI Format

Image Editing (gpt-image-1)

POST
https://api.fuhuapi.com/v1/images/edits
Official Documentation:
https://platform.openai.com/docs/api-reference/images/createEdit

Image Edit Request Parameters#

Parameter NameTypeRequiredDescription
imageFile or Array of Files✅The image to be edited. Must be a supported image file or array.
- gpt-image-1: PNG, WEBP, or JPG, each less than 25MB.
- dall-e-3: A square PNG, less than 4MB.
promptString✅A textual description of the desired image.
- Max length: 1000 characters for dall-e-3, 32000 characters for gpt-image-1.
maskFileAn optional PNG mask image. Transparent areas (alpha=0) indicate areas that need editing.
Must match the image dimensions and be smaller than 4MB. Applies to the first image.
modelstringModel to use: dall-e-3 or gpt-image-1.
ninteger or nullNumber of images to generate. Must be between 1 and 10.
Default: 1.
qualitystring or nullApplies only to gpt-image-1. Possible values: high, medium, low.
Default: auto.
response_formatstring or nullResponse format. Possible values: url or b64_json.
Only dall-e-3 supports url (valid for 60 minutes).
sizestring or nullImage size:
- gpt-image-1: 1024x1024, 1536x1024, 1024x1536, auto (default)
- dall-e-2: 256x256, 512x512, 1024x1024

Request

Header Params

Body Params multipart/form-data

Request Code 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.fuhuapi.com/v1/images/edits' \
--form 'image=@"MQ==/test.png"' \
--form 'prompt="Put on glasses"'

Responses

🟢200success
application/json
Body

Example
{
    "data": [
        {
            "b64_json": ".........................."
        }
    ],
    "created": 1747124651,
    "usage": {
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "total_tokens": 6605,
        "prompt_tokens_details": {
            "cached_tokens_details": {}
        },
        "completion_tokens_details": {},
        "input_tokens": 365,
        "output_tokens": 6240,
        "input_tokens_details": {
            "text_tokens": 42,
            "image_tokens": 323,
            "cached_tokens_details": {}
        }
    }
}
Modified at 2025-10-15 14:42:23
Previous
image
Next
embed
Built with