KosmoKrator

data

Stability AI CLI for AI Agents

Use the Stability AI CLI from KosmoKrator to call Stability AI tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Stability AI CLI Setup

Stability AI can be configured headlessly with `kosmokrator integrations:configure stability`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure stability --enable --read allow --write ask --json
kosmokrator integrations:doctor stability --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call stability.stability_get_account '{}' --json
Provider shortcut
kosmo integrations:stability stability_get_account '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs stability --json
kosmo integrations:docs stability.stability_get_account --json
kosmo integrations:schema stability.stability_get_account --json
kosmo integrations:search "Stability AI" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

stability.stability_get_account

Get the account associated with the Stability AI API key.

Read read
Parameters
none
Generic call
kosmo integrations:call stability.stability_get_account '{}' --json
Shortcut
kosmo integrations:stability stability_get_account '{}' --json

stability.stability_get_balance

Get credit balance for the Stability AI API key.

Read read
Parameters
none
Generic call
kosmo integrations:call stability.stability_get_balance '{}' --json
Shortcut
kosmo integrations:stability stability_get_balance '{}' --json

stability.stability_generate_core

Generate an image with Stable Image Core.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_generate_core '{}' --json
Shortcut
kosmo integrations:stability stability_generate_core '{}' --json

stability.stability_generate_ultra

Generate a high-quality image with Stable Image Ultra.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_generate_ultra '{}' --json
Shortcut
kosmo integrations:stability stability_generate_ultra '{}' --json

stability.stability_generate_sd3

Generate an image with Stable Diffusion 3 or 3.5 models.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_generate_sd3 '{}' --json
Shortcut
kosmo integrations:stability stability_generate_sd3 '{}' --json

stability.stability_inpaint

Fill or replace masked areas of an image.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_inpaint '{}' --json
Shortcut
kosmo integrations:stability stability_inpaint '{}' --json

stability.stability_erase

Remove masked areas from an image.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_erase '{}' --json
Shortcut
kosmo integrations:stability stability_erase '{}' --json

stability.stability_remove_background

Remove an image background.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_remove_background '{}' --json
Shortcut
kosmo integrations:stability stability_remove_background '{}' --json

stability.stability_control_structure

Generate an image guided by the structure of an input image.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_control_structure '{}' --json
Shortcut
kosmo integrations:stability stability_control_structure '{}' --json

stability.stability_upscale_fast

Quickly upscale an image.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_upscale_fast '{}' --json
Shortcut
kosmo integrations:stability stability_upscale_fast '{}' --json

stability.stability_upscale_creative

Upscale an image with creative enhancement.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_upscale_creative '{}' --json
Shortcut
kosmo integrations:stability stability_upscale_creative '{}' --json

stability.stability_image_to_video

Start an image-to-video generation job.

Write write
Parameters
none
Generic call
kosmo integrations:call stability.stability_image_to_video '{}' --json
Shortcut
kosmo integrations:stability stability_image_to_video '{}' --json

stability.stability_get_video_result

Fetch the result of an image-to-video generation job.

Read read
Parameters
none
Generic call
kosmo integrations:call stability.stability_get_video_result '{}' --json
Shortcut
kosmo integrations:stability stability_get_video_result '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

stability.stability_get_account 0 parameters
Schema command
kosmo integrations:schema stability.stability_get_account --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_get_balance 0 parameters
Schema command
kosmo integrations:schema stability.stability_get_balance --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_generate_core 0 parameters
Schema command
kosmo integrations:schema stability.stability_generate_core --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_generate_ultra 0 parameters
Schema command
kosmo integrations:schema stability.stability_generate_ultra --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_generate_sd3 0 parameters
Schema command
kosmo integrations:schema stability.stability_generate_sd3 --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_inpaint 0 parameters
Schema command
kosmo integrations:schema stability.stability_inpaint --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_erase 0 parameters
Schema command
kosmo integrations:schema stability.stability_erase --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_remove_background 0 parameters
Schema command
kosmo integrations:schema stability.stability_remove_background --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_control_structure 0 parameters
Schema command
kosmo integrations:schema stability.stability_control_structure --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_upscale_fast 0 parameters
Schema command
kosmo integrations:schema stability.stability_upscale_fast --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_upscale_creative 0 parameters
Schema command
kosmo integrations:schema stability.stability_upscale_creative --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_image_to_video 0 parameters
Schema command
kosmo integrations:schema stability.stability_image_to_video --json
ParameterTypeRequiredDescription
No parameters.
stability.stability_get_video_result 0 parameters
Schema command
kosmo integrations:schema stability.stability_get_video_result --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.