# Dreamstudio

DreamStudio is Stability AI's user interface for generative AI, allowing users to create and edit generated images.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 4
- **Triggers:** 0
- **Slug:** `DREAMSTUDIO`
- **Version:** 20260316_00

## Tools

### Generate Image from Image

**Slug:** `DREAMSTUDIO_GENERATE_IMAGE_FROM_IMAGE`

Tool to generate a new image from an initial image and text prompts. Use after you have a reference image and want to transform it via text guidance.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `seed` | integer | No | Optional random seed for reproducible results |
| `steps` | integer | No | Number of diffusion steps to run |
| `width` | integer | No | [DEPRECATED - DO NOT USE] Output dimensions are determined by init_image size. This parameter is ignored by the API. |
| `height` | integer | No | [DEPRECATED - DO NOT USE] Output dimensions are determined by init_image size. This parameter is ignored by the API. |
| `samples` | integer | No | How many images to generate in one call |
| `cfg_scale` | number | No | Guidance scale (how strongly to follow the prompt, 0-35) |
| `engine_id` | string | Yes | Engine identifier for generation, e.g. 'stable-diffusion-v1-5' Validate via DREAMSTUDIO_LIST_ENGINES before calling; unsupported values cause failures. |
| `init_image` | string | Yes | Binary content of the input image to guide generation |
| `text_prompts` | array | Yes | List of prompt objects each with text and optional weight |
| `image_strength` | number | No | Controls how much the original image is preserved (0-1). Required when init_image_mode='IMAGE_STRENGTH'. |
| `init_image_mode` | string ("IMAGE_STRENGTH" | "STEP_SCHEDULE") | Yes | Guidance mode for how the init_image influences the result. 'IMAGE_STRENGTH' uses image_strength, 'STEP_SCHEDULE' uses step_schedule_start/end. |
| `step_schedule_end` | number | No | Optional end fraction for image influence in the schedule (0-1). Defaults to 1.0 if omitted. |
| `step_schedule_start` | number | No | Fraction at which to start image influence in the sampling schedule (0-1). Required when init_image_mode='STEP_SCHEDULE'. |
| `clip_guidance_preset` | string ("NONE" | "FAST_BLUE" | "FAST_GREEN" | "SIMPLE" | "DETAILED" | "FAST_RED") | No | Preset mode for CLIP guidance; choose one for tuned performance |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Image from Text

**Slug:** `DREAMSTUDIO_GENERATE_IMAGE_FROM_TEXT`

Generate images from text prompts using Stability AI's text-to-image models. Use when you need to create images from textual descriptions without a reference image. Supports multiple prompts with weights, configurable dimensions, and various generation parameters.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `seed` | integer | No | Random seed for reproducible generation. Use the same seed with same parameters to get identical results. If omitted, a random seed is used. |
| `steps` | integer | No | Number of diffusion steps. More steps generally improve quality but take longer. Typical range: 30-50. If omitted, engine's default is used. |
| `width` | integer | No | Width of generated image in pixels. Must be a multiple of 64. Constraints: For 768 engines: 589,824 ≤ height*width ≤ 1,048,576. For other engines: 262,144 ≤ height*width ≤ 1,048,576. If omitted, engine's default width is used. |
| `height` | integer | No | Height of generated image in pixels. Must be a multiple of 64. Constraints: For 768 engines: 589,824 ≤ height*width ≤ 1,048,576. For other engines: 262,144 ≤ height*width ≤ 1,048,576. If omitted, engine's default height is used. |
| `sampler` | string ("DDIM" | "DDPM" | "K_DPMPP_2M" | "K_DPMPP_2S_ANCESTRAL" | "K_DPM_2" | "K_DPM_2_ANCESTRAL" | "K_EULER" | "K_EULER_ANCESTRAL" | "K_HEUN" | "K_LMS") | No | Available sampler algorithms for image generation. |
| `samples` | integer | No | Number of images to generate in a single request. Default is 1. Higher values consume more API credits. |
| `cfg_scale` | number | No | Classifier-Free Guidance scale - how strictly to follow the text prompt. Higher values (7-15) follow prompt more closely, lower values (1-7) allow more creative freedom. If omitted, engine's default is used. |
| `engine_id` | string | Yes | Engine identifier for generation (e.g., 'stable-diffusion-v1-5', 'stable-diffusion-xl-1024-v1-0'). Use DREAMSTUDIO_LIST_ENGINES to get available engines. Using invalid engine_id will cause the request to fail. |
| `organization` | string | No | Organization ID to scope the request to. If not provided, uses the user's default organization from their account. |
| `text_prompts` | array | Yes | List of text prompts with optional weights. At least one prompt is required. |
| `clip_guidance_preset` | string ("NONE" | "FAST_BLUE" | "FAST_GREEN" | "SIMPLE" | "SLOW" | "SLOWER" | "SLOWEST") | No | CLIP guidance presets for text-to-image generation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Engines

**Slug:** `DREAMSTUDIO_LIST_ENGINES`

List all available DreamStudio/Stability AI engines accessible with your API key. This action retrieves all AI models (engines) you can use for image generation and other tasks. Common engines include Stable Diffusion XL and various Stable Diffusion versions. Use this action to: - Discover which engines are available to your account - Get engine IDs needed for image generation requests - Check engine types and capabilities No parameters required - simply call to get the complete list of accessible engines. Using an unsupported engine_id in generation requests will cause failures; engines also vary in supported image sizes (typically capped near 1024x1024) and quality for specific tasks.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### User Account

**Slug:** `DREAMSTUDIO_USER_ACCOUNT`

Retrieves authenticated user's account information from Stability AI. Returns user ID, email, organization memberships, and profile picture. No parameters required - uses authenticated session.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### DreamStudio User Balance

**Slug:** `DREAMSTUDIO_USER_BALANCE`

Retrieves the user's current credit balance from their DreamStudio account. Use this tool to check how many credits are available before generating images or to monitor remaining credits after API operations. Credits are consumed when generating images through the Stability AI API. For large or high-resolution batch generation, verify sufficient balance first — insufficient credits will cause failures mid-run.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
