> **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 ApiFlash

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

**Authentication:** API Key
**Categories:** Developer Tools
**Tools:** 2: 1 read, 1 write, 0 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=APIFLASH)

## 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 ApiFlash connection

   In **AgentKit > Connections**, create an ApiFlash 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 = 'apiflash'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize ApiFlash:', 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: 'apiflash_quota_get',
     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 = "apiflash"
   identifier = "user_123"

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

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

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their ApiFlash 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: 'apiflash_quota_get',
  toolInput: {},
  connector: 'apiflash',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="apiflash_quota_get",
    tool_input={},
    connection_name="apiflash",
    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.

### `apiflash_quota_get`

Get Quota · Read-only

Get the screenshot quota for the current billing period.
Returns limit, remaining and reset (UTC epoch seconds when the quota resets).
Use this before large batches of Capture Screenshot calls.

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

Inputs: none.

Example input: `{}`

### `apiflash_screenshot_capture`

Capture Screenshot · Write

Capture a screenshot of a web page with headless Chrome, with options for size, format, full page, waits, element or area crops, injected CSS or JS, ad and cookie-banner blocking, and geolocation.
Returns JSON with url (a link to the image) and, when requested, extracted_html and extracted_text links.
Use this to capture a page. Each new capture uses one call from the monthly quota; cached repeats do not. Use Get Quota to check the remaining calls.

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

Inputs:

- `url` (`string`, required): Full URL of the web page to capture, including http:// or https://. Example: https://example.com.
- `accept_language` (`string`, optional): Accept-Language header to send to the target site, to capture a localized page. Example: fr-FR.
- `accuracy` (`integer`, optional): Geolocation accuracy in meters (default 0). Example: 50.
- `cookies` (`string`, optional): Cookies to set as name=value pairs separated by semicolons. Example: session=abc123;lang=en.
- `crop` (`string`, optional): Area to capture as left,top,width,height in pixels. Example: 10,20,500,300 captures 500 x 300 px starting 10 px from the left and 20 px from the top.
- `css` (`string`, optional): CSS to inject into the page before capture. Example: .cookie-banner{display:none}
- `delay` (`integer`, optional): Seconds to wait after the page loads before capturing, 0 to 10 (default 0). Prefer wait_for or wait_until. Example: 2.
- `element` (`string`, optional): CSS selector of one element to capture instead of the viewport. Ignored when full_page is true. Example: .pricing-table.
- `element_overlap` (`boolean`, optional): Set true to also capture elements that overlap the element chosen in element. Example: true.
- `extract_html` (`boolean`, optional): Set true to also return a link to the page's HTML (extracted_html). Example: true.
- `extract_text` (`boolean`, optional): Set true to also return a link to the page's visible text (extracted_text). Example: true.
- `fail_on_status` (`string`, optional): Comma-separated HTTP status codes or ranges from the target page that should fail the call instead of returning a screenshot. Example: 404,500-511.
- `format` (`string`, optional): Image format of the screenshot: jpeg (default), png or webp. Example: png. One of: `jpeg`, `png`, `webp`.
- `fresh` (`boolean`, optional): Set true to force a new capture instead of returning a cached screenshot. Example: true.
- `full_page` (`boolean`, optional): Set true to capture the whole scrollable page instead of only the viewport. Example: true.
- `headers` (`string`, optional): Extra request headers for the target site as name=value pairs separated by semicolons. Example: X-Test=1;X-Env=staging.
- `height` (`integer`, optional): Viewport height in pixels (default 1080, up to 16350). Ignored when full_page is true. Example: 800.
- `ip_location` (`string`, optional): Two-letter ISO country code for the proxy IP used to capture (custom enterprise plans only). Example: de.
- `js` (`string`, optional): JavaScript to run in the page before capture. Example: document.querySelector('.modal').remove();
- `latitude` (`number`, optional): Latitude to emulate for geolocation, -90 to 90. Use with longitude. Example: 48.8566.
- `longitude` (`number`, optional): Longitude to emulate for geolocation, -180 to 180. Use with latitude. Example: 2.3522.
- `no_ads` (`boolean`, optional): Set true to block ads and hide common ad spaces. Example: true.
- `no_cookie_banners` (`boolean`, optional): Set true to hide cookie banners and consent pop-ups. Example: true.
- `no_tracking` (`boolean`, optional): Set true to block tracking scripts so the capture does not count as a page view. Example: true.
- `proxy` (`string`, optional): Proxy to capture through, as address:port or user:password@address:port. Example: 203.0.113.10:8080.
- `quality` (`integer`, optional): Image quality from 0 to 100 for jpeg and webp (default 80). Example: 90.
- `scale_factor` (`integer`, optional): Device scale factor: 1 (standard, default) or 2 (retina, larger file). Example: 2. One of: `1`, `2`.
- `scroll_page` (`boolean`, optional): Set true to scroll through the page before capture, to trigger lazy-loaded images and animations. Example: true.
- `thumbnail_width` (`integer`, optional): Width in pixels of a thumbnail to return instead of the full-size image, keeping the aspect ratio. Ignored when full_page is true. Example: 400.
- `time_zone` (`string`, optional): IANA time zone to emulate. Example: Europe/Paris.
- `transparent` (`boolean`, optional): Set true to keep a transparent background (png only; the page body background must be transparent). Example: true.
- `ttl` (`integer`, optional): Seconds to cache the screenshot, 0 to 2592000 (default 86400). Repeat calls with the same parameters return the cached image and do not use quota. Example: 3600.
- `user_agent` (`string`, optional): User-Agent header to send, to emulate a device or browser. Example: Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X).
- `wait_for` (`string`, optional): CSS selector to wait for before capturing; the call fails if nothing matches within 15 seconds. Example: #main-content.
- `wait_until` (`string`, optional): When the page counts as loaded: dom_loaded (HTML parsed), page_loaded (all resources loaded) or network_idle (default; no open network connections). Example: page_loaded. One of: `dom_loaded`, `page_loaded`, `network_idle`.
- `wait_until_timeout` (`integer`, optional): Maximum seconds to wait for the wait_until condition, 1 to 30 (default 30); the page is captured as-is after that. Example: 10.
- `width` (`integer`, optional): Viewport width in pixels (default 1920, up to 16350; width x height must stay under 33,177,600). Example: 1280.

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

## Related

Other Developer Tools connectors ([all 200](/agentkit/connectors/?category=developer-tools)):

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools
- [Linear](/agentkit/connectors/linear/): Scalekit connector, OAuth, 64 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 |
