1. OpenAI
TikHub-AI-Proxy
  • Overview (PLEASE READ)
  • Streaming API
  • OpenAI
    • OpenAI response
      POST
    • OpenAI embeddings
      POST
    • OpenAI audio transcription
      POST
    • OpenAI chat completion
      POST
    • OpenAI image generation
      POST
    • OpenAI image edit
      POST
    • OpenAI image edit (legacy alias)
      POST
  • Claude
    • Claude chat completion
      POST
    • Claude message
      POST
  • DeepSeek
    • DeepSeek chat completion
      POST
    • DeepSeek chat completion
      POST
  • Gemini
    • Gemini content
      POST
  • Seedance
    • Seedance video generation
      POST
    • Retrieve Seedance task
      GET
  • Kling
    • Kling text-to-video
      POST
    • Retrieve Kling text-to-video task
      GET
    • Kling image-to-video
      POST
    • Retrieve Kling image-to-video task
      GET
  • Veo
    • Veo video generation
      POST
    • Fetch Veo video generation status
      POST
  • Schemas
    • ChatCompletionRequest
    • ImageGenerationRequest
    • ChatMessage
    • ImageEditRequest
    • Tool
    • ImageGenerationResponse
    • ToolCall
    • ChatCompletionResponse
    • ChatCompletionChoice
    • ContentFilterResults
    • UsageInfo
    • EmbeddingRequest
    • EmbeddingResponse
    • TranscriptionRequest
    • TranscriptionResponse
    • ClaudeMessageRequest
    • ClaudeMessageResponse
    • VideoCreateRequest
    • VideoResponse
    • VideoRemixRequest
    • GeminiGenerateContentRequest
    • VideoListResponse
    • GeminiContent
    • VideoDeleteResponse
    • GeminiGenerationConfig
    • ResponseRequest
    • GeminiGenerateContentResponse
    • ResponseObject
    • SeedanceTaskRequest
    • SeedanceTaskCreateResponse
    • SeedanceTaskResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • KlingTaskResponse
    • KlingTaskDetailResponse
    • KlingTaskListResponse
    • VeoGenerateRequest
    • VeoOperationResponse
    • VeoFetchOperationRequest
    • VeoFetchOperationResponse
  1. OpenAI

OpenAI image edit

POST
https://ai.tikhub.io/v1/images/edits
OpenAI
Edits an image given a source image and an edit instruction prompt. An optional mask defines the region to edit.

Supported Models#

gpt-image-2
gpt-image-2-vip

Notes#

gpt-image-* accepts multiple image[] parts to provide several reference images. (for gpt-image-2-vip only)
mask must be a PNG with a transparent edit region and the same dimensions as the source 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 'https://ai.tikhub.io/v1/images/edits' \
--header 'Authorization: Bearer <token>' \
--form 'model=""' \
--form 'prompt=""' \
--form 'image=@""' \
--form 'mask=@""' \
--form 'n="1"' \
--form 'size=""' \
--form 'quality=""' \
--form 'response_format=""' \
--form 'background=""' \
--form 'output_format=""' \
--form 'output_compression=""' \
--form 'user=""'

Responses

🟢200
application/json
Successful response
Bodyapplication/json

Example
{
    "created": 0,
    "data": [
        {
            "url": "string",
            "b64_json": "string",
            "revised_prompt": "string"
        }
    ]
}
🟠400
🟠401
🟠429
🔴500
Modified at 2026-05-04 13:51:11
Previous
OpenAI image generation
Next
OpenAI image edit (legacy alias)
Built with