Images
Create an image caption task
/images/captionsGenerate a short caption for an input image in the requested language. The request can run synchronously or return a task for polling.
Request Body
input_imagelanguageoptionsblockpriorityResponses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultmetadatadescriptionkeywordskeywords[]task_uuid from the response body to poll the corresponding GET endpoint for the result. Sync vs async →curl https://api.v2fun.ai/api/v1/images/captions \
-X POST \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_image": "<input_image>",
"language": "<language>"
}'{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": "<result>"
}Get an image caption task
/images/captions/{task_uuid}Retrieve the current status or final result of an image caption task.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
task_uuid | path | Yes | string | Task UUID returned when the image caption job was created. |
Responses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultmetadatadescriptionkeywordskeywords[]curl https://api.v2fun.ai/api/v1/images/captions/<task_uuid> \
-H "Authorization: Bearer $YOUR_API_KEY"{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": "<result>"
}Create a prompt enhancement task
/images/prompt_enhancementsImprove or expand an image prompt before it is used for image generation. The request can run synchronously or return a task for polling.
Request Body
promptsystem_promptoptionsblockpriorityResponses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultmetadatatask_uuid from the response body to poll the corresponding GET endpoint for the result. Sync vs async →curl https://api.v2fun.ai/api/v1/images/prompt_enhancements \
-X POST \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "<prompt>",
"system_prompt": "<system_prompt>"
}'{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": "<result>"
}Get a prompt enhancement task
/images/prompt_enhancements/{task_uuid}Retrieve the current status or final result of a prompt enhancement task.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
task_uuid | path | Yes | string | Task UUID returned when the prompt enhancement job was created. |
Responses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultmetadatacurl https://api.v2fun.ai/api/v1/images/prompt_enhancements/<task_uuid> \
-H "Authorization: Bearer $YOUR_API_KEY"{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": "<result>"
}Create an image generation task
/images/generationsSubmit a text-to-image generation request and receive a task reference for polling.
Request Body
modelpromptsizebackgroundoptionsblockpriorityResponses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatatask_uuid from the response body to poll the corresponding GET endpoint for the result. Sync vs async →curl https://api.v2fun.ai/api/v1/images/generations \
-X POST \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "<prompt>"
}'{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}Get an image generation task
/images/generations/{task_uuid}Retrieve the current status or final output of an image generation task.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
task_uuid | path | Yes | string | Task UUID returned when the image generation job was created. |
Responses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatacurl https://api.v2fun.ai/api/v1/images/generations/<task_uuid> \
-H "Authorization: Bearer $YOUR_API_KEY"{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}Create an image edit task
/images/editsSubmit an image editing request based on one or more source images and an optional prompt.
Request Body
modelpromptinput_imagesinput_images[]sizebackgroundoptionsblockpriorityResponses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatatask_uuid from the response body to poll the corresponding GET endpoint for the result. Sync vs async →curl https://api.v2fun.ai/api/v1/images/edits \
-X POST \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}Get an image edit task
/images/edits/{task_uuid}Retrieve the current status or final output of an image editing task.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
task_uuid | path | Yes | string | Task UUID returned when the image edit job was created. |
Responses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatacurl https://api.v2fun.ai/api/v1/images/edits/<task_uuid> \
-H "Authorization: Bearer $YOUR_API_KEY"{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}Create an image processing task
/images/processesUse SeedVR2 to restore the input image and enhance fine details.
Request Body
modelinput_imageoptionsblockpriorityResponses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatatask_uuid from the response body to poll the corresponding GET endpoint for the result. Sync vs async →curl https://api.v2fun.ai/api/v1/images/processes \
-X POST \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedvr2",
"input_image": "<input_image>"
}'{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}Get an image processing task
/images/processes/{task_uuid}Retrieve the current status or final output of an image processing task.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
task_uuid | path | Yes | string | Task UUID returned when the image processing job was created. |
Responses
For standard error codes, see Error Handling.
task_uuidtask_typemodelstatuscreated_atcompleted_atresultresult[]metadatacurl https://api.v2fun.ai/api/v1/images/processes/<task_uuid> \
-H "Authorization: Bearer $YOUR_API_KEY"{
"task_uuid": "<task_uuid>",
"task_type": "<task_type>",
"model": "<model>",
"status": "<taskstatus>",
"created_at": 0,
"completed_at": 0,
"result": []
}