# Generate Caption Prefix Generates a caption prefix based on the provided images. This is currently supported only when ip_type is stylized_scene, 'defined_character' or 'object_variants' IP types. ##### Usage Scenarios: 1. Before uploading visuals to a new dataset - This use case applies when creating a new dataset. - In the first step, you can create the dataset entity in parallel while calling this endpoint. - Randomly sample 1-6 images from the input images provided for training. If there are 6 or more images, provide exactly 6 for the best results. - Once you receive the prefix, update the dataset using the Update Dataset endpoint. - Then, proceed with uploading images to the dataset. 2. To regenerate a new prefix (even if previously generated) - This allows users to select the prefix they prefer. - Randomly sample 1-6 images from the input images provided for training. If there are 6 or more images, provide exactly 6 for the best results. - Update the dataset with the new prefix. - Then, use the Regenerate All Captions endpoint to ensure all images in the dataset get updated captions. If any image fails validation, the request will fail. This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content - the first blocked input image will fail the entire request. Endpoint: POST /tailored-gen/generate_prefix ## Header parameters: - `api_token` (string, required) Authentication token. ## Request fields (application/json): - `image_urls` (array) An array of 1-6 image URLs. Either image_urls or images must be provided, but not both. - `images` (array) An array of 1-6 base64-encoded images. Either image_urls or images must be provided, but not both. - `ip_type` (string) The IP type, provided when creating the project. Enum: "stylized_scene", "defined_character", "object_variants" - `ip_medium` (string) The IP medium, provided when creating the project. Enum: "photography", "illustration" - `ip_name` (string) Name of the IP, provided when creating the project. This field is relevant only when ip_type is defined_character. - `content_moderation` (boolean) When enabled, applies content moderation to both input visuals and generated outputs. - Processing stops at the first image that fails moderation - Returns a 422 error with details about which parameter failed ## Response 200 fields (application/json): - `prefix` (string) The generated caption prefix. ## Response 415 fields (application/json): - `prefix` (string,null) - `errors` (array) - `errors.error_code` (integer) HTTP status code of the error. - `errors.description` (string) Error message. - `errors.image_number` (integer) Index of the image that caused the error. ## Response 422 fields (application/json): - `prefix` (string,null) - `errors` (array) - `errors.error_code` (integer) HTTP status code of the error. - `errors.description` (string) Error message. - `errors.image_number` (integer) Index of the image that caused the error. ## Response 400 fields ## Response 401 fields ## Response 429 fields ## Response 500 fields