Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to DynaPictures

Scalekit connector
Open markdown

The DynaPictures connector lets your AI agent act in each user's DynaPictures account. Each user connects their own DynaPictures 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
6 · 7 · 46 read7 write4 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the DynaPictures connection

    In AgentKit > Connections, create a DynaPictures connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. 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.actions
    const connector = 'dynapictures'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize DynaPictures:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'dynapictures_templates_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their DynaPictures credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • dynapictures_ai_image_job_getGet the status and result of an AI image generation job.Read-only

    Get AI Image Job

    Get the status and result of an AI image generation job. Returns jobUid, status (queued, running, done or error), resultUrl when done, creditsCharged, creditsRemaining and error when it failed. Poll this after dynapictures_ai_image_generate. Download the resultUrl image if you need to keep it.

    Inputs

    job_uidstringrequired
    jobUid returned by dynapictures_ai_image_generate. Example: aBcD1234eFgH5678iJkL9012.
  • dynapictures_media_asset_getGet one media library asset.Read-only

    Get Media Asset

    Get one media library asset. Returns id, folder, mimeType, filename, size, url, thumbnailUrl, dateCreated and dateUpdated. Use dynapictures_media_assets_list to find asset IDs.

    Inputs

    asset_idstringrequired
    ID of the asset. Example: 5a12844966.
    workspace_idstringrequired
    ID of the workspace, from dynapictures_workspaces_list. Example: 8eb9e4869b.
  • dynapictures_media_assets_listList the images and folders in a workspace's media library, 30 per page.Read-only

    List Media Assets

    List the images and folders in a workspace's media library, 30 per page. Returns page, totalPages and results with id, folder, mimeType, filename, size, url, thumbnailUrl, dateCreated and dateUpdated. Use asset URLs as imageUrl values in dynapictures_image_generate.

    Inputs

    workspace_idstringrequired
    ID of the workspace, from dynapictures_workspaces_list. Example: 8eb9e4869b.
    pageinteger
    Page number, starting at 1. Example: 1.
  • dynapictures_template_getGet one design template with its layers.Read-only

    Get Template

    Get one design template with its layers. Returns id, name, thumbnail, dateCreated, dateUpdated and layers with type, name, width and height. Use this to see which layer names to customize in dynapictures_image_generate.

    Inputs

    template_idstringrequired
    ID of the design template, shown in the top-left corner of the template page or returned by dynapictures_templates_list. Example: debcaw6f99.
  • dynapictures_templates_listList the design templates that are ready for API use (the Sync to Zapier option is on).Read-only

    List Templates

    List the design templates that are ready for API use (the Sync to Zapier option is on). Returns templates with id, name, thumbnail, dateCreated, dateUpdated and layers (type, name, width, height). Use this to find template IDs and layer names before dynapictures_image_generate. Use dynapictures_template_get for one template.

    Inputs

    This tool takes no inputs.

  • dynapictures_workspaces_listList the workspaces the API key's user is a member of.Read-only

    List Workspaces

    List the workspaces the API key's user is a member of. Returns workspaces with id, name, dateCreated and dateUpdated. Use this to find a workspace ID for the media library tools.

    Inputs

    This tool takes no inputs.

  • dynapictures_ai_image_generateStart an AI image generation job from a text prompt, optionally editing a source photo or using named reference images.Write

    Start AI Image Generation

    Start an AI image generation job from a text prompt, optionally editing a source photo or using named reference images. Returns jobUid and status queued (HTTP 202). Poll dynapictures_ai_image_job_get with the jobUid until status is done. Uses AI credits that depend on the model; a 4xx means the job was not queued.

    Inputs

    model_idstringrequired
    AI model to use, for example gemini-3.1-flash-image (Nano Banana), nano-banana-pro, gpt-image-1-mini, gpt-image-2-low, gpt-image-2-med or flux-2-pro. See https://dynapictures.com/docs/ for the list and credit costs. Example: gemini-3.1-flash-image.
    promptstringrequired
    Text prompt describing the image. Reference images by [name] tokens. Example: A photorealistic cup of coffee on a wooden table, soft morning light.
    ratiostring
    Aspect ratio. Default 1:1; supported ratios vary by model. Example: 16:9.one of 1:13:22:316:99:164:33:4
    reference_imagesarray
    Named reference images, each with a name (used as [name] in the prompt) and a public url. At most 6 input images in total including source_image. Example: [{"name": "logo", "url": "https://example.com/logo.png"}]
    source_imagestring
    URL of a photo to edit (image-to-image). Leave empty for text-to-image. Editing models only. Example: https://example.com/product.jpg.
  • dynapictures_image_generateGenerate an image from a DynaPictures design template, replacing text, images and styling in its layers.Write

    Generate Image

    Generate an image from a DynaPictures design template, replacing text, images and styling in its layers. Returns id, templateId, imageUrl, thumbnailUrl, retinaThumbnailUrl, metadata, width and height. Use this for single-page templates. Use dynapictures_multipage_images_generate for multi-page templates, dynapictures_pdf_generate for a PDF and dynapictures_templates_list to find template IDs and layer names. Each image uses one credit.

    Inputs

    template_idstringrequired
    ID of the design template, shown in the top-left corner of the template page or returned by dynapictures_templates_list. Example: debcaw6f99.
    formatstring
    Image file format. Default is the template's format. Example: png.one of pngjpegwebpavif
    metadatastring
    Custom text stored with the generated image and returned in the response and webhooks. Example: Post for @acme on Monday.
    paramsarray
    Layers to customize. Each layer object names the layer to change (name, as shown in the template's settings panel) and its new values: text and color for text layers; imageUrl plus optional imagePosition, imageAlignH and imageAlignV for image layers; and styling such as backgroundColor, borderColor, borderWidth, borderRadius and opacity. Example: [{"name": "title", "text": "Summer Sale", "color": "#333"}, {"name": "image1", "imageUrl": "https://example.com/photo.jpg"}]