> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Luma AI

The Luma AI connector lets your AI agent act in each user's Luma AI account. Each user connects their own Luma AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 14 tools.

**Authentication:** Bearer Token
**Categories:** AI, Media, Design
**Tools:** 14: 5 read, 8 write, 1 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=LUMALABS)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Luma AI connection

   In **AgentKit > Connections**, create a Luma AI connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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 = 'lumalabs'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Luma AI:', 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: 'lumalabs_get_credits',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "lumalabs"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Luma AI:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="lumalabs_get_credits",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Luma AI credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'lumalabs_get_credits',
  toolInput: {},
  connector: 'lumalabs',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="lumalabs_get_credits",
    tool_input={},
    connection_name="lumalabs",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `lumalabs_get_credits`

Get Credits · Read-only

Get the remaining credit balance of the Luma AI account behind this API key.
Returns credit_balance, in US cents.
Use this to check the account can pay for a generation before starting one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `lumalabs_get_generation`

Get Generation · Read-only

Get one Luma AI generation (video, image, upscale, audio, modify or reframe job) by its ID.
Returns id, generation_type, state (queued, dreaming, completed or failed), failure_reason, created_at, model, the original request, and assets with the video, image or progress_video URL.
Use this to poll a job you just started until it is completed or failed. Use lumalabs_list_generations to browse past generations.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `generation_id` (`string`, required): ID (UUID) of a Luma AI generation, as returned by a create tool or lumalabs_list_generations. Example: 123e4567-e89b-12d3-a456-426614174000

Example input: `{"generation_id":"<generation_id>"}`

### `lumalabs_list_camera_motions`

List Camera Motions · Read-only

List the camera motion phrases Luma AI recognizes in video prompts, such as "camera orbit left".
Returns an array of camera motion strings (wrapped as array in the tool result).
Use this to find wording for camera moves inside a prompt. Use lumalabs_list_concepts for structured concept keys, which Luma now recommends.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `lumalabs_list_concepts`

List Concepts · Read-only

List the camera concept keys Luma AI Ray accepts, such as dolly_zoom, orbit_left, push_in and aerial_drone.
Returns an array of concept key strings (wrapped as array in the tool result).
Use this to pick values for the concepts input of lumalabs_create_video or lumalabs_extend_video. Use lumalabs_list_camera_motions for camera phrases to write into a prompt instead.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `lumalabs_list_generations`

List Generations · Read-only

List the Luma AI generations made with this API key, newest first, one page at a time.
Returns generations (each with id, state, assets, model and request), plus count, limit, offset and has_more.
Use this to browse or find past generations. Use lumalabs_get_generation when you already have an ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Maximum number of generations to return in this page. Server default is 100. Example: 20
- `offset` (`integer`, optional): Number of generations to skip, for paging. Use the previous offset plus limit while has_more is true. Server default is 0. Example: 20

Example input: `{}`

### `lumalabs_add_audio`

Add Audio · Write

Generate a soundtrack and sound effects for a completed Luma AI video generation from a text prompt.
Returns a generation object for the audio job; the video with audio appears in its assets.video once state is completed.
Use this to add sound to a video made with Luma AI.
The source must be a completed video generation. Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `generation_id` (`string`, required): ID (UUID) of a Luma AI generation, as returned by a create tool or lumalabs_list_generations. It must be a completed video generation. Example: 123e4567-e89b-12d3-a456-426614174000
- `prompt` (`string`, required): Text describing the audio to generate. Example: Crunching snow footsteps and a distant wind howl
- `negative_prompt` (`string`, optional): Sounds to avoid in the generated audio. Example: music, speech

Example input: `{"generation_id":"<generation_id>","prompt":"<prompt>"}`

### `lumalabs_create_image`

Create Image · Write

