latestOpenAPI 3.0.02026-08-10380208.8 KB

806c6d31631b

Dataset

Refine Structured Prompt

Refines a Structured Prompt object (such as a Visual Schema or an Image Caption) based on user instructions.

Access Control & Validation:

  • Requires a valid dataset_id to verify ownership.
  • The referenced dataset must be in draft mode.

Use Cases:

  1. Refine Visual Schema: Input the initial schema and instructions like "Make the style description more detailed".
  2. Refine Image Caption: Input a specific image's caption and instructions like "Fix the description of the hair color".
post/tailored-gen/refine_structured_prompt

Headers

api_tokenstring required

Request body

dataset_idinteger required

The ID of the dataset associated with this refinement.

structured_promptstring required

The current structured prompt string (Visual Schema or Caption) to be refined.

instructionstring required

Natural language instruction describing how to modify the JSON.

context_imagesstring[]

Optional. List of image URLs or Base64 strings to provide visual context.

Response

Successfully refined JSON.

structured_promptstring

The refined Structured Prompt string.