Prompt Collections
Discover the different styles of the Bodia prompts collections. You can create your own collections or use public collections provided from Bodia. A collection is a list of styles and a Style is a predefined Prompt to which a name and characteristics are assigned.
Collections
A Collection is a grouping of related styles, that is, it contains a list of prompt based on one style that you can run on your Fine-Tune models in Bodia.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the Collection.
- Name
name
- Type
- string
- Description
The name for the Prompt Collection.
- Name
styles
- Type
- array
- Description
A prompt collection contains a list of prompt styles. You can see the prompt styles properties in the Prompt Styles Properties section below.
- Name
thumbnail
- Type
- string
- Description
The URL to main Image of this Collection.
Create Collection
This endpoint allows you to create one collections with a list of styles.
Required attributes
- Name
name
- Type
- string
- Description
The name for the Prompt Collection.
- Name
styles
- Type
- array
- Description
A prompt collection contains a list of prompt styles. You can see the prompt styles properties in the Prompt Styles Properties section.
Request
curl --request POST \
--url https://api.bodia.ai/v1/prompts/collections \
--header 'Authorization: Bearer {API_KEY}' \
--data '
{
"name": "cars",
"styles": [
{
"name": "ferrari",
"id": "qFNy0_NhWdlsbYB-CGaxLp1xF"
},
{
"name": "mercedes",
"id": "qFNy0_NhWdlsbYB-CGaxLp1xF"
}
]
}'
Response
{
"id": "UcM54zDyOoigOay2_uBUV5x3",
"name": "cars",
"thumbnail": "https://images.bodia.ai/cars.jpg"
}
List Collections
GET request to the Collection endpoint to retrieve a list of all your prompt collections.
Request
curl -G https://api.bodia.ai/v1/prompts/collections \
-H "Authorization: Bearer {API_KEY}"
Response
[
{
"id": "TNOlKWFqPkydJA7sSVcT9zdq",
"name": "Superheros",
"thumbnail": "https://images.bodia.ai/superheros.jpg"
},
{
"id": "0VJe-kQbpz6BF399hBFKoS5q",
"name": "Art",
"thumbnail": "https://images.bodia.ai/art.jpg"
}
]
Retrieve a Collection
This endpoint allows you to retrieve one Collection.
Request
curl -G https://api.bodia.ai/v1/prompts/collections/{COLLECTION_ID} \
-H "Authorization: Bearer {API_KEY}"
Response
{
"id": "TNOlKWFqPkydJA7sSVcT9zdq",
"name": "Superheros",
"thumbnail": "https://images.bodia.ai/superheros.jpg"
}
Delete a Collection and its Styles
This endpoint allows you to delete Collections in Bodia.
Note: This will also delete the Styles of that Collection.
Request
curl -X DELETE https://api.bodia.ai/v1/prompts/collections/{TUNE_ID} \
-H "Authorization: Bearer {API_KEY}"
Response
{
"delete": "it has been deleted successfully"
}
Styles
A Style contains information about the Prompt which generates the image of that style in a Fine-Tune.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the Style.
- Name
name
- Type
- string
- Description
The name for the Prompt Style.
- Name
cfg
- Type
- float
- Description
Scale for classifier-free guidance (minimum: 1; maximum: 20).
- Name
steps
- Type
- integer
- Description
Number of denoising steps (minimum: 1; maximum: 50).
- Name
thumbnail
- Type
- string
- Description
The URL to main Image of this Style.
Add Styles to Collection
This endpoint allows you to create one collections with a list of styles.
Required attributes
- Name
id
- Type
- string
- Description
Identifier of the Prompt to be added.
- Name
name
- Type
- string
- Description
The name for the Prompt Style.
Optional attributes
- Name
cfg
- Type
- float
- Description
Scale for classifier-free guidance (minimum: 1; maximum: 20).
- Name
steps
- Type
- integer
- Description
Number of denoising steps (minimum: 1; maximum: 50).
Request
curl --request POST \
--url https://api.bodia.ai/v1/prompts/collections/{COLLECTION_ID}/styles \
--header 'Authorization: Bearer {API_KEY}' \
--data '
[
{
"name": "Aston Martin",
"id": "qFNy0_NhWdlsbYB-CGaxLp1xF"
}
]'
Response
[
{
"id": "g7k1FmV0nwFENyMz9I8VFtib",
"name": "astonMartin",
"thumbnail": "https://images.bodia.ai/aston-martin.jpg"
}
]
List Styles of a Collection
This endpoint allows you to retrieve the list of Prompt Styles of a Collection.
Request
curl -G https://api.bodia.ai/v1/prompts/collections/{COLLECTION_ID}/styles \
-H "Authorization: Bearer {API_KEY}"
Response
[
{
"id": "F0W1Ld7GRhkiLrJk_i2AUymP",
"name": "Spiderman",
"thumbnail": "https://images.bodia.ai/spiderman.jpg"
},
{
"id": "anOf6eL3TW4eG6es4aWrGPR8",
"name": "Batman",
"thumbnail": "https://images.bodia.ai/batman.jpg"
}
]
Retrieve a Style
This endpoint allows you to retrieve one Style.
Request
curl -G https://api.bodia.ai/v1/prompts/collections/{COLLECTION_ID}/styles/{STYLE_ID} \
-H "Authorization: Bearer {API_KEY}"
Response
{
"id": "F0W1Ld7GRhkiLrJk_i2AUymP",
"name": "Spiderman",
"thumbnail": "https://images.bodia.ai/spiderman.jpg"
}
Delete Style from a Collection
This endpoint allows you to delete one Styles of a specific Collection.
Request
curl -X DELETE https://api.bodia.ai/v1/prompts/collections/{TUNE_ID}/styles/{STYLE_ID} \
-H "Authorization: Bearer {API_KEY}"
Response
{
"delete": "it has been deleted successfully"
}