The All-Images AI connector lets your AI agent act in each user's All-Images AI account. Each user connects their own All-Images AI API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 14 tools.
- Tools
- 14
- What they doRead · write · destructive
- 7 · 5 · 27 read5 write2 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the All-Images AI connection
In AgentKit > Connections, create an All-Images AI connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'allimagesai'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize All-Images AI:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'allimagesai_api_key_check',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "allimagesai"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize All-Images AI:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="allimagesai_api_key_check",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their All-Images AI credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolallimagesai_api_key_checkCheck that the All-Images.ai API key is valid.Read-onlyCheck API Key
Check that the All-Images.ai API key is valid. Returns the email and name of the account the key belongs to. Use this to confirm the connection works.
Inputs
This tool takes no inputs.
allimagesai_credits_getGet the All-Images.ai account's credit balance.Read-onlyGet Credits
Get the All-Images.ai account's credit balance. Returns the remaining credits for image purchases and generations. Use this before buying images or creating generations.
Inputs
This tool takes no inputs.
allimagesai_generation_getGet one image generation.Read-onlyGet Image Generation
Get one image generation. Returns its id, name, prompt, params, status (0 created, 1 pending, 2 processing, 3 done, 4 error), progress and the generated images with their IDs and URLs. Use this to poll a generation until status is 3 (done), then buy an image with allimagesai_image_buy.
Inputs
generation_idstringrequired- ID of the image generation, from allimagesai_generations_list or the create response. Example: 65921cb1-111d-4cca-a554-809b61f842b4.
allimagesai_generations_listList the account's image generations, optionally filtered by name or tag.Read-onlyList Image Generations
List the account's image generations, optionally filtered by name or tag. Returns filteredResults and prints, each with id, name, prompt, status (0 created, 1 pending, 2 processing, 3 done, 4 error), images, tags and metadata. Use this to find a generation ID. Use allimagesai_generation_get for one generation.
Inputs
limitinteger- Number of results to return. Example: 20.
namestring- Only generations whose name matches this text. Example: Dog in the park.
offsetinteger- Number of results to skip, for paging. Example: 0.
sortstring- Sort order, as accepted by the All-Images API (for example createdAt). Example: createdAt.
tagstring- Only generations with this tag. Example: blog.
allimagesai_images_downloaded_listList the images the account has already bought or downloaded, optionally within a date range.Read-onlyList Downloaded Images
List the images the account has already bought or downloaded, optionally within a date range. Returns filteredResults and the images with id and URLs. Use this to find images you own. Use allimagesai_images_search to find new ones.
Inputs
after_created_atstring- Only images downloaded after this ISO 8601 date-time. Example: 2026-01-01T00:00:00Z.
before_created_atstring- Only images downloaded before this ISO 8601 date-time. Example: 2026-02-01T00:00:00Z.
limitinteger- Number of results to return. Example: 20.
offsetinteger- Number of results to skip, for paging. Example: 0.
sortstring- Sort order, as accepted by the All-Images API (for example createdAt). Example: createdAt.
allimagesai_images_searchSearch the All-Images.ai library of AI-generated stock photos by keywords.Read-onlySearch Stock Images
Search the All-Images.ai library of AI-generated stock photos by keywords. Returns filteredResults (total matches) and images with id, title and preview URL. Use this to find an image to buy with allimagesai_image_buy. Use allimagesai_images_downloaded_list for images you already own.
Inputs
filter_freeboolean- Only return free images. Example: false.
limitinteger- Number of results to return. Example: 20.
offsetinteger- Number of results to skip, for paging. Example: 0.
searchstring- Keywords to search for. Example: office team meeting.
sortstring- Sort order, as accepted by the All-Images API (for example createdAt). Example: createdAt.
allimagesai_webhook_getGet a webhook registered on the API key.Read-onlyGet Webhook
Get a webhook registered on the API key. Returns its id, URL and events. The ID comes from allimagesai_webhook_subscribe.
Inputs
webhook_idstringrequired- Webhook ID returned by allimagesai_webhook_subscribe. Example: 6592a0b1-2c3d-4e5f-8a9b-0c1d2e3f4a5b.
allimagesai_generation_createStart an AI image generation that proposes 4 images from a description.WriteCreate Image Generation
Start an AI image generation that proposes 4 images from a description. Uses credits. Runs in the background. Returns the new generation with its id and status. Poll allimagesai_generation_get until status is 3 (done), or subscribe a webhook with allimagesai_webhook_subscribe.
Inputs
modestringrequired- simple: a plain description, optionally tuned with params and optimize_prompt. advanced: a raw Midjourney imagine prompt, parameters included (for example --aspect 3:2). Example: simple.one of
simpleadvanced namestringrequired- Name for the generation, used to find it later. Example: Dog in the park.
promptstringrequired- Image description (simple mode, no Midjourney parameters) or full Midjourney prompt (advanced mode), up to 4096 characters. Example: a dog playing in a park.
additional_promptstring- Extra text added at the start of the prompt and left untouched by prompt optimization, up to 1024 characters. Example: watercolor style.
metadataobject- Custom key-value data stored with the generation and sent back in webhooks. Example: {"post_id": "123"}
optimize_promptboolean- Simple mode: let All-Images rewrite the description into a richer prompt. Example: true.
paramsarray- Simple-mode options as name/value pairs. Names: templatePrompt (realisticQuality or realisticManuel), format (1:1, 3:2, 2:3, 4:7, 7:4, 5:4, 4:5, 16:9, 9:16), weather (sunny, cloudy, foggy, rainy, thunderstorm, snowy), time (sunrise, morning, afternoon, sunset, evening, golden hour, night, midnight), camera (a camera name), chaos (0 to 100), stylize (0 to 1000), interdiction (comma-separated things to keep out of the image), plus angle, photographe, sujetMode, version and fromImageUrl. Values are strings. Example: [{"name": "format", "value": "16:9"}, {"name": "weather", "value": "sunny"}]
process_modestring- fast or relax generation; only for Dedicated plan users. Defaults to fast. Example: fast.one of
fastrelax tagsarray- Tags to find the generation by later. Example: ["blog", "pets"]
allimagesai_generation_retryRestart a generation that ended in error.WriteRetry Image Generation
Restart a generation that ended in error. Returns the generation with its new status. Change its prompt first with allimagesai_generation_update if the error came from the description.
Inputs
generation_idstringrequired- ID of the image generation, from allimagesai_generations_list or the create response. Example: 65921cb1-111d-4cca-a554-809b61f842b4.
allimagesai_generation_updateChange a generation's name, prompt, options, tags or metadata.WriteUpdate Image Generation
Change a generation's name, prompt, options, tags or metadata. Not allowed while it is pending or in progress. Returns the updated generation. Use this to fix a failed generation before allimagesai_generation_retry. Only the fields you set are sent.
- Idempotent
Inputs
generation_idstringrequired- ID of the image generation, from allimagesai_generations_list or the create response. Example: 65921cb1-111d-4cca-a554-809b61f842b4.
additional_promptstring- Extra text added at the start of the prompt and left untouched by prompt optimization, up to 1024 characters. Example: watercolor style.
metadataobject- Custom key-value data stored with the generation and sent back in webhooks. Example: {"post_id": "123"}
modestring- simple: a plain description, optionally tuned with params and optimize_prompt. advanced: a raw Midjourney imagine prompt, parameters included (for example --aspect 3:2). Example: simple.one of
simpleadvanced namestring- Name for the generation, used to find it later. Example: Dog in the park.
optimize_promptboolean- Simple mode: let All-Images rewrite the description into a richer prompt. Example: true.
paramsarray- Simple-mode options as name/value pairs. Names: templatePrompt (realisticQuality or realisticManuel), format (1:1, 3:2, 2:3, 4:7, 7:4, 5:4, 4:5, 16:9, 9:16), weather (sunny, cloudy, foggy, rainy, thunderstorm, snowy), time (sunrise, morning, afternoon, sunset, evening, golden hour, night, midnight), camera (a camera name), chaos (0 to 100), stylize (0 to 1000), interdiction (comma-separated things to keep out of the image), plus angle, photographe, sujetMode, version and fromImageUrl. Values are strings. Example: [{"name": "format", "value": "16:9"}, {"name": "weather", "value": "sunny"}]
process_modestring- fast or relax generation; only for Dedicated plan users. Defaults to fast. Example: fast.one of
fastrelax promptstring- Image description (simple mode, no Midjourney parameters) or full Midjourney prompt (advanced mode), up to 4096 characters. Example: a dog playing in a park.
tagsarray- Tags to find the generation by later. Example: ["blog", "pets"]
allimagesai_image_buyBuy a stock image and get a direct public link to the full-size file.WriteBuy Image
Buy a stock image and get a direct public link to the full-size file. Uses credits the first time; buying the same image again is free. Returns the image's public download URL. Use allimagesai_images_search to find the image ID.
Inputs
idstringrequired- ID of the image to buy, from allimagesai_images_search or a generation's images. Example: 65921cb1-111d-4cca-a554-809b61f842b4.
allimagesai_webhook_subscribeRegister a URL that receives image generation events for this API key.WriteSubscribe Webhook
Register a URL that receives image generation events for this API key. Returns the webhookId. Use allimagesai_webhook_unsubscribe to remove it.
Inputs
urlstringrequired- HTTPS URL that receives the webhook POSTs. Example: https://example.com/hooks/all-images.
eventsarray- Events to send: test, print.created, print.active, print.progress, print.failed, print.completed. Defaults to print.failed and print.completed. Example: ["print.completed", "print.failed"]
allimagesai_generations_deleteDelete one or more image generations.DestructiveDelete Image Generations
Delete one or more image generations. Returns a confirmation. This cannot be undone. Images already bought stay available.
- Idempotent
Inputs
print_idsarrayrequired- IDs of the generations to delete, from allimagesai_generations_list. Example: ["65921cb1-111d-4cca-a554-809b61f842b4"]
allimagesai_webhook_unsubscribeRemove a webhook from the API key so it stops receiving events.DestructiveUnsubscribe Webhook
Remove a webhook from the API key so it stops receiving events. Returns a confirmation. The ID comes from allimagesai_webhook_subscribe.
- Idempotent
Inputs
webhook_idstringrequired- Webhook ID returned by allimagesai_webhook_subscribe. Example: 6592a0b1-2c3d-4e5f-8a9b-0c1d2e3f4a5b.
No tools match.