/generate/caption

Caption image(s)

Query Params
string
Body Params
boolean

Whether we try to ensure IP removal for new prompt generation.

images
array of strings
required

List of images used to generate captions. Results are returned in the same order as the given images.

Images are set a data URLs (example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=") or the asset IDs (example: "asset_GTrL3mq4SXWyMxkOHRxlpw").

Notes:

  • if both modelId and images are provided, modelId's examples and training images will be used to influence the caption structure of the images
  • if only images are provided, the captions will be conditioned by the detailsLevel parameter
  • Replaces assetIds parameter
  • if you want to caption multiple images at a time, please prefer using asset ids instead of data url
images*
number

If specified, the API will make a best effort to produce the same results, such that repeated requests with the same seed and parameters should return the same outputs. Must be used along with the same parameters including prompt, model's state, etc..

unwantedSequences
array of strings

Optional list of words sequences that should not be present in the generated prompts.

unwantedSequences
string

When provided, the model will follow the model's training images and examples' prompt to generate the captions.

number
0 to 2

The sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

We generally recommend altering this or topP but not both.

assetIds
array of strings

The assetIds to generate captions. Results are returned in the same order as the given assetIds. Deprecated, use images parameter instead.

assetIds
number
0 to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

string
enum

The details level used to generate the captions.

When a modelId is provided and examples are available, the details level is ignored.

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json