> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenshotly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Capture your first screenshot with Screenshotly in under 5 minutes. Sign up, get your API key, and make your first request.

<Steps>
  <Step title="Create an account">
    Sign up at [app.screenshotly.dev/register](https://app.screenshotly.dev/register). No credit card required — the free plan includes 100 screenshots per month.
  </Step>

  <Step title="Get your API key">
    After registering, go to [API settings](https://app.screenshotly.dev/settings/api) in your dashboard. Copy your API key and store it securely — you'll need it for every request.

    <Warning>
      Never expose your API key in client-side code or public repositories. Store it in environment variables.
    </Warning>

    ```bash theme={null}
    export SCREENSHOTLY_API_KEY="your-api-key-here"
    ```
  </Step>

  <Step title="Capture your first screenshot">
    Choose your preferred method:

    <CodeGroup>
      ```javascript JavaScript SDK theme={null}
      import { Screenshotly } from 'screenshotly-js';

      const client = new Screenshotly(process.env.SCREENSHOTLY_API_KEY);

      const screenshot = await client.capture({
        url: 'https://example.com',
        viewport_width: 1280,
        viewport_height: 800,
        format: 'png'
      });

      if (screenshot.success) {
        console.log('Screenshot URL:', screenshot.data.imageUrl);
      }
      ```

      ```python Python theme={null}
      import requests
      import os

      response = requests.post(
          'https://api.screenshotly.dev/v1/capture',
          headers={
              'X-API-Key': os.environ['SCREENSHOTLY_API_KEY'],
              'Content-Type': 'application/json'
          },
          json={
              'url': 'https://example.com',
              'options': {
                  'format': 'png',
                  'viewport_width': 1280,
                  'viewport_height': 800,
                  'response_type': 'json'
              }
          }
      )

      data = response.json()
      print('Image URL:', data['data']['image_url'])
      ```

      ```bash cURL theme={null}
      curl -X POST https://api.screenshotly.dev/v1/capture \
        -H "X-API-Key: $SCREENSHOTLY_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "url": "https://example.com",
          "options": {
            "format": "png",
            "viewport_width": 1280,
            "viewport_height": 800
          }
        }' \
        --output screenshot.png
      ```
    </CodeGroup>

    By default, the API returns the screenshot as a binary image. To get a JSON response with metadata, set `response_type` to `json`:

    ```json theme={null}
    {
      "success": true,
      "data": {
        "id": "67b8a1c2d3e4f5a6b7c8d9e0",
        "url": "https://example.com",
        "image_url": "https://cdn.screenshotly.dev/screenshots/67b8a1c2d3e4f5a6b7c8d9e0.png",
        "status": "completed",
        "metadata": {
          "file_size": 245760,
          "format": "png",
          "dimensions": { "width": 1280, "height": 800 }
        }
      },
      "remaining_credits": 99
    }
    ```
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Full-page captures" icon="scroll" href="/guides/full-page-captures">
    Capture entire scrollable pages.
  </Card>

  <Card title="Device emulation" icon="mobile" href="/guides/viewports-and-devices">
    Simulate mobile devices and custom viewports.
  </Card>

  <Card title="Batch processing" icon="layer-group" href="/guides/batch-processing">
    Capture multiple URLs in one request.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/capture-screenshot">
    See all available parameters.
  </Card>
</CardGroup>
