The Claid AI connector lets your AI agent act in each user's Claid AI account. Each user connects their own Claid AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 17 tools.
- Tools
- 17
- What they doRead · write · destructive
- 8 · 8 · 18 read8 write1 destructive
- Users sign in with
- Access token
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 Claid AI connection
In AgentKit > Connections, create a Claid 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 = 'claid'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Claid 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: 'claid_storage_types_list',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 = "claid"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Claid AI:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="claid_storage_types_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Claid AI credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolclaid_ai_edit_getGet the status and result of an AI image edit.Read-onlyGet AI Image Edit
Get the status and result of an AI image edit. Returns the task status and, when done, the output image URLs. Poll it after ai_edit_create.
Inputs
task_idintegerrequired- ID of the AI edit task, from the id in the create tool's response. Example: 4521.
claid_fashion_models_getGet the status and result of an AI fashion models task.Read-onlyGet AI Fashion Model Photos
Get the status and result of an AI fashion models task. Returns the task status and, when done, the generated image URLs. Poll it after fashion_models_create.
Inputs
task_idintegerrequired- ID of the AI fashion models task, from the id in the create tool's response. Example: 4521.
claid_image_edit_async_getGet the status and result of an asynchronous image edit.Read-onlyGet Async Image Edit
Get the status and result of an asynchronous image edit. Returns the task status (ACCEPTED, PROCESSING, DONE or ERROR) and, when done, the output image details and URL. Poll it after image_edit_async.
Inputs
task_idintegerrequired- ID of the async image edit task, from the id in the create tool's response. Example: 4521.
claid_image_edit_batch_getGet the status and results of a batch image edit.Read-onlyGet Batch Image Edit
Get the status and results of a batch image edit. Returns the task status and, per processed image, its input, output and any error. Poll it after image_edit_batch.
Inputs
task_idintegerrequired- ID of the batch image edit task, from the id in the create tool's response. Example: 4521.
claid_storage_getGet one connected storage.Read-onlyGet Storage
Get one connected storage. Returns its name, type and settings (without secrets). Use storages_list to find storage IDs.
Inputs
storage_idintegerrequired- ID of the storage, from storages_list. Example: 12.
claid_storage_types_listList the storage types Claid can connect to (such as AWS S3, Google Cloud Storage and web folders).Read-onlyList Storage Types
List the storage types Claid can connect to (such as AWS S3, Google Cloud Storage and web folders). Returns each type's name and required settings. Storages are connected in the Claid dashboard.
Inputs
This tool takes no inputs.
claid_storages_listList the external storages connected to your Claid account.Read-onlyList Storages
List the external storages connected to your Claid account. Returns each storage's id, name, type and settings (without secrets). Use a storage name in storage:// URIs for input and output.
Inputs
This tool takes no inputs.
claid_video_getGet the status and result of an image-to-video task.Read-onlyGet Video Generation
Get the status and result of an image-to-video task. Returns the task status and, when done, the video URL. Poll it after video_generate.
Inputs
task_idintegerrequired- ID of the video generation task, from the id in the create tool's response. Example: 4521.
claid_ai_edit_createEdit an image from a natural language instruction, such as add a duck or change the background to a beach.WriteEdit Image with AI Instructions
Edit an image from a natural language instruction, such as add a duck or change the background to a beach. Returns a task id and status at once. Uses credits. Poll ai_edit_get for the result.
Inputs
inputstringrequired- The image to edit: a public image URL or a storage:// URI. Example: https://picsum.photos/500.
optionsobjectrequired- AI edit options; prompt (the instruction) is required. See https://docs.claid.ai/image-ai-edit-api/image-ai-edit-options for the other options. Example: {"prompt": "add a duck"}
outputobject- Output settings: format (an object such as {"type": "jpeg", "quality": 90} or a string such as png), and optionally destination, a storage:// URI to save the result in a connected storage. Omit to get a temporary URL in the response. Example: {"format": {"type": "jpeg", "quality": 90}}
claid_fashion_models_createGenerate photos of AI fashion models wearing your clothing items, with an optional model description, pose and background.WriteGenerate AI Fashion Model Photos
Generate photos of AI fashion models wearing your clothing items, with an optional model description, pose and background. Returns a task id and status at once. Uses credits. Poll fashion_models_get for the result.
Inputs
inputobjectrequired- Input images: clothing (required, a list of clothing image URLs), plus optional model and background references. See https://docs.claid.ai/ai-fashion-models-api/ai-fashion-models-i-o. Example: {"clothing": ["https://images.claid.ai/photoshoot-templates/assets/images/b63641ea19dd4dac8fdc02a6195873f0.jpeg"]}
optionsobject- Generation options such as pose, model description, background and number of images. See https://docs.claid.ai/ai-fashion-models-api/ai-fashion-models-options. Example: {"pose": "full body, front view, neutral stance, arms relaxed"}
outputobject- Output settings: format (an object such as {"type": "jpeg", "quality": 90} or a string such as png), and optionally destination, a storage:// URI to save the result in a connected storage. Omit to get a temporary URL in the response. Example: {"format": {"type": "jpeg", "quality": 90}}
claid_image_editEdit one image synchronously: resize, upscale, restore, remove or replace the background, adjust colors, pad, blur faces and more, by combining operations.WriteEdit Image
Edit one image synchronously: resize, upscale, restore, remove or replace the background, adjust colors, pad, blur faces and more, by combining operations. Returns the input and output image details, including a temporary output URL (tmp_url) unless a storage destination is set. Uses credits. Use image_edit_async for large images and image_edit_batch for folders.
Inputs
inputstringrequired- The image to edit: a public image URL or a storage:// URI of a connected storage. Example: https://claid.ai/assets/cms/shoe_example_05fb154a3a/shoe_example_05fb154a3a.png.
operationsobjectrequired- Edits to apply, grouped by operation type: restorations (upscale, decompress, polish), resizing (width, height, fit), adjustments (hdr, exposure, saturation, contrast, sharpness), background (remove, color, blur), padding and privacy (blur_car_plate). See https://docs.claid.ai/image-editing-api/image-operations. Example: {"resizing": {"width": 1000}, "background": {"remove": true, "color": "#ffffff"}, "restorations": {"upscale": "smart_enhance"}}
outputobject- Output settings: format (an object such as {"type": "jpeg", "quality": 90} or a string such as png), and optionally destination, a storage:// URI to save the result in a connected storage. Omit to get a temporary URL in the response. Example: {"format": {"type": "jpeg", "quality": 90}}
claid_image_edit_asyncStart editing one image asynchronously, with the same operations as image_edit.WriteEdit Image Asynchronously
Start editing one image asynchronously, with the same operations as image_edit. Returns a task id and status at once; a webhook (configured in the Claid dashboard) or image_edit_async_get gives the result. Uses credits. Use it for large images or slow operations.
Inputs
inputstringrequired- The image to edit: a public image URL or a storage:// URI of a connected storage. Example: https://claid.ai/assets/cms/shoe_example_05fb154a3a/shoe_example_05fb154a3a.png.
operationsobjectrequired- Edits to apply, grouped by operation type (restorations, resizing, adjustments, background, padding, privacy). See https://docs.claid.ai/image-editing-api/image-operations. Example: {"resizing": {"width": 1000}, "background": {"remove": true, "color": "#ffffff"}, "restorations": {"upscale": "smart_enhance"}}
outputobject- Output settings: format (an object such as {"type": "jpeg", "quality": 90} or a string such as png), and optionally destination, a storage:// URI to save the result in a connected storage. Omit to get a temporary URL in the response. Example: {"format": {"type": "jpeg", "quality": 90}}
claid_image_edit_batchEdit every image in a storage folder with the same operations, saving results to another storage folder.WriteEdit Images in Batch
Edit every image in a storage folder with the same operations, saving results to another storage folder. Returns a task id and status at once. Uses credits per image. Input and output must be storage:// folder URIs from a storage connected in Claid (see storages_list).
Inputs
inputstringrequired- Folder of images to edit, as a storage:// URI ending in /. Example: storage://storage_1/input_folder/.
operationsobjectrequired- Edits to apply to each image, grouped by operation type (restorations, resizing, adjustments, background, padding, privacy). Example: {"resizing": {"width": 1000}, "background": {"remove": true, "color": "#ffffff"}, "restorations": {"upscale": "smart_enhance"}}
outputstringrequired- Folder to write the edited images to, as a storage:// URI ending in /. Example: storage://storage_1/output_folder/.
claid_image_generateGenerate images from a text prompt.WriteGenerate Image
Generate images from a text prompt. Returns the generated images' details and temporary URLs. Uses credits. Use scene_create to place a product photo into a generated scene.
Inputs
inputstringrequired- Text prompt describing the image to generate. Example: A delicious ceviche cheesecake slice.
optionsobject- Generation options such as number_of_images (1-4) and guidance_scale. See https://docs.claid.ai/image-generation-api/image-generation-options. Example: {"number_of_images": 2, "guidance_scale": 5}
outputobject- Output settings: format (an object such as {"type": "jpeg", "quality": 90} or a string such as png), and optionally destination, a storage:// URI to save the result in a connected storage. Omit to get a temporary URL in the response. Example: {"format": {"type": "jpeg", "quality": 90}}
claid_scene_createPlace a product image into an AI-generated background scene described by a prompt or a template image.WriteCreate AI Background Scene
Place a product image into an AI-generated background scene described by a prompt or a template image. Returns the generated images' details and URLs. Uses credits. Use image_generate for images without a product.
Inputs
objectobjectrequired- The product: image_url (required, ideally with a transparent background), plus optional rotation_degree, scale and position (x, y from 0 to 1). Example: {"image_url": "https://images.claid.ai/photoshoot-templates/docs/product.png", "scale": 0.55, "position": {"x": 0.35, "y": 0.5}}
sceneobjectrequired- The background: prompt describing it, and optionally template_url, template_mode (such as transform) and view (such as front). See https://docs.claid.ai/ai-background-api/ai-background-options/scene. Example: {"prompt": "marble countertop, marble wall background, bokeh, professional product photography", "view": "front"}
outputobject- Output settings: number_of_images and format (png, jpeg or webp), and optionally a storage destination. Example: {"number_of_images": 1, "format": "png"}
claid_video_generateGenerate a short video from an image, with an optional or auto-generated prompt.WriteGenerate Video from Image
Generate a short video from an image, with an optional or auto-generated prompt. Returns a task id and status at once. Uses credits. Poll video_get for the result.
Inputs
inputstringrequired- Source image: a public image URL or a storage:// URI. Example: storage://storage-name/input-path/input.png.
optionsobject- Video options such as prompt (an object with text, or generate true to write one automatically) and duration in seconds. See https://docs.claid.ai/image-to-video-api/image-to-video-options. Example: {"prompt": {"generate": true}, "duration": 5}
outputstring- Where to save the video, as a storage:// folder URI. Omit to get a temporary URL. Example: storage://storage-name/output-path/.
claid_storage_deleteDisconnect a storage from your Claid account.DestructiveDelete Storage
Disconnect a storage from your Claid account. Returns an empty response on success. Files in the storage are not deleted.
- Idempotent
Inputs
storage_idintegerrequired- ID of the storage, from storages_list. Example: 12.
No tools match.