> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Your API Key

> Get started with Memories.ai Visual Search by creating your first API key.

## Welcome to Visual Search 🚀

Visual Search lets you upload videos and images, indexes them automatically, and search them by natural language, image, or transcript phrase. To get started, you'll need to create an API key.

<Info>
  **Quick Start**: Create your API key in under 2 minutes and start indexing your video and image content.
</Info>

## Platform Overview

Visual Search organises your content into three libraries:

<CardGroup cols={3}>
  <Card title="Private Video Library" icon="video">
    Videos you upload. Searchable only by your account.
  </Card>

  <Card title="Private Image Library" icon="image">
    Images you upload. Separate from the video library — different upload and search endpoints.
  </Card>

  <Card title="Public Video Library" icon="globe">
    Pre-indexed public TikTok / YouTube / Instagram videos. Shared across all API users.
  </Card>
</CardGroup>

## Creating Your API Key

Follow these simple steps to create your API key and start indexing:

<Steps>
  <Step title="Access Console">
    Navigate to the [Memories.ai Console](https://api-platform.memories.ai/) to get started.

    <Note>
      The console provides a unified interface for managing your API keys, monitoring usage, and configuring webhooks.
    </Note>
  </Step>

  <Step title="Sign In or Create an Account">
    Choose your preferred authentication method:

    <CardGroup cols={2}>
      <Card title="Memories.ai Account" icon="user">
        Sign in with your existing Memories.ai credentials
      </Card>

      <Card title="Google" icon="google">
        Sign in with your Google account
      </Card>

      <Card title="Apple" icon="apple">
        Sign in with your Apple ID
      </Card>

      <Card title="Microsoft" icon="microsoft">
        Sign in with your Microsoft account
      </Card>
    </CardGroup>
  </Step>

  <Step title="Navigate to API Key Management">
    Once logged in:

    1. Go to the **Payment** section in the left sidebar
    2. Scroll down to **API Key Management**
    3. Click the **Create Key** button

    <Tip>
      You can create multiple API keys for different projects or environments (development, staging, production).
    </Tip>
  </Step>

  <Step title="Copy and Secure Your API Key">
    After creating your key:

    * Copy your API key immediately (it looks like `sk-mavi-xxxxx...`)
    * Store it securely (you won't be able to see it again)
    * Never commit it to version control or share it publicly

    <Warning>
      **Security Best Practice**: Treat your API key like a password. Store it in environment variables or a secure key management system.
    </Warning>
  </Step>
</Steps>

## Using Your API Key

Once you have your API key, include it in the `Authorization` header of every Visual Search request. Note: **no `Bearer` prefix** — pass the raw `sk-mavi-...` string.

<CodeGroup>
  ```python Python theme={null}
  import requests

  BASE_URL = "https://api.memories.ai/serve/api/v1"
  API_KEY = "sk-mavi-your-actual-key-here"

  headers = {"Authorization": API_KEY}

  # Upload a video to your Private Video Library
  with open("meeting.mp4", "rb") as f:
      response = requests.post(
          f"{BASE_URL}/upload",
          headers=headers,
          files={"file": ("meeting.mp4", f, "video/mp4")},
          # optional: data={"folder_id": 671631448308117504}  # omit -> Default folder
      )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'sk-mavi-your-actual-key-here';
  const BASE_URL = 'https://api.memories.ai/serve/api/v1';

  const formData = new FormData();
  formData.append('file', fileInput.files[0]);
  // optional: formData.append('folder_id', '671631448308117504');  // omit -> Default folder

  fetch(`${BASE_URL}/upload`, {
    method: 'POST',
    headers: {
      'Authorization': API_KEY
    },
    body: formData
  })
    .then(response => response.json())
    .then(data => console.log(data));
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.memories.ai/serve/api/v1/upload" \
    -H "Authorization: sk-mavi-your-actual-key-here" \
    -F "file=@meeting.mp4"
  ```
</CodeGroup>

## Developer Platform Features

With your API key, you also get access to the broader Memories.ai console:

<AccordionGroup>
  <Accordion title="Usage Tracking" icon="chart-line">
    Monitor your API usage in real-time:

    * Track API calls by endpoint
    * View token usage for AI models
    * Monitor storage consumption
    * Analyse usage patterns
  </Accordion>

  <Accordion title="Webhook Management" icon="webhook">
    Set up webhooks for async workflows:

    * Configure webhook endpoints for long-running scraper / parse tasks
    * Receive notifications when indexing completes
    * Monitor callback records and success rates
    * Retry failed webhook deliveries
  </Accordion>

  <Accordion title="Payment & Billing" icon="credit-card">
    Manage your account billing:

    * Recharge your account using Stripe
    * View transaction history
    * Track monthly spending
    * Set up budget alerts
  </Accordion>

  <Accordion title="Task Management" icon="list-check">
    Track long-running tasks end-to-end:

    * Monitor video parsing / indexing jobs
    * Check social-media scraper task status
    * View library growth over time
    * Access completed task results
  </Accordion>

  <Accordion title="Asset Management" icon="folder">
    Manage your indexed media:

    * Browse uploaded videos and images
    * View asset metadata and processing status
    * Download or delete assets
    * Track storage usage
  </Accordion>
</AccordionGroup>

## What's Next?

Now that you have your API key, start building:

<CardGroup cols={2}>
  <Card title="Upload Your First Video" icon="upload" href="/visual-search/upload-video-from-file">
    Send a video to your Private Video Library and wait for it to reach `PARSE` status.
  </Card>

  <Card title="Search by Text" icon="magnifying-glass" href="/visual-search/search-by-text">
    Find moments across your indexed library using natural-language queries.
  </Card>

  <Card title="Import from Social Media" icon="share-nodes" href="/visual-search/upload-from-post-urls">
    Import TikTok / YouTube / Instagram posts by URL, creator profile, or hashtag.
  </Card>

  <Card title="Library Management" icon="folder" href="/visual-search/list-videos">
    List, get metadata for, download, or delete the videos in your indexed library.
  </Card>
</CardGroup>

## Need Help?

<CardGroup cols={2}>
  <Card title="API Documentation" icon="book" href="https://api-tools.memories.ai/">
    Explore the complete API reference across all three products.
  </Card>

  <Card title="Contact Support" icon="headset" href="mailto:contact@memories.ai">
    Get help from our support team.
  </Card>

  <Card title="Developer Console" icon="laptop-code" href="https://api-platform.memories.ai/">
    Access your dashboard and manage API keys.
  </Card>

  <Card title="Share Feedback" icon="comments">
    We'd love to hear your thoughts and suggestions!
  </Card>
</CardGroup>