Generate an image with Luma AI's Photon models from a text prompt, optionally guided by reference images, a style image, a character's photos, or an image to edit.
Returns the generation object with its id and state; the image URL appears in assets.image once state is completed (set sync to true to wait for it in the same call).
Use this for still images and image edits. Use lumalabs_reframe_image to change an existing image's aspect ratio, and lumalabs_create_video for video.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `prompt` (`string`, required): Text describing the image to generate, or the change to make when modify_image_url is set. Example: A teddy bear in sunglasses playing electric guitar
- `aspect_ratio` (`string`, optional): Aspect ratio of the output: one of 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 or 9:21. Example: 9:16 Leave empty for the server default (16:9). One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- `character_ref_images` (`array`, optional): Up to 4 public photo URLs of the same person, used to keep that character consistent in the image. More photos give a better likeness. Example: ["https://example.com/person-1.jpg"]
- `format` (`string`, optional): Output file format: jpg or png. Leave empty for jpg. Example: png. One of: `jpg`, `png`.
- `image_ref` (`array`, optional): Up to 4 reference images that guide the content of the generation, each with a public url and an optional weight from 0 to 1 that sets its influence. Useful for variations of an image or hard-to-describe concepts. Example: [{"url": "https://example.com/ref.jpg", "weight": 0.85}]
- `model` (`string`, optional): Photon image model: photon-1 (higher quality) or photon-flash-1 (faster and cheaper). Defaults to photon-1. Example: photon-flash-1. One of: `photon-1`, `photon-flash-1`. Default: `photon-1`.
- `modify_image_url` (`string`, optional): Public URL of an existing image to edit according to the prompt (image-to-image). Example: https://example.com/garden.jpg
- `modify_image_weight` (`number`, optional): How closely the result follows modify_image_url, from 0 to 1: higher stays closer to the input, lower is more creative. For color changes Luma recommends 0.0 to 0.1. Only used with modify_image_url. Example: 0.8
- `style_ref` (`array`, optional): Style reference images whose look is applied to the generation, each with a public url and an optional weight from 0 to 1. Example: [{"url": "https://example.com/style.jpg", "weight": 0.8}]
- `sync` (`boolean`, optional): Set to true to wait for the image to finish and return the completed generation in this call, instead of polling lumalabs_get_generation. Example: true
- `sync_timeout` (`number`, optional): Seconds to wait when sync is true (server default 60; capped at 100 by this tool). If the image is not done in time, poll lumalabs_get_generation. Example: 60

Example input: `{"prompt":"<prompt>"}`

### `lumalabs_create_video`

Create Video · Write

Start a Luma AI Ray video generation from a text prompt, optionally guided by a start and/or end image and camera concepts.
Returns the new generation object with its id and state (queued); the video URL appears in assets.video once state is completed.
Use this for text-to-video and image-to-video. Use lumalabs_extend_video to continue or bridge an existing generated video, and lumalabs_create_image for still images.
Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `prompt` (`string`, required): Text describing the video: subject, action, setting and style (3 to 5000 characters). Camera moves can also be written in the prompt, for example 'camera orbit left'. Example: A tiger walking through fresh snow at dawn, cinematic
- `aspect_ratio` (`string`, optional): Aspect ratio of the output: one of 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 or 9:21. Example: 9:16 Leave empty for the server default (16:9). One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- `concepts` (`array`, optional): Camera concept keys that steer camera movement and framing, combined in one shot. Get valid keys from lumalabs_list_concepts; common ones are dolly_zoom, orbit_left, push_in, aerial_drone and handheld. Example: ["dolly_zoom", "handheld"]
- `duration` (`string`, optional): Video length: 5s or 9s. Leave empty for the default (5s). Example: 5s. One of: `5s`, `9s`.
- `end_image_url` (`string`, optional): Public URL of an image to use as the last frame; the video animates toward it. Can be combined with start_image_url to animate between two images. Example: https://example.com/end-frame.jpg
- `loop` (`boolean`, optional): Set to true to make the video loop seamlessly (last frame flows into the first). Not supported when both a start and an end image are given. Example: true
- `model` (`string`, optional): Ray video model to use: ray-2 (higher quality) or ray-flash-2 (faster and cheaper). Defaults to ray-2. Example: ray-flash-2. One of: `ray-2`, `ray-flash-2`. Default: `ray-2`.
- `resolution` (`string`, optional): Output resolution: 540p, 720p, 1080p or 4k. Higher resolutions cost more. Leave empty for the model default. Example: 720p. One of: `540p`, `720p`, `1080p`, `4k`.
- `start_image_url` (`string`, optional): Public URL of an image to use as the first frame (image-to-video). Must be reachable by Luma's servers; upload it to your own storage or CDN first. Example: https://example.com/start-frame.jpg

Example input: `{"prompt":"<prompt>"}`

### `lumalabs_extend_video`

Extend Video · Write

Start a Luma AI Ray video generation that continues an existing generated video forward, leads up to it backward, or bridges it to an image or another generated video.
Returns the new generation object with its id and state (queued); the extended clip appears in assets.video once state is completed.
Use this only for videos made with Luma AI. Use lumalabs_create_video for a new video from text or images.
The source generation must be in state completed; check it with lumalabs_get_generation.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `generation_id` (`string`, required): ID (UUID) of a Luma AI generation, as returned by a create tool or lumalabs_list_generations. It must be a completed video generation. Example: 123e4567-e89b-12d3-a456-426614174000
- `prompt` (`string`, required): Text describing what happens in the new footage: subject, action, setting and style (3 to 5000 characters). Camera moves can also be written in the prompt, for example 'camera orbit left'. Example: A tiger walking through fresh snow at dawn, cinematic
- `aspect_ratio` (`string`, optional): Aspect ratio of the output: one of 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 or 9:21. Match the source video's aspect ratio. Example: 9:16 Leave empty for the server default (16:9). One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- `concepts` (`array`, optional): Camera concept keys that steer camera movement and framing, combined in one shot. Get valid keys from lumalabs_list_concepts; common ones are dolly_zoom, orbit_left, push_in, aerial_drone and handheld. Example: ["dolly_zoom", "handheld"]
- `direction` (`string`, optional): forward continues the source video after its last frame; backward generates footage that leads up to its first frame. Defaults to forward. Example: backward. One of: `forward`, `backward`. Default: `forward`.
- `duration` (`string`, optional): Video length: 5s or 9s. Leave empty for the default (5s). Example: 5s. One of: `5s`, `9s`.
- `loop` (`boolean`, optional): Set to true to make the result loop. Only supported when extending forward with no other end set. Example: false
- `model` (`string`, optional): Ray video model to use: ray-2 (higher quality) or ray-flash-2 (faster and cheaper). Defaults to ray-2. Example: ray-flash-2. One of: `ray-2`, `ray-flash-2`. Default: `ray-2`.
- `other_end_generation_id` (`string`, optional): Optional ID of a second completed Luma AI video generation to interpolate to, producing a clip that bridges the two videos. Do not combine with other_end_image_url. Example: 9b2f6c1e-4d3a-4f8b-a1c2-7e5d3b9a0f14
- `other_end_image_url` (`string`, optional): Optional public image URL for the opposite end of the new clip: the final frame when extending forward, the opening frame when extending backward. Do not combine with other_end_generation_id. Example: https://example.com/final-frame.jpg
- `resolution` (`string`, optional): Output resolution: 540p, 720p, 1080p or 4k. Higher resolutions cost more. Leave empty for the model default. Example: 720p. One of: `540p`, `720p`, `1080p`, `4k`.

Example input: `{"generation_id":"<generation_id>","prompt":"<prompt>"}`

### `lumalabs_modify_video`

Modify Video · Write

