The Apiframe connector lets your AI agent act in each user's Apiframe account. Each user connects their own Apiframe API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 22 tools.
- Tools
- 22
- What they doRead · write · destructive
- 7 · 14 · 17 read14 write1 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 Apiframe connection
In AgentKit > Connections, create an Apiframe 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 = 'apiframe'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Apiframe:', 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: 'apiframe_jobs_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 = "apiframe"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Apiframe:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="apiframe_jobs_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Apiframe credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolapiframe_asset_getGet a stored media asset.Read-onlyGet Media Asset
Get a stored media asset. Returns its status, URL and metadata. Only assets created by your team are accessible.
Inputs
asset_idstringrequired- ID of the asset, from apiframe_asset_create. Example: ast_01JC9B3C4D5E6F7G8H9J0K1L2M.
apiframe_job_getGet the status, progress and, when complete, the result of one generation job.Read-onlyGet Job
Get the status, progress and, when complete, the result of one generation job. Returns status (QUEUED, PROCESSING, COMPLETED, FAILED or CANCELLED), progress and result with the output image, video or audio URLs. Poll this after any generate, edit, upscale or action tool until status is COMPLETED or FAILED.
Inputs
job_idstringrequired- ID of the job, returned by the tool that started it. Example: job_01JC8Z3QH5V7K9M2N4P6R8T0W2.
apiframe_jobs_listList generation jobs, newest first, filtered by status, model or text search.Read-onlyList Jobs
List generation jobs, newest first, filtered by status, model or text search. Returns jobs with id, model, status, progress, created time and result, plus a cursor for the next page. Use apiframe_job_get to poll one job.
Inputs
cursorstring- Cursor from the previous page's response, for the next page. Example: eyJjcmVhdGVkQXQiOiIyMDI2LTExLTE2In0.
limitinteger- Jobs per page. Defaults to 20. Example: 20.
modelstring- Only jobs for this model id. Example: flux-2-pro.
scopestring- user (default) lists your own jobs; team lists every job in the team (admins only). Example: user.one of
userteam searchstring- Text to search for in job prompts. Example: snowy cabin.
statusstring- Only jobs with this status. Example: COMPLETED.one of
QUEUEDPROCESSINGCOMPLETEDFAILEDCANCELLED
apiframe_lora_getGet one LoRA, including its training status.Read-onlyGet LoRA
Get one LoRA, including its training status. Returns the LoRA's id, name, subject kind, status and timestamps. Use this to poll training until the LoRA is ready.
Inputs
lora_idstringrequired- ID of the LoRA, from apiframe_loras_list. Example: lora_01JC9A2B3C4D5E6F7G8H9J0K1L.
apiframe_loras_listList the team's trained Flux LoRAs (AI photo models of a person, style or object).Read-onlyList LoRAs
List the team's trained Flux LoRAs (AI photo models of a person, style or object). Returns each LoRA's id, name, subject kind, status and created time, plus a cursor. Use an id as loraId in apiframe_image_generate with model flux-lora.
Inputs
cursorstring- Cursor from the previous page's response. Example: eyJpZCI6ImxvcmFfMTIzIn0.
include_archivedstring- true also lists archived LoRAs. Example: false.one of
truefalse limitinteger- LoRAs per page. Defaults to 24. Example: 24.
apiframe_me_getGet the authenticated user, their team with its credit balance and plan, and the API key in use.Read-onlyGet Account
Get the authenticated user, their team with its credit balance and plan, and the API key in use. Returns user, team (credits, plan) and apiKey details. Use this to check the connection and remaining credits.
Inputs
This tool takes no inputs.
apiframe_models_listList Apiframe's model catalog for image, video and music generation.Read-onlyList Models
List Apiframe's model catalog for image, video and music generation. Returns each model's id, label, description, supported controls and credit cost range. Use a model id as the model input of the generate tools.
Inputs
modalitystring- Only models of this kind. Example: image.one of
imagevideomusic
apiframe_asset_createDownload media from a URL and store it in Apiframe storage as a reusable asset.WriteCreate Media Asset
Download media from a URL and store it in Apiframe storage as a reusable asset. Returns the asset id, status and URL; reference it as asset://<id> in any media URL field of a generation request. Use this for inputs you will reuse across many jobs.
Inputs
typestringrequired- Kind of media. Example: image.one of
imagevideoaudio urlstringrequired- Public URL of the media to store. Example: https://example.com/brand-logo.png.
apiframe_image_background_removeStart a background removal job that returns a transparent PNG.WriteRemove Image Background
Start a background removal job that returns a transparent PNG. Returns the job id; the cut-out image is in the job's result. Poll apiframe_job_get. bria-bg-remove is highest quality; 851-bg-remove is cheaper. Spends credits.
Inputs
modelstringrequired- Background removal model: bria-bg-remove or 851-bg-remove. Example: bria-bg-remove.
parametersobjectrequired- The model's params block with the image URL, merged into the body: {"briaBgRemoveParams": {"image": <url>}} or {"lab851BgRemoveParams": {"image": <url>, "background_type": "rgba"}}. Required. Example: {"briaBgRemoveParams": {"image": "https://example.com/product.jpg"}}
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_image_editStart an inpaint or outpaint job on an existing image with Flux Fill Pro.WriteEdit Image (Inpaint or Outpaint)
Start an inpaint or outpaint job on an existing image with Flux Fill Pro. Returns the job id; the edited image is in the job's result. Poll apiframe_job_get. Spends credits.
Inputs
paramsobjectrequired- Flux Fill options: image (URL), prompt, mode inpaint (with a mask image URL) or outpaint (with an outpaint preset: Zoom out 1.5x, Zoom out 2x, Make square, Left outpaint, Right outpaint, Top outpaint or Bottom outpaint), and optional steps, guidance, output_format (jpg or png) and seed. Example: {"image": "https://example.com/room.jpg", "prompt": "a large window with a sea view", "mode": "inpaint", "mask": "https://example.com/mask.png"}
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_image_generateStart an image generation job with any supported model: Midjourney, Flux, Nano Banana, Seedream, Ideogram, Imagen, GPT Image, DALL-E, Stable Diffusion, Kling, Qwen, Wan, Grok, Reve or a trained Flux LoRA.WriteGenerate Image
Start an image generation job with any supported model: Midjourney, Flux, Nano Banana, Seedream, Ideogram, Imagen, GPT Image, DALL-E, Stable Diffusion, Kling, Qwen, Wan, Grok, Reve or a trained Flux LoRA. Returns the job id and status; the images are in the job's result. Poll apiframe_job_get or set webhook_url. Spends credits. Use apiframe_models_list for model ids.
Inputs
modelstringrequired- Image model id from apiframe_models_list (modality image), such as midjourney, flux-2-pro, nano-banana-pro, seedream-4.5, ideogram-v3-quality, imagen-4, gpt-image-2 or flux-lora. Example: flux-2-pro.
promptstringrequired- Text prompt describing what to generate. Example: A cozy cabin in a snowy pine forest at dusk, warm light in the windows, cinematic.
parametersobject- Model-specific options, merged into the request body as the model's params block, such as {"fluxParams": {...}} for Flux models, {"midjourneyParams": {...}} for Midjourney, {"nanoBananaParams": {...}}, {"seedreamParams": {...}}, {"ideogramParams": {...}} (required for ideogram-character) or {"fluxLoraParams": {"loraId": ...}} (required for flux-lora). Typical options are aspect_ratio, output_format, seed and reference images. Example: {"fluxParams": {"aspect_ratio": "16:9", "output_format": "png"}}
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_image_upscaleStart an image upscale job with Topaz (realistic photos) or Clarity (creative, invents detail).WriteUpscale Image
Start an image upscale job with Topaz (realistic photos) or Clarity (creative, invents detail). Returns the job id; the upscaled image is in the job's result. Poll apiframe_job_get. Spends credits (Topaz is priced by output megapixels).
Inputs
modelstringrequired- Upscale model: topaz-image-upscale or clarity-upscale. Example: topaz-image-upscale.
parametersobjectrequired- The model's params block with the image URL, merged into the body: {"topazUpscaleParams": {"image": <url>, "upscale_factor": 2, "model_type": "standard-v2"}} or {"clarityUpscaleParams": {"image": <url>, "scale_factor": 2, "prompt": ...}}. Required. Example: {"topazUpscaleParams": {"image": "https://example.com/photo.jpg", "upscale_factor": 2}}
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_midjourney_actionRun a follow-up action on a completed Midjourney image job: upsample or variation of one grid image, or inpaint, outpaint (zoom) or pan.WriteRun Midjourney Action
Run a follow-up action on a completed Midjourney image job: upsample or variation of one grid image, or inpaint, outpaint (zoom) or pan. Returns a new job id; the result is in that job. Poll apiframe_job_get. Spends credits.
Inputs
actionstringrequired- upsample or variation (pick a grid image with index), inpaint (needs mask and prompt), outpaint (needs zoom_ratio) or pan (needs direction). Example: upsample.one of
upsamplevariationinpaintoutpaintpan parent_job_idstringrequired- ID of the completed Midjourney job to act on, from apiframe_jobs_list or the generation call. Example: job_01JC8Z3QH5V7K9M2N4P6R8T0W2.
directionstring- For pan: which way to extend the image. Example: left.one of
updownleftright indexinteger- Which of the parent's grid images, for upsample and variation to use, 1 to 4. Example: 1.
maskstring- For inpaint: URL of a mask image (white marks the area to repaint). Example: https://example.com/mask.png.
promptstring- For inpaint: what to paint in the masked area. Example: a red umbrella.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
zoom_rationumber- For outpaint: how far to zoom out, such as 1.5 or 2. Example: 1.5.
apiframe_music_generateStart a music generation job with Suno, Udio, Producer, Lyria 3, ElevenLabs Music or Mureka.WriteGenerate Music
Start a music generation job with Suno, Udio, Producer, Lyria 3, ElevenLabs Music or Mureka. Returns the job id; the tracks (two per call for Suno, Udio, Producer and Mureka) are in the job's result. Poll apiframe_job_get. Spends credits. Use apiframe_suno_action or apiframe_udio_action to extend or remix a result.
Inputs
modelstringrequired- Music model: suno, udio, producer, lyria-3-clip, lyria-3-pro, elevenlabs-music or mureka. Example: suno.
parametersobject- Model-specific options, merged into the request body as the model's params block, such as {"sunoParams": {"custom_mode": true, "title": ..., "style": ..., "instrumental": false, "model_version": "V5"}} or {"udioParams": {...}}, {"lyriaParams": {...}}, {"elevenlabsParams": {...}}. Example: {"sunoParams": {"instrumental": true, "model_version": "V5"}}
promptstring- Description of the song, or its lyrics in Suno custom mode. Example: A cozy cabin in a snowy pine forest at dusk, warm light in the windows, cinematic.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_suno_actionRun a follow-up action on a completed Suno job: extend a track, cover it in a new style, add vocals, or split it into stems.WriteRun Suno Action
Run a follow-up action on a completed Suno job: extend a track, cover it in a new style, add vocals, or split it into stems. Returns a new job id; the result is in that job. Poll apiframe_job_get. Spends credits.
Inputs
actionstringrequired- extend (continue from continue_at), cover (new style, same melody), add_vocals (needs prompt) or stems (split vocals and instrumental). Example: extend.one of
extendcoveradd_vocalsstems parent_job_idstringrequired- ID of the completed Suno job to act on, from apiframe_jobs_list or the generation call. Example: job_01JC8Z3QH5V7K9M2N4P6R8T0W2.
audio_weightnumber- For cover: how closely to follow the original audio, 0 to 1. Example: 0.6.
continue_atnumber- For extend: the second in the track to continue from. Example: 60.
indexinteger- Which of the parent's tracks to use, 1 to 2. Example: 1.
negative_tagsstring- Styles to avoid. Example: heavy metal.
promptstring- Lyrics or description for the new part (required for add_vocals). Example: [Verse] Walking home under city lights.
stylestring- Music style tags for the new track. Example: synthwave, dreamy, female vocals.
titlestring- Title for the new track. Example: City Lights (Extended)
track_idstring- ID of the parent's track to use, from its result.tracks[].id. Use instead of index. Example: trk_9f8e7d6c.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_udio_actionRun a follow-up action on a completed Udio job: extend a song by up to 32 seconds before or after, or remix it.WriteRun Udio Action
Run a follow-up action on a completed Udio job: extend a song by up to 32 seconds before or after, or remix it. Returns a new job id; the result is in that job. Poll apiframe_job_get. Spends credits.
Inputs
actionstringrequired- extend or remix. Example: extend.one of
extendremix parent_job_idstringrequired- ID of the completed Udio job to act on, from apiframe_jobs_list or the generation call. Example: job_01JC8Z3QH5V7K9M2N4P6R8T0W2.
indexinteger- Which of the parent's songs to use, 1 to 2. Example: 1.
lyricsstring- Lyrics for the new section. Example: We run until the morning comes.
modelstring- Udio model version. Example: udio32-v1.5.one of
udio32-v1.5udio32-v1udio32-v2udio130-v1.5udio130-v1 output_lengthnumber- For extend: seconds to add, 1 to 32. Example: 32.
placementstring- For extend: where to add audio. Example: after-add-section.one of
after-add-sectionafter-add-outrobefore-add-sectionbefore-add-intro promptstring- Style description for the new audio. Example: upbeat indie pop with bright guitars.
remix_strengthnumber- For remix: how far from the original, 0.1 to 1. Example: 0.5.
seedinteger- Random seed for reproducible results. Example: 42.
track_idstring- ID of the parent's track to use, from its result.tracks[].id. Use instead of index. Example: trk_9f8e7d6c.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_udio_audio_uploadCopy audio from a public URL to Udio's storage so Udio generations can use it as a style reference or voice.WriteUpload Audio to Udio
Copy audio from a public URL to Udio's storage so Udio generations can use it as a style reference or voice. Returns a job id; its result.url is the handle to pass as udioParams.style_ref.file or udioParams.voice.file. Poll apiframe_job_get for the URL.
Inputs
audio_urlstringrequired- Public URL of the audio file to upload. Example: https://example.com/reference.mp3.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_udio_lyrics_writeHave Udio write song lyrics from a description, without generating audio.WriteWrite Lyrics with Udio
Have Udio write song lyrics from a description, without generating audio. Returns a job id; within seconds its result holds lyrics, instrumental and optional tempo. Poll apiframe_job_get, then pass the lyrics to apiframe_music_generate with model udio.
Inputs
promptstringrequired- What the song is about and its mood. Example: A hopeful song about moving to a new city.
durationinteger- Length of the song you plan to generate, in seconds, so the lyrics fit (about 8 lines at 32 seconds, 30 at 130). Example: 130.
lyricsstring- Partial lyrics to continue or refine. Example: New streets, new lights.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_video_editStart an instruction-based video edit job (restyle, replace or transform a clip) with Wan 2.7 VideoEdit.WriteEdit Video
Start an instruction-based video edit job (restyle, replace or transform a clip) with Wan 2.7 VideoEdit. Returns the job id; the edited video is in the job's result. Poll apiframe_job_get. Spends credits per second; set duration to cap billing.
Inputs
paramsobjectrequired- Wan VideoEdit options: video (URL), and optional reference_image, negative_prompt, resolution (720p or 1080p), aspect_ratio, audio_setting (auto or origin), duration in seconds and seed. Example: {"video": "https://example.com/clip.mp4", "resolution": "720p", "duration": 5}
promptstringrequired- Instruction describing the change to make. Example: Turn the scene into a watercolor painting.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_video_generateStart a video generation job with any supported model: Kling, Veo, Sora, Seedance, Hailuo, Luma, Wan, Runway, Midjourney Video, Grok or Flux.WriteGenerate Video
Start a video generation job with any supported model: Kling, Veo, Sora, Seedance, Hailuo, Luma, Wan, Runway, Midjourney Video, Grok or Flux. Returns the job id; the video URL is in the job's result. Poll apiframe_job_get or set webhook_url. Spends credits, often per second of video. Use apiframe_models_list for model ids.
Inputs
modelstringrequired- Video model id from apiframe_models_list (modality video), such as kling-3.0, veo-3.1, sora-2, seedance-2, hailuo-2.3, luma-ray-2, wan-2.7 or runway-gen4-turbo. Example: kling-3.0.
parametersobject- Model-specific options, merged into the request body as the model's params block, such as {"klingParams": {"duration": 5, "start_image": <url>}}, {"veoParams": {...}}, {"soraParams": {...}} or {"seedanceParams": {...}}. Typical options are duration, aspect_ratio, resolution and a start image for image-to-video. Example: {"klingParams": {"duration": 5, "mode": "standard"}}
promptstring- Text prompt describing what to generate. Example: A cozy cabin in a snowy pine forest at dusk, warm light in the windows, cinematic.
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_video_upscaleStart a Topaz video upscale and frame-interpolation job, up to 4K.WriteUpscale Video
Start a Topaz video upscale and frame-interpolation job, up to 4K. Returns the job id; the upscaled video is in the job's result. Poll apiframe_job_get. Spends credits per second of video.
Inputs
paramsobjectrequired- Topaz Video options: video (URL), target_resolution (720p, 1080p or 4k), target_fps (such as 30 or 60), and optional enhance_model and subject_detection. Example: {"video": "https://example.com/clip.mp4", "target_resolution": "1080p", "target_fps": 30}
webhook_eventsarray- Which events to send to webhook_url: progress, completed and/or failed. Example: ["completed", "failed"]
webhook_urlstring- HTTPS URL Apiframe calls when the job reports progress, completes or fails. Leave empty to poll apiframe_job_get instead. Example: https://example.com/webhooks/apiframe.
apiframe_lora_deleteArchive a LoRA so it stops appearing in listings and can no longer be used.DestructiveArchive LoRA
Archive a LoRA so it stops appearing in listings and can no longer be used. Returns no content (204), also when it was already archived. Use apiframe_loras_list with include_archived true to see archived LoRAs.
- Idempotent
Inputs
lora_idstringrequired- ID of the LoRA to archive, from apiframe_loras_list. Example: lora_01JC9A2B3C4D5E6F7G8H9J0K1L.
No tools match.