Caption
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/caption \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"init_image": "<string>",
"length": "normal",
"base64": false,
"webhook": "<string>",
"track_id": 123
}
'{
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}Image Editing API
Caption
This endpoint allows you to caption images.
POST
/
image_editing
/
caption
Caption
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/caption \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"init_image": "<string>",
"length": "normal",
"base64": false,
"webhook": "<string>",
"track_id": 123
}
'{
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}
Request
Make aPOST request to below endpoint and pass the required parameters as a request body to the endpoint.
curl
--request POST 'https://modelslab.com/api/v6/image_editing/caption' \
Body
json
{
"key":"your_api_key",
"init_image":"https://i.pinimg.com/736x/6e/ab/48/6eab481a1ee8fcfaec32a316d2768a61.jpg",
"length":"long",
"base64": false,
"webhook": null,
"track_id": null
}
Body
application/json
Your API Key used for request authorization
Link the image you want your generate prompt from. Available formats: png, jpeg, jpg
the length of the caption
Available options:
short, normal, long Set to true for base64 response
URL to receive POST API call when complete
ID for webhook identification
Response
200 - application/json
Caption response
- Option 1
- Option 2
- Option 3
Available options:
success Time taken to generate the image in seconds
Unique identifier for the generation request
Array of generated image URLs
Array of proxy image URLs
Metadata about the generation process
Was this page helpful?
⌘I