Restyle or edit any video with Luma AI Ray while keeping its motion, guided by a prompt and an optional styled first frame.
Returns the new generation object with its id and state (queued); the modified video appears in assets.video once state is completed.
Use this to retexture, restyle or swap elements of an existing video file. Use lumalabs_reframe_video to change aspect ratio, and lumalabs_extend_video to add footage.
Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `media_url` (`string`, required): Public URL of the source video to modify (up to 100 MB; up to 10s for ray-2 or 15s for ray-flash-2). Example: https://example.com/source.mp4
- `mode` (`string`, required): How closely the output follows the source. adhere_1 to adhere_3 stay very close (light retexture or filter); flex_1 to flex_3 keep recognizable shapes and characters with bigger style changes; reimagine_1 to reimagine_3 loosely follow the source for a whole new world or style. Higher numbers within a family move further from the source. Example: flex_1. One of: `adhere_1`, `adhere_2`, `adhere_3`, `flex_1`, `flex_2`, `flex_3`, `reimagine_1`, `reimagine_2`, `reimagine_3`.
- `model` (`string`, required): Ray video model used to modify the video: ray-2 (higher quality) or ray-flash-2 (faster and cheaper; accepts longer source videos). Example: ray-2. One of: `ray-2`, `ray-flash-2`.
- `first_frame_url` (`string`, optional): Optional but recommended: public URL of an image showing the desired first frame of the modified video, which guides the result. Example: https://example.com/styled-first-frame.png
- `prompt` (`string`, optional): Text directing how to change the video. Example: Turn the scene into a hand-drawn anime style at night

Example input: `{"media_url":"<media_url>","mode":"adhere_1","model":"ray-2"}`

### `lumalabs_reframe_image`

Reframe Image · Write

Change an image's aspect ratio with Luma AI Photon by generating new content around it (outpainting).
Returns the new generation object with its id and state (queued); the reframed image appears in assets.image once state is completed.
Use this to adapt an existing image to another aspect ratio. Use lumalabs_create_image to generate or edit an image, and lumalabs_reframe_video for video.
Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `aspect_ratio` (`string`, required): Aspect ratio of the output: one of 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 or 9:21. This is the target aspect ratio; Luma generates content for the new area. Example: 9:16. One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- `media_url` (`string`, required): Public URL of the source image to reframe (up to 10 MB). Example: https://example.com/portrait.jpg
- `model` (`string`, required): Photon image model used to reframe: photon-1 (higher quality) or photon-flash-1 (faster and cheaper). Example: photon-1. One of: `photon-1`, `photon-flash-1`.
- `format` (`string`, optional): Output file format: jpg or png. Leave empty for jpg. Example: png. One of: `jpg`, `png`.
- `grid_position_x` (`integer`, optional): Advanced, optional. Horizontal pixel offset at which to place the source inside the new canvas. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 120
- `grid_position_y` (`integer`, optional): Advanced, optional. Vertical pixel offset at which to place the source inside the new canvas. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0
- `prompt` (`string`, optional): Optional text steering what Luma generates in the newly added area. Example: Continue the city skyline to the left and right
- `resized_height` (`integer`, optional): Advanced, optional. Height, in pixels, to resize the source to before placing it. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 720
- `resized_width` (`integer`, optional): Advanced, optional. Width, in pixels, to resize the source to before placing it. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 1280
- `x_end` (`integer`, optional): Advanced, optional. Right edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 1280
- `x_start` (`integer`, optional): Advanced, optional. Left edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0
- `y_end` (`integer`, optional): Advanced, optional. Bottom edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 720
- `y_start` (`integer`, optional): Advanced, optional. Top edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0

Example input: `{"aspect_ratio":"1:1","media_url":"<media_url>","model":"photon-1"}`

### `lumalabs_reframe_video`

Reframe Video · Write

