Skip to main content
POST
/
v1
/
generation
/
image-to-prompt
Image to Prompt
curl --request POST \
  --url https://api.weryai.com/v1/generation/image-to-prompt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "img_url": "https://example.com/image.jpg",
  "image_size": 512,
  "language": "en"
}
'
{
  "status": 0,
  "desc": "success",
  "message": "success",
  "data": {
    "prompt": "A stunning sunset over the ocean with golden and pink hues...",
    "cost_mill": 1234
  }
}

Authorizations

Authorization
string
header
required

Authenticate using Bearer token. Get your API Key from the WeryAI Console.

Example: Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Body

application/json
img_url
string<uri>
required

Source image URL

Example:

"https://example.com/image.jpg"

image_size
integer<int64>
required

Image file size in KB

Example:

512

language
string

Language of the returned prompt (defaults to user language)

Example:

"en"

model
string

Model to use for prompt generation

Response

Prompt generated successfully

status
integer

Business status code (0 indicates success)

Example:

0

desc
string

Status description

Example:

"success"

message
string

Multi-language message

Example:

"success"

data
object