# Stability AI

> Generate, upscale, edit and restyle images, generate and transform music, and build 3D models with Stability AI's Stable Image, Stable Diffusion 3.5, Stable Audio and Stable 3D models.

App · Images & Design · 19 actions. Web page: https://docs.lodol.com/docs/integrations/stability-ai

## Actions

### Erase object

Remove unwanted things from an image, such as a blemish or a stray object, and fill the space with what surrounds them. A mask marks what to erase. Costs 5 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to erase from: upload one, paste a public URL, or pick a file an earlier step saved.
- Mask (`mask`, text): Optional. A black and white image the same shape as the image: white marks what to change, black what to keep, and grey changes it partly. Leave empty to use the image's own transparent areas as the mask. To give one, upload one, paste a public URL, or pick a file an earlier step saved.
- Grow mask (pixels) (`grow_mask`, number): Optional. Widens the edited area by this many pixels and blurs its edge, which hides seams around the change. Stability AI's default is a few pixels. From 0 to 20.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this edit
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_6f7890123456789a6f7890123456789a",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_6f7890123456789a6f7890123456789a",
      "filename": "stability-ai-erased.png",
      "size_bytes": 1032192,
      "url": "/actions/core/serve-document/doc_6f7890123456789a6f7890123456789a?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-erased.png",
  "seed": 112233445,
  "size_bytes": 1032192,
  "url": "/actions/core/serve-document/doc_6f7890123456789a6f7890123456789a?teamId=6512a1b2c3d4e5f600000001"
}
```

### Generate 3D model

Build a textured 3D model of the object in a single image, as a GLB file that 3D viewers, game engines and tools such as Blender open. The model is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): A picture of one object, ideally on a plain background: upload one, paste a public URL, or pick a file an earlier step saved. Up to 4 megapixels.
- Model (`model`, text): Which 3D model builds it. One of: `stable-fast-3d` (Stable Fast 3D (10 credits)), `stable-point-aware-3d` (Stable Point Aware 3D, better hidden sides, in preview (4 credits)). Default: `stable-fast-3d`.
- Texture resolution (`texture_resolution`, text): Optional. Detail of the model's textures. Higher looks sharper and makes a larger file; Stability AI's default is 1024. One of: `512` (512 pixels), `1024` (1024 pixels), `2048` (2048 pixels).
- Foreground ratio (`foreground_ratio`, number): Optional. How much of the frame the object fills, which sets the padding around it. Lower it if a long object comes out squashed: 0.1 to 1 for Stable Fast 3D (default 0.85), 1 to 2 for SPAR3D (default 1.3). From 0.1 to 2.
- Remesh (`remesh`, text): Optional. Rebuild the mesh from triangles or quads. Quads suit editing in Blender or Maya. One of: `none`, `triangle` (Triangles), `quad` (Quads, for Blender or Maya).
- Vertex count (`vertex_count`, number): Optional. Simplify the mesh to about this many vertices, from 100 to 20,000. Leave empty for no limit. From 100 to 20000.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. Only when Model is Stable Point Aware 3D, better hidden sides, in preview (4 credits). From 0 to 4294967294.

**Outputs**

- `content_type` (text): MIME type of the saved 3D model
- `document_ref` (text): Reference to the saved 3D model, for use by a later step
- `documents` (list): The saved 3D model, in the shape steps that send or upload files expect
- `filename` (text): Name the 3D model was saved under
- `model` (text): Model that built it
- `size_bytes` (number): Size of the 3D model in bytes
- `url` (text): Download URL for the saved 3D model

**Example output**

```json
{
  "content_type": "model/gltf-binary",
  "document_ref": "doc_789abcdef0123456789abcdef0123456",
  "documents": [
    {
      "content_type": "model/gltf-binary",
      "document_ref": "doc_789abcdef0123456789abcdef0123456",
      "filename": "stability-ai-model.glb",
      "size_bytes": 3145728,
      "url": "/actions/core/serve-document/doc_789abcdef0123456789abcdef0123456?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-model.glb",
  "model": "stable-fast-3d",
  "size_bytes": 3145728,
  "url": "/actions/core/serve-document/doc_789abcdef0123456789abcdef0123456?teamId=6512a1b2c3d4e5f600000001"
}
```

### Generate audio

Generate music or a sound effect from a text prompt with Stable Audio: up to three minutes of 44.1 kHz stereo, or six with Stable Audio 3.0. The audio is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Prompt (`prompt`, text, required): What the audio should sound like. Naming instruments, genre, tempo, and mood gives the best results, for example 'warm lo-fi hip hop with a soft rhodes piano and vinyl crackle'.
- Duration (seconds) (`duration`, number): How long the generated audio should be: up to 190 seconds, or 380 with Stable Audio 3.0. From 1 to 380. Default: `60`.
- Model (`model`, text): Which Stable Audio model generates the audio. 3.0 makes longer, more structured tracks and takes a little longer to finish. One of: `stable-audio-2.5` (Stable Audio 2.5, fast, up to 3 minutes (8 credits)), `stable-audio-3` (Stable Audio 3.0, newest, up to 6 minutes (8 credits)), `stable-audio-2` (Stable Audio 2.0, up to 3 minutes (20 credits)). Default: `stable-audio-2.5`.
- Output format (`output_format`, text): File format of the generated audio. One of: `mp3`, `wav`. Default: `mp3`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.
- Prompt adherence (`cfg_scale`, number): Optional. How strictly the audio follows the prompt, from 1 to 25. Stability AI's default is 7 for Stable Audio 2.0 and 1 for the newer models. From 1 to 25.

**Outputs**

- `content_type` (text): MIME type of the saved audio
- `document_ref` (text): Reference to the saved audio, for use by a later step
- `documents` (list): The saved audio, in the shape steps that send or upload files expect
- `duration` (number): Length of the generated audio in seconds
- `filename` (text): Name the audio was saved under
- `generation_id` (text): Reference of the Stability AI job, set for Stable Audio 3.0. 'Get generation result' can fetch the file again with it for 24 hours
- `model` (text): Model that generated the audio
- `seed` (number): Seed Stability AI used, for reproducing this audio
- `size_bytes` (number): Size of the audio in bytes
- `url` (text): Download URL for the saved audio

**Example output**

```json
{
  "content_type": "audio/mpeg",
  "document_ref": "doc_4d5e6f78901234564d5e6f7890123456",
  "documents": [
    {
      "content_type": "audio/mpeg",
      "document_ref": "doc_4d5e6f78901234564d5e6f7890123456",
      "filename": "stability-ai-audio.mp3",
      "size_bytes": 983040,
      "url": "/actions/core/serve-document/doc_4d5e6f78901234564d5e6f7890123456?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "duration": 60,
  "filename": "stability-ai-audio.mp3",
  "generation_id": null,
  "model": "stable-audio-2.5",
  "seed": 246813579,
  "size_bytes": 983040,
  "url": "/actions/core/serve-document/doc_4d5e6f78901234564d5e6f7890123456?teamId=6512a1b2c3d4e5f600000001"
}
```

### Generate image

Generate an image from a text prompt with Stable Image or Stable Diffusion 3.5, optionally starting from an image of your own. The image is saved to your workspace's file storage; the action returns a document reference and a download URL so a later step can send, upload, or edit it.

**Inputs**

- Prompt (`prompt`, text, required): What you want to see in the image. A descriptive prompt that names the subject, colors, and setting gives the best results.
- Model (`model`, text): Which model generates the image. Core is the fast, affordable default; Ultra produces the highest quality. One of: `core` (Stable Image Core, fast and affordable (3 credits)), `ultra` (Stable Image Ultra, highest quality (8 credits)), `sd3.5-large` (Stable Diffusion 3.5 Large (6.5 credits)), `sd3.5-large-turbo` (Stable Diffusion 3.5 Large Turbo (4 credits)), `sd3.5-medium` (Stable Diffusion 3.5 Medium (3.5 credits)), `sd3.5-flash` (Stable Diffusion 3.5 Flash, fastest (2.5 credits)). Default: `core`.
- Aspect ratio (`aspect_ratio`, text): Shape of the generated image. One of: `1:1` (1:1 (square)), `16:9` (16:9 (widescreen)), `9:16` (9:16 (portrait)), `3:2` (3:2 (landscape)), `2:3` (2:3 (portrait)), `5:4` (5:4 (landscape)), `4:5` (4:5 (portrait)), `21:9` (21:9 (ultrawide)), `9:21` (9:21 (tall)). Default: `1:1`.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the generated image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.
- Starting image (`image`, text): Optional. An image to start from instead of a blank canvas: upload one, paste a public URL, or pick a file an earlier step saved. Stable Diffusion 3.5 then takes its shape from this image rather than the aspect ratio. Only when Model is Stable Image Ultra, highest quality (8 credits), Stable Diffusion 3.5 Large (6.5 credits), Stable Diffusion 3.5 Large Turbo (4 credits), Stable Diffusion 3.5 Medium (3.5 credits) or Stable Diffusion 3.5 Flash, fastest (2.5 credits).
- Strength (`strength`, number): Required with a starting image. How far to move away from it, from 0 (keep it as it is) to 1 (ignore it). Only when Model is Stable Image Ultra, highest quality (8 credits), Stable Diffusion 3.5 Large (6.5 credits), Stable Diffusion 3.5 Large Turbo (4 credits), Stable Diffusion 3.5 Medium (3.5 credits) or Stable Diffusion 3.5 Flash, fastest (2.5 credits). From 0 to 1.
- Prompt adherence (`cfg_scale`, number): Optional. How strictly the image follows the prompt, from 1 to 10. Stability AI's default is 4, or 1 for Large Turbo and Flash. Only when Model is Stable Diffusion 3.5 Large (6.5 credits), Stable Diffusion 3.5 Large Turbo (4 credits), Stable Diffusion 3.5 Medium (3.5 credits) or Stable Diffusion 3.5 Flash, fastest (2.5 credits). From 1 to 10.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `model` (text): Model that generated the image
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_9f8e7d6c5b4a32109f8e7d6c5b4a3210",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_9f8e7d6c5b4a32109f8e7d6c5b4a3210",
      "filename": "stability-ai-image.png",
      "size_bytes": 1348592,
      "url": "/actions/core/serve-document/doc_9f8e7d6c5b4a32109f8e7d6c5b4a3210?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-image.png",
  "model": "core",
  "seed": 1234567890,
  "size_bytes": 1348592,
  "url": "/actions/core/serve-document/doc_9f8e7d6c5b4a32109f8e7d6c5b4a3210?teamId=6512a1b2c3d4e5f600000001"
}
```

### Generate image in a style

Generate a new image from a prompt in the style of a reference image, so a series of pictures can share one look. Costs 5 credits. The image is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Style reference (`image`, text, required): The image whose style to borrow: upload one, paste a public URL, or pick a file an earlier step saved.
- Prompt (`prompt`, text, required): What the new image should show.
- Style fidelity (`fidelity`, number): Optional. How closely to match the reference's style, from 0 to 1. Stability AI's default is 0.5. From 0 to 1.
- Aspect ratio (`aspect_ratio`, text): Shape of the generated image. One of: `1:1` (1:1 (square)), `16:9` (16:9 (widescreen)), `9:16` (9:16 (portrait)), `3:2` (3:2 (landscape)), `2:3` (2:3 (portrait)), `5:4` (5:4 (landscape)), `4:5` (4:5 (portrait)), `21:9` (21:9 (ultrawide)), `9:21` (9:21 (tall)). Default: `1:1`.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_23456789abcdef0123456789abcdef01",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_23456789abcdef0123456789abcdef01",
      "filename": "stability-ai-styled.png",
      "size_bytes": 1310720,
      "url": "/actions/core/serve-document/doc_23456789abcdef0123456789abcdef01?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-styled.png",
  "seed": 141421356,
  "size_bytes": 1310720,
  "url": "/actions/core/serve-document/doc_23456789abcdef0123456789abcdef01?teamId=6512a1b2c3d4e5f600000001"
}
```

### Get credit balance

Get how many credits are left on the Stability AI account or organization the API key belongs to, for example to warn someone before the balance runs out. Costs nothing.

**Inputs**: None.

**Outputs**

- `credits` (number): Credits left. One credit is worth one US cent

**Example output**

```json
{
  "credits": 1250.5
}
```

### Get generation result

Collect a creative upscale, background replacement or Stable Audio 3.0 track that was still being made when its step stopped waiting, using the reference that step gave. Stability AI keeps a result for 24 hours. The file is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Generation reference (`generation_id`, text, required): The reference the earlier step's error gave, such as audio:followed-by-64-characters. A bare 64-character generation id works too.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved file
- `document_ref` (text): Reference to the saved file, for use by a later step
- `documents` (list): The saved file, in the shape steps that send or upload files expect
- `filename` (text): Name the file was saved under
- `generation_id` (text): Reference of the generation that was collected
- `seed` (number): Seed Stability AI used, for reproducing this result
- `size_bytes` (number): Size of the file in bytes
- `url` (text): Download URL for the saved file

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "audio/mpeg",
  "document_ref": "doc_89abcdef0123456789abcdef01234567",
  "documents": [
    {
      "content_type": "audio/mpeg",
      "document_ref": "doc_89abcdef0123456789abcdef01234567",
      "filename": "stability-ai-result.mp3",
      "size_bytes": 3932160,
      "url": "/actions/core/serve-document/doc_89abcdef0123456789abcdef01234567?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-result.mp3",
  "generation_id": "audio:a6dc6c6e20acda010fe14d71f180658f2896ed9b4ec25aa99a6ff06c796987c4",
  "seed": 918273645,
  "size_bytes": 3932160,
  "url": "/actions/core/serve-document/doc_89abcdef0123456789abcdef01234567?teamId=6512a1b2c3d4e5f600000001"
}
```

### Inpaint audio

Regenerate one stretch of an audio clip from a text prompt and keep the rest, for example to replace a bridge or extend an ending. The audio is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Audio (`audio`, text, required): The MP3 or WAV clip to start from, between 6 seconds and 3 minutes long (6 minutes for Stable Audio 3.0): upload one, paste a public URL, or pick a file an earlier step saved. Copyrighted recordings are not allowed.
- Prompt (`prompt`, text, required): What the regenerated stretch should sound like.
- Model (`model`, text): Which Stable Audio model does the inpainting. One of: `stable-audio-2.5` (Stable Audio 2.5, fast, up to 3 minutes (8 credits)), `stable-audio-3` (Stable Audio 3.0, newest, up to 6 minutes (8 credits)). Default: `stable-audio-2.5`.
- From (seconds) (`mask_start`, number): Optional. Where the stretch to regenerate starts. Stability AI's default is 30 seconds in. From 0 to 380.
- To (seconds) (`mask_end`, number): Optional. Where it ends. Stability AI's default is the end of the result. From 0 to 380.
- Duration (seconds) (`duration`, number): Optional. Length of the result in seconds, up to 190 (380 for Stable Audio 3.0). Set it to the clip's own length to keep it; left empty, Stability AI makes the longest the model can. From 1 to 380.
- Output format (`output_format`, text): File format of the resulting audio. One of: `mp3`, `wav`. Default: `mp3`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_type` (text): MIME type of the saved audio
- `document_ref` (text): Reference to the saved audio, for use by a later step
- `documents` (list): The saved audio, in the shape steps that send or upload files expect
- `filename` (text): Name the audio was saved under
- `generation_id` (text): Reference of the Stability AI job, set for Stable Audio 3.0. 'Get generation result' can fetch the file again with it for 24 hours
- `model` (text): Model that made the result
- `seed` (number): Seed Stability AI used, for reproducing this audio
- `size_bytes` (number): Size of the audio in bytes
- `url` (text): Download URL for the saved audio

**Example output**

```json
{
  "content_type": "audio/mpeg",
  "document_ref": "doc_6789abcdef0123456789abcdef012345",
  "documents": [
    {
      "content_type": "audio/mpeg",
      "document_ref": "doc_6789abcdef0123456789abcdef012345",
      "filename": "stability-ai-inpainted-audio.mp3",
      "size_bytes": 1835008,
      "url": "/actions/core/serve-document/doc_6789abcdef0123456789abcdef012345?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-inpainted-audio.mp3",
  "generation_id": null,
  "model": "stable-audio-2.5",
  "seed": 564738291,
  "size_bytes": 1835008,
  "url": "/actions/core/serve-document/doc_6789abcdef0123456789abcdef012345?teamId=6512a1b2c3d4e5f600000001"
}
```

### Inpaint image

Repaint part of an image with something new that you describe, blending it into the rest. A mask marks the part to repaint. Costs 5 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to repaint part of: upload one, paste a public URL, or pick a file an earlier step saved.
- Prompt (`prompt`, text, required): What to paint into the masked area.
- Mask (`mask`, text): Optional. A black and white image the same shape as the image: white marks what to change, black what to keep, and grey changes it partly. Leave empty to use the image's own transparent areas as the mask. To give one, upload one, paste a public URL, or pick a file an earlier step saved.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Grow mask (pixels) (`grow_mask`, number): Optional. Widens the repainted area by up to 100 pixels and blurs its edge, which hides seams around the change. Stability AI's default is 5. From 0 to 100.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this edit
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_7890123456789abc7890123456789abc",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_7890123456789abc7890123456789abc",
      "filename": "stability-ai-inpainted.png",
      "size_bytes": 1179648,
      "url": "/actions/core/serve-document/doc_7890123456789abc7890123456789abc?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-inpainted.png",
  "seed": 556677889,
  "size_bytes": 1179648,
  "url": "/actions/core/serve-document/doc_7890123456789abc7890123456789abc?teamId=6512a1b2c3d4e5f600000001"
}
```

### Outpaint image

Extend an image past its edges, filling the new space so it looks as if it was always there, for example to widen a portrait photo into a banner. Costs 4 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to extend: upload one, paste a public URL, or pick a file an earlier step saved.
- Extend left (pixels) (`left`, number): How many pixels to add on the left, up to 2,000. Give at least one direction; no more than the image's own size looks best. From 0 to 2000.
- Extend right (pixels) (`right`, number): How many pixels to add on the right, up to 2,000. From 0 to 2000.
- Extend up (pixels) (`up`, number): How many pixels to add at the top, up to 2,000. From 0 to 2000.
- Extend down (pixels) (`down`, number): How many pixels to add at the bottom, up to 2,000. From 0 to 2000.
- Prompt (`prompt`, text): Optional. What the new space should show. Left empty, it continues what is already there.
- Creativity (`creativity`, number): Optional. How freely to invent the new space, from 0 to 1. Stability AI's default is 0.5. From 0 to 1.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this edit
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_890123456789abcd890123456789abcd",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_890123456789abcd890123456789abcd",
      "filename": "stability-ai-outpainted.png",
      "size_bytes": 1572864,
      "url": "/actions/core/serve-document/doc_890123456789abcd890123456789abcd?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-outpainted.png",
  "seed": 998877665,
  "size_bytes": 1572864,
  "url": "/actions/core/serve-document/doc_890123456789abcd890123456789abcd?teamId=6512a1b2c3d4e5f600000001"
}
```

### Remove background

Cut the subject out of an image and drop the background, leaving it transparent. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image whose background you want removed: upload one, paste a public URL, or pick a file an earlier step saved. Up to 4 megapixels.
- Output format (`output_format`, text): File format of the result. JPEG is not offered because it cannot store a transparent background. One of: `png`, `webp`. Default: `png`.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_2b3c4d5e6f7890122b3c4d5e6f789012",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_2b3c4d5e6f7890122b3c4d5e6f789012",
      "filename": "stability-ai-no-background.png",
      "size_bytes": 842103,
      "url": "/actions/core/serve-document/doc_2b3c4d5e6f7890122b3c4d5e6f789012?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-no-background.png",
  "size_bytes": 842103,
  "url": "/actions/core/serve-document/doc_2b3c4d5e6f7890122b3c4d5e6f789012?teamId=6512a1b2c3d4e5f600000001"
}
```

### Replace background and relight

Put the subject of an image on a new background, described in words or taken from a reference image, and relight the subject to match it, for product shots or portraits. Costs 8 credits and usually takes under a minute. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Subject image (`image`, text, required): The image whose subject to keep: upload one, paste a public URL, or pick a file an earlier step saved.
- New background (`background_prompt`, text): What the new background should show, for example 'a sunlit marble kitchen counter'. Give this, a background reference image, or both.
- Background reference image (`background_reference`, text): Optional. An image whose look the new background should borrow: upload one, paste a public URL, or pick a file an earlier step saved.
- Subject description (`foreground_prompt`, text): Optional. A short description of the subject, which stops the background's colors bleeding into it.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Keep original background (`keep_original_background`, true/false): Optional. Keep the background and only relight the image. Default: `false`.
- Light direction (`light_source_direction`, text): Optional. Where the new light comes from. One of: `left` (From the left), `right` (From the right), `above` (From above), `below` (From below).
- Light reference image (`light_reference`, text): Optional. An image whose lighting to copy: its lighter areas become the brighter ones. To give one, upload one, paste a public URL, or pick a file an earlier step saved.
- Light strength (`light_source_strength`, number): Optional. How bright the new light is, from 0 to 1. Needs a light direction or reference image; Stability AI's default is 0.3. From 0 to 1.
- Preserve subject (`preserve_original_subject`, number): Optional. How exactly to keep the subject's pixels, from 0 (relit freely) to 1 (untouched). Stability AI's default is 0.6. From 0 to 1.
- Match original depth (`original_background_depth`, number): Optional. How closely the new background keeps the original's depth, from 0 to 1. Stability AI's default is 0.5. From 0 to 1.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `generation_id` (text): Reference of the Stability AI job, set always. 'Get generation result' can fetch the file again with it for 24 hours
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_90123456789abcde90123456789abcde",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_90123456789abcde90123456789abcde",
      "filename": "stability-ai-relit.png",
      "size_bytes": 2097152,
      "url": "/actions/core/serve-document/doc_90123456789abcde90123456789abcde?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-relit.png",
  "generation_id": "image:5f0e1d2c3b4a59687f0e1d2c3b4a59687f0e1d2c3b4a59687f0e1d2c3b4a5968",
  "seed": 314159265,
  "size_bytes": 2097152,
  "url": "/actions/core/serve-document/doc_90123456789abcde90123456789abcde?teamId=6512a1b2c3d4e5f600000001"
}
```

### Search and recolor in image

Change the color of one thing in an image by describing it, with no mask to draw: name what to find, then the colors it should take. Costs 5 credits. The edited image is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to edit: upload one, paste a public URL, or pick a file an earlier step saved.
- What to recolor (`select_prompt`, text, required): Short description of the thing to find in the image, for example 'car'.
- New colors (`prompt`, text, required): How it should look afterwards, for example 'a glossy red sports car'.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Grow mask (pixels) (`grow_mask`, number): Optional. Widens the edited area by this many pixels and blurs its edge, which hides seams around the change. Stability AI's default is a few pixels. From 0 to 20.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this edit
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_5e6f7890123456785e6f789012345678",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_5e6f7890123456785e6f789012345678",
      "filename": "stability-ai-recolored.png",
      "size_bytes": 1206272,
      "url": "/actions/core/serve-document/doc_5e6f7890123456785e6f789012345678?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-recolored.png",
  "seed": 135792468,
  "size_bytes": 1206272,
  "url": "/actions/core/serve-document/doc_5e6f7890123456785e6f789012345678?teamId=6512a1b2c3d4e5f600000001"
}
```

### Search and replace in image

Swap one thing in an image for another by describing both, with no mask to draw: name what to find, then what to put in its place. The edited image is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to edit: upload one, paste a public URL, or pick a file an earlier step saved.
- What to replace (`search_prompt`, text, required): Short description of the thing to find in the image, for example 'dog'.
- Replace it with (`prompt`, text, required): What should appear in its place, for example 'a golden retriever'.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the edited image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.
- Grow mask (pixels) (`grow_mask`, number): Optional. Widens the edited area by this many pixels and blurs its edge, which hides seams around the change. Stability AI's default is a few pixels. From 0 to 20.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this edit
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_3c4d5e6f789012343c4d5e6f78901234",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_3c4d5e6f789012343c4d5e6f78901234",
      "filename": "stability-ai-edited.png",
      "size_bytes": 1105920,
      "url": "/actions/core/serve-document/doc_3c4d5e6f789012343c4d5e6f78901234?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-edited.png",
  "seed": 987654321,
  "size_bytes": 1105920,
  "url": "/actions/core/serve-document/doc_3c4d5e6f789012343c4d5e6f78901234?teamId=6512a1b2c3d4e5f600000001"
}
```

### Sketch to image

Turn a rough sketch into a finished picture that follows its lines, or redraw any image along its outlines. Costs 5 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Sketch (`image`, text, required): The sketch or image to follow: upload one, paste a public URL, or pick a file an earlier step saved.
- Prompt (`prompt`, text, required): What the finished picture should show.
- Control strength (`control_strength`, number): Optional. How closely the result follows the image, from 0 (loosely) to 1 (exactly). Stability AI's default is 0.7. From 0 to 1.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_0123456789abcdef0123456789abcdef",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_0123456789abcdef0123456789abcdef",
      "filename": "stability-ai-sketch.png",
      "size_bytes": 1245184,
      "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-sketch.png",
  "seed": 271828182,
  "size_bytes": 1245184,
  "url": "/actions/core/serve-document/doc_0123456789abcdef0123456789abcdef?teamId=6512a1b2c3d4e5f600000001"
}
```

### Structure to image

Generate a new picture that keeps the layout and shapes of an image, for example to restage a scene or render a character from a model. Costs 5 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image whose structure to keep: upload one, paste a public URL, or pick a file an earlier step saved.
- Prompt (`prompt`, text, required): What the new picture should show.
- Control strength (`control_strength`, number): Optional. How closely the result follows the image, from 0 (loosely) to 1 (exactly). Stability AI's default is 0.7. From 0 to 1.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_123456789abcdef0123456789abcdef0",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_123456789abcdef0123456789abcdef0",
      "filename": "stability-ai-structure.png",
      "size_bytes": 1277952,
      "url": "/actions/core/serve-document/doc_123456789abcdef0123456789abcdef0?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-structure.png",
  "seed": 161803398,
  "size_bytes": 1277952,
  "url": "/actions/core/serve-document/doc_123456789abcdef0123456789abcdef0?teamId=6512a1b2c3d4e5f600000001"
}
```

### Transfer style to image

Restyle an image after a second one, keeping what it shows and how it is composed while taking on the other's look. Costs 8 credits. The result is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image to restyle (`image`, text, required): The image whose content to keep: upload one, paste a public URL, or pick a file an earlier step saved.
- Style image (`style_image`, text, required): The image whose style to apply: upload one, paste a public URL, or pick a file an earlier step saved.
- Prompt (`prompt`, text): Optional. Anything else the result should show.
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image.
- Style strength (`style_strength`, number): Optional. How strongly to apply the style, from 0 to 1. Stability AI's default is 1. From 0 to 1.
- Composition fidelity (`composition_fidelity`, number): Optional. How closely to keep the original layout, from 0 to 1. Stability AI's default is 0.9. From 0 to 1.
- Change strength (`change_strength`, number): Optional. How much the original may change, from 0.1 to 1. Stability AI's default is 0.9. From 0.1 to 1.
- Output format (`output_format`, text): File format of the resulting image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `seed` (number): Seed Stability AI used, for reproducing this image
- `size_bytes` (number): Size of the image in bytes
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_3456789abcdef0123456789abcdef012",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_3456789abcdef0123456789abcdef012",
      "filename": "stability-ai-style-transfer.png",
      "size_bytes": 1343488,
      "url": "/actions/core/serve-document/doc_3456789abcdef0123456789abcdef012?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-style-transfer.png",
  "seed": 173205080,
  "size_bytes": 1343488,
  "url": "/actions/core/serve-document/doc_3456789abcdef0123456789abcdef012?teamId=6512a1b2c3d4e5f600000001"
}
```

### Transform audio

Turn an audio clip into something new, steered by a text prompt: rework a demo in another genre, or swap one instrument for another. The audio is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Audio (`audio`, text, required): The MP3 or WAV clip to start from, between 6 seconds and 3 minutes long (6 minutes for Stable Audio 3.0): upload one, paste a public URL, or pick a file an earlier step saved. Copyrighted recordings are not allowed.
- Prompt (`prompt`, text, required): What the result should sound like, for example 'the same melody played by a string quartet'.
- Model (`model`, text): Which Stable Audio model transforms the audio. One of: `stable-audio-2.5` (Stable Audio 2.5, fast, up to 3 minutes (8 credits)), `stable-audio-3` (Stable Audio 3.0, newest, up to 6 minutes (8 credits)), `stable-audio-2` (Stable Audio 2.0, up to 3 minutes (20 credits)). Default: `stable-audio-2.5`.
- Strength (`strength`, number): Optional. How far to move away from the clip, from 0 (keep it) to 1 (ignore it). Stability AI's default is 1. From 0 to 1.
- Duration (seconds) (`duration`, number): Optional. Length of the result in seconds, up to 190 (380 for Stable Audio 3.0). Set it to the clip's own length to keep it; left empty, Stability AI makes the longest the model can. From 1 to 380.
- Output format (`output_format`, text): File format of the resulting audio. One of: `mp3`, `wav`. Default: `mp3`.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. From 0 to 4294967294.
- Prompt adherence (`cfg_scale`, number): Optional. How strictly the audio follows the prompt, from 1 to 25. Stability AI's default is 7 for Stable Audio 2.0 and 1 for the newer models. From 1 to 25.

**Outputs**

- `content_type` (text): MIME type of the saved audio
- `document_ref` (text): Reference to the saved audio, for use by a later step
- `documents` (list): The saved audio, in the shape steps that send or upload files expect
- `filename` (text): Name the audio was saved under
- `generation_id` (text): Reference of the Stability AI job, set for Stable Audio 3.0. 'Get generation result' can fetch the file again with it for 24 hours
- `model` (text): Model that made the result
- `seed` (number): Seed Stability AI used, for reproducing this audio
- `size_bytes` (number): Size of the audio in bytes
- `url` (text): Download URL for the saved audio

**Example output**

```json
{
  "content_type": "audio/mpeg",
  "document_ref": "doc_56789abcdef0123456789abcdef01234",
  "documents": [
    {
      "content_type": "audio/mpeg",
      "document_ref": "doc_56789abcdef0123456789abcdef01234",
      "filename": "stability-ai-transformed-audio.mp3",
      "size_bytes": 1966080,
      "url": "/actions/core/serve-document/doc_56789abcdef0123456789abcdef01234?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-transformed-audio.mp3",
  "generation_id": null,
  "model": "stable-audio-2.5",
  "seed": 192837465,
  "size_bytes": 1966080,
  "url": "/actions/core/serve-document/doc_56789abcdef0123456789abcdef01234?teamId=6512a1b2c3d4e5f600000001"
}
```

### Upscale image

Enlarge an image. Fast makes it four times larger in about a second; Conservative and Creative take it to about 4K, Creative by reimagining detail a degraded image has lost. The upscaled image is saved to your workspace's file storage and returned as a download URL.

**Inputs**

- Image (`image`, text, required): The image to upscale: upload one, paste a public URL, or pick a file an earlier step saved. Fast takes up to 1,536 pixels a side and 1 megapixel; Conservative up to 9 megapixels; Creative up to 1 megapixel.
- Output format (`output_format`, text): File format of the upscaled image. One of: `png`, `jpeg`, `webp`. Default: `png`.
- Upscaler (`upscaler`, text): Which upscaler to use. One of: `fast` (Fast, four times larger in about a second (2 credits)), `conservative` (Conservative, up to 4K keeping the image as it is (40 credits)), `creative` (Creative, up to 4K reimagining a degraded image (60 credits)). Default: `fast`.
- Prompt (`prompt`, text): Required for Conservative and Creative. Describe what the image shows, to guide the detail they add. Only when Upscaler is Conservative, up to 4K keeping the image as it is (40 credits) or Creative, up to 4K reimagining a degraded image (60 credits).
- Negative prompt (`negative_prompt`, text): Optional. What you do not want to see in the image. Only when Upscaler is Conservative, up to 4K keeping the image as it is (40 credits) or Creative, up to 4K reimagining a degraded image (60 credits).
- Creativity (`creativity`, number): Optional. How much new detail to invent: 0.2 to 0.5 for Conservative (default 0.35), 0.1 to 0.5 for Creative (default 0.3). Only when Upscaler is Conservative, up to 4K keeping the image as it is (40 credits) or Creative, up to 4K reimagining a degraded image (60 credits). From 0.1 to 0.5.
- Style (`style_preset`, text): Optional. Guides the result towards a particular style. Only when Upscaler is Creative, up to 4K reimagining a degraded image (60 credits). One of: `3d-model` (3D Model), `analog-film` (Analog Film), `anime`, `cinematic`, `comic-book` (Comic Book), `digital-art` (Digital Art), `enhance`, `fantasy-art` (Fantasy Art), `isometric`, `line-art` (Line Art), and 7 more.
- Seed (`seed`, number): Optional. Reuse the seed of an earlier result to regenerate it. Leave empty for a random seed. Only when Upscaler is Conservative, up to 4K keeping the image as it is (40 credits) or Creative, up to 4K reimagining a degraded image (60 credits). From 0 to 4294967294.

**Outputs**

- `content_filtered` (true/false): True when Stability AI's content filter blurred the result. The blurred file is still saved, so check this before sending it on
- `content_type` (text): MIME type of the saved image
- `document_ref` (text): Reference to the saved image, for use by a later step
- `documents` (list): The saved image, in the shape steps that send or upload files expect
- `filename` (text): Name the image was saved under
- `generation_id` (text): Reference of the Stability AI job, set for the creative upscaler. 'Get generation result' can fetch the file again with it for 24 hours
- `seed` (number): Seed Stability AI used, for reproducing this upscale
- `size_bytes` (number): Size of the image in bytes
- `upscaler` (text): Upscaler that was used
- `url` (text): Download URL for the saved image

**Example output**

```json
{
  "content_filtered": false,
  "content_type": "image/png",
  "document_ref": "doc_1a2b3c4d5e6f78901a2b3c4d5e6f7890",
  "documents": [
    {
      "content_type": "image/png",
      "document_ref": "doc_1a2b3c4d5e6f78901a2b3c4d5e6f7890",
      "filename": "stability-ai-upscaled.png",
      "size_bytes": 5242880,
      "url": "/actions/core/serve-document/doc_1a2b3c4d5e6f78901a2b3c4d5e6f7890?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "filename": "stability-ai-upscaled.png",
  "generation_id": null,
  "seed": 0,
  "size_bytes": 5242880,
  "upscaler": "fast",
  "url": "/actions/core/serve-document/doc_1a2b3c4d5e6f78901a2b3c4d5e6f7890?teamId=6512a1b2c3d4e5f600000001"
}
```