Change a video's aspect ratio with Luma AI Ray by generating new content around it (for example landscape to vertical).
Returns the new generation object with its id and state (queued); the reframed video appears in assets.video once state is completed.
Use this to adapt a video to another aspect ratio. Use lumalabs_reframe_image for still images and lumalabs_modify_video to restyle a video.
Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `aspect_ratio` (`string`, required): Aspect ratio of the output: one of 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 or 9:21. This is the target aspect ratio; Luma generates content for the new area. Example: 9:16. One of: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`.
- `media_url` (`string`, required): Public URL of the source video to reframe (up to 100 MB; up to 10s for ray-2 or 30s for ray-flash-2). Example: https://example.com/landscape.mp4
- `model` (`string`, required): Ray video model used to reframe the video: ray-2 (higher quality) or ray-flash-2 (faster and cheaper; accepts longer source videos). Example: ray-2. One of: `ray-2`, `ray-flash-2`.
- `first_frame_url` (`string`, optional): Optional public URL of an image showing the desired first frame of the reframed video. Example: https://example.com/reframed-first-frame.jpg
- `grid_position_x` (`integer`, optional): Advanced, optional. Horizontal pixel offset at which to place the source inside the new canvas. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 120
- `grid_position_y` (`integer`, optional): Advanced, optional. Vertical pixel offset at which to place the source inside the new canvas. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0
- `prompt` (`string`, optional): Optional text steering what Luma generates in the newly added area. Example: Extend the beach and sky on both sides
- `resized_height` (`integer`, optional): Advanced, optional. Height, in pixels, to resize the source to before placing it. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 720
- `resized_width` (`integer`, optional): Advanced, optional. Width, in pixels, to resize the source to before placing it. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 1280
- `x_end` (`integer`, optional): Advanced, optional. Right edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 1280
- `x_start` (`integer`, optional): Advanced, optional. Left edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0
- `y_end` (`integer`, optional): Advanced, optional. Bottom edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 720
- `y_start` (`integer`, optional): Advanced, optional. Top edge, in pixels, of the crop bounds applied to the source. All positioning values are pixels on the target canvas for the chosen aspect ratio (for video, 16:9 is 1280x720; for images, 16:9 is 2048x1152). Leave empty to let Luma fit the source automatically. Example: 0

Example input: `{"aspect_ratio":"1:1","media_url":"<media_url>","model":"ray-2"}`

### `lumalabs_upscale_video`

Upscale Video · Write

Upscale a completed Luma AI video generation to a higher resolution (720p, 1080p or 4k).
Returns a generation object for the upscale job; the upscaled video URL appears in its assets.video once state is completed.
Use this to raise the resolution of a video already made with Luma AI. Use lumalabs_create_video with resolution set to generate at a higher resolution from the start.
The source must be a completed video generation. Poll lumalabs_get_generation with the returned id until state is completed or failed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `generation_id` (`string`, required): ID (UUID) of a Luma AI generation, as returned by a create tool or lumalabs_list_generations. It must be a completed video generation. Example: 123e4567-e89b-12d3-a456-426614174000
- `resolution` (`string`, required): Target resolution, higher than the source: 720p (from 540p), 1080p (from 540p or 720p) or 4k (from 540p, 720p or 1080p). Example: 4k. One of: `720p`, `1080p`, `4k`.

Example input: `{"generation_id":"<generation_id>","resolution":"720p"}`

### `lumalabs_delete_generation`

Delete Generation · Destructive

Permanently delete a Luma AI generation by its ID.
Returns an empty response on success.
Use this to remove a generation you no longer need; it cannot be undone. Use lumalabs_get_generation to check a generation before deleting it.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `generation_id` (`string`, required): ID (UUID) of a Luma AI generation, as returned by a create tool or lumalabs_list_generations. This generation will be permanently deleted. Example: 123e4567-e89b-12d3-a456-426614174000

Example input: `{"generation_id":"<generation_id>"}`

## Related

Other AI connectors ([all 148](/agentkit/connectors/?category=ai)):

- [Chorus](/agentkit/connectors/chorus/): Scalekit connector, Username and password, 9 tools
- [Gong](/agentkit/connectors/gong/): Scalekit connector, OAuth, 69 tools
- [Jiminny](/agentkit/connectors/jiminny/): Scalekit connector, Access token, 27 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
