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

# API keys

export const AdminBadge = ({size = "md"}) => {
  return <Tooltip tip="Workspace owners and administrators can execute this action." cta="Workspace roles" href="/admin/users/access-control">
            <Badge icon="shield-check" color="blue" size={size}>admin</Badge>
        </Tooltip>;
};

export const Framed = ({image, background, link, alt = "Framed content", borderWidth = "24px", outerRadius = "10px", innerRadius = "6px"}) => {
  const parseShorthand = value => {
    const values = String(value).trim().split(/\s+/);
    switch (values.length) {
      case 1:
        return [values[0], values[0], values[0], values[0]];
      case 2:
        return [values[0], values[1], values[0], values[1]];
      case 3:
        return [values[0], values[1], values[2], values[1]];
      default:
        return values.slice(0, 4);
    }
  };
  const isZero = v => parseFloat(v) === 0;
  const padding = parseShorthand(borderWidth);
  const outer = parseShorthand(outerRadius);
  const cornerMasks = [];
  if (isZero(padding[0]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 0%, transparent ${outer[0]}, black ${outer[0]})`);
  }
  if (isZero(padding[0]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 0%, transparent ${outer[1]}, black ${outer[1]})`);
  }
  if (isZero(padding[2]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 100%, transparent ${outer[2]}, black ${outer[2]})`);
  }
  if (isZero(padding[2]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 100%, transparent ${outer[3]}, black ${outer[3]})`);
  }
  const backgroundMask = cornerMasks.length > 0 ? cornerMasks.join(", ") : undefined;
  const innerImage = <img src={image} alt={alt} noZoom={link ? true : false} style={{
    display: "block",
    width: "100%",
    margin: 0,
    borderRadius: 0
  }} />;
  return <div style={{
    display: "inline-block",
    position: "relative",
    borderRadius: outerRadius,
    overflow: "hidden"
  }}>
            {}
            {background && <div style={{
    position: "absolute",
    inset: 0,
    backgroundImage: `url(${background})`,
    backgroundSize: "cover",
    maskImage: backgroundMask,
    WebkitMaskImage: backgroundMask,
    maskComposite: "intersect",
    WebkitMaskComposite: "source-in"
  }} />}
            {}
            <div style={{
    position: "relative",
    padding: borderWidth
  }}>
                <div style={{
    borderRadius: innerRadius,
    overflow: "hidden",
    lineHeight: 0
  }}>
                    {link ? <a href={link}>{innerImage}</a> : innerImage}
                </div>
            </div>
        </div>;
};

<Framed background="https://assets.mirurobotics.com/docs/v04/images/apikeys/background.jpeg" image="https://assets.mirurobotics.com/docs/v04/images/apikeys/header:page.png" borderWidth="28px" innerRadius="10px" outerRadius="12px" />

API keys allow you to authenticate to the Miru [Platform API](/developers/platform-api/overview) as well as the Miru CLI in your [CI pipeline](/developers/ci/overview).

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

## Create an API key  <AdminBadge />

To create an API key, navigate to the [Secrets page](https://app.mirurobotics.com/settings/secrets) in the dashboard and click **New API Key** in the top right.

<Frame>
  ![Create API Key Dialog](https://assets.mirurobotics.com/docs/v04/images/apikeys/create-dialog.png)
</Frame>

Provide a name for the API key, select the desired scopes, then click **Create**. For a full reference of available scopes, see the Platform API [Authorization](/developers/platform-api/authz) page.

Once an API key has been created, it can never be retrieved again. If you lose your API key, you must create a new one.

## View API keys

To view your existing API keys, navigate to the [Secrets page](https://app.mirurobotics.com/settings/secrets).

<Frame>
  ![API Keys Page](https://assets.mirurobotics.com/docs/v04/images/apikeys/page.png)
</Frame>

To see the scopes of an API key, hover over the information icon in the **Scopes** column of the API key you want to view.

<Frame>
  ![API Key Scopes Popup](https://assets.mirurobotics.com/docs/v04/images/apikeys/scopes-popup.png)
</Frame>

## Delete an API key  <AdminBadge />

Deleting an API key immediately revokes it. Attempting to authenticate with a deleted API key will fail. Furthermore, deleting an API key is irreversible. Once an API key is deleted, it cannot be recovered.

To delete an API key, click the ellipsis (...) on the API key you want to delete and select **Delete**.

<Frame>
  ![API Key Ellipses Dropdown](https://assets.mirurobotics.com/docs/v04/images/apikeys/ellipses-dropdown.png)
</Frame>

A confirmation dialog will appear. Hit **Delete** to confirm the deletion.

<Frame>
  ![API Key Delete Dialog](https://assets.mirurobotics.com/docs/v04/images/apikeys/delete-dialog.png)
</Frame>
