Skip to main content

Create a theme

Themes API leverages a LLM (Large Language Models) to generate a variety of prompts based on a theme. The theme can be a short description of a concept, a mood, or a style. The API call will create 10 prompts which will start processing and generating images.

Parameters

theme (required)

Class name of the object to be inspected in the image. Currently only man, woman are supported.

tuen_ids (requires)

A list of tune ids to be used for the theme. For each tune, 10 prompts will be generated.

prompt_attributes (optional)

num_images, w, h can be overridden

Returns

Returns empty response with status code 201. The themes are created in the background and can be pulled using GET /tunes/:id/prompts.

POST /themes


curl -X POST "https://api.astria.ai/themes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "theme[theme]=Corporate headshots" \
-F "theme[tune_ids][]=123" \
-F "theme[prompt_attributes][num_images]=123"

Response

{
"age": "20 yo",
"blurry": false,
"ethnicity": "caucasian",
"eye_color": "brown eyes",
"facial_hair": "",
"full_body_image_or_longshot": false,
"funny_face": false,
"glasses": "",
"hair_color": "brunette",
"hair_length": "medium hair",
"hair_style": "wavy hair",
"includes_multiple_people": false,
"is_bald": "",
"name": "woman",
"selfie": true,
"wearing_hat": false,
"wearing_sunglasses": false
}