1. Images
  • Start
    • Product Intrduction
    • Quick to use
    • Using Nexhina in AI Coding Tools
  • API integration explanation
    • Quick Start
    • Getting an API Key
    • Authentication
    • Request URL
    • HTTP Status Codes
    • Streaming Output Guide
  • API Endpoints
    • Chat
      • Chat Completion
    • Models
      • List Available Models
    • Responses
      • Responses API
    • Embeddings
      • Text Embedding
    • Images
      • Text-to-Image
        POST
      • Image-to-Image
        POST
    • Audio
      • Text-to-Speech (TTS)
      • Speech-to-Text (STT)
      • Audio Translation
    • Video
      • Generate Video
    • Moderation
      • Content Moderation
    • Rerank
      • Rerank
  • Platform-related
    • Platform agreement
    • Privacy Policy
    • General Questions
  1. Images

Image-to-Image

POST
/v1/images/edits
根据原始图片和 Prompt 生成修改后的图片,使用 multipart/form‑data 上传 image 文件

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params multipart/form-dataRequired

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 '/v1/images/edits' \
--header 'Authorization: Bearer <token>' \
--form 'model="gpt-image-2"' \
--form 'prompt="Change the character'\''s clothes to a black suit, keep the character'\''s pose and background unchanged"' \
--form 'image=@"二进制图片文件"' \
--form 'n="1"' \
--form 'size="1024x1024"' \
--form 'quality=""' \
--form 'response_format="url"' \
--form 'style=""' \
--form 'user=""'

Responses

🟢200ImageSuccess
application/json
图片生成成功
Bodyapplication/json

Example
{"created":1713833628,"data":[{"url":"https://cdn.example.com/image-001.png"}]}
Modified at 2026-08-19 06:43:15
Previous
Text-to-Image
Next
Text-to-Speech (TTS)
Built with