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

# Create an API Key

> Autorender gives every workspace a public key for uploading and lets you create private keys for everything else. Manage both in the dashboard.

Every request to the Autorender API carries an API key. Your workspace has two kinds, and the difference is what each one is allowed to do:

| | Public key | Private key |
| - | - | - |
| **Can do** | Upload files | Everything: upload, list, read, rename, delete |
| **Safe in browser or mobile code** | Yes | **No** — server-side only |
| **How many** | Exactly one, created with your workspace | As many as your plan allows |
| **Visibility** | Always visible in the dashboard | Shown once, when you create it |
| **Can be deleted** | No | Yes |

The short version: **the public key uploads, a private key does the rest.** If you are writing browser or mobile code, use the public key. If you are writing server code, use a private key.

Find both on the **API Keys** page — sign in to [Autorender](https://app.autorender.io) and click **API Keys** under **Configurations** in the sidebar. Only workspace owners can view or manage keys.

## The public key

Your public key already exists — Autorender creates one with your workspace, and you cannot delete it. It is displayed in full on the API Keys page, and you can copy it as often as you like.

It is safe to ship inside a web page or a mobile app, because uploading is all it can do. Anyone who views your page source can read it, and the worst they can do with it is upload a file to your workspace.

```tsx Uploader in the browser theme={null}
<AutorenderUploader
  apiKey="your-public-key"
  folderPath="uploads"
/>
```

Everything else is refused. Listing files, reading file details, renaming, deleting, and the optimizer proxy all return `403` for a public key:

```json 403 response theme={null}
{
  "success": false,
  "error": "This endpoint requires a private API key.",
  "message": "Your public key can only be used to upload. Create a private key in Configurations → API Keys and use it from your server for this operation."
}
```

> [!NOTE]
>
> Seeing that `403` means the code doing the work belongs on your server with a private key — not that the public key is broken.

Because uploading is the only thing it permits, the public key needs no rotation and cannot be revoked. It is subject to the same per-endpoint rate limits as any other key.

## Private keys

A private key can do everything the API offers, so it must stay on your server. Treat it like a password: anyone holding it can read, rename, and delete files in your workspace.

**1. Click Add private key.**

Name the key after where it will be used — `Production server`, `CI pipeline`, `Staging` — so you can tell your keys apart later. The name is optional, and you can rename a key any time.

**2. Save the key immediately.**

Autorender shows the full key once, in a **Save your private key** dialog. Click **Copy** or **Download**, then confirm **I've Saved It**.

> [!WARNING]
>
> This is the only time the full key is shown. Autorender stores only a hash of it, so it cannot be displayed again — close the dialog without saving and you will have to create another key.

Your plan sets how many private keys a workspace can hold, and the page shows how many you have used. Free workspaces get 2, Build 10, and Scale has no limit. At the cap, delete a key you no longer need or upgrade your plan — the public key does not count toward it.

### Use a private key in your code

**1. Store it as an environment variable.**

Never hardcode a private key, and never expose it to the browser. Put it in `.env`:

```bash .env theme={null}
AUTORENDER_API_KEY=your-private-key
```

Add `.env` to `.gitignore` if it isn't already, so the key never lands in version control. Most frameworks do this for you.

> [!WARNING]
>
> Do not use a `NEXT_PUBLIC_`, `VITE_`, or `REACT_APP_` prefix for a private key. Those prefixes ship the value to the browser, where anyone can read it. Client-side code takes the public key instead.

**2. Pass it to your client.**

```typescript {4} theme={null}
import Autorender from '@autorender/nodejs';

const client = new Autorender({
  apiKey: process.env.AUTORENDER_API_KEY,
});
```

Every backend SDK follows this pattern — see [SDKs](https://autorender.io/docs/resources/sdks.md) for your language.

**3. Or call the API directly.**

Send the key in either header:

```text theme={null}
Authorization: Bearer YOUR_PRIVATE_KEY
```

```text theme={null}
x-api-key: YOUR_PRIVATE_KEY
```

### Rename or delete a private key

On the **API Keys** page, each private key has a pencil icon to rename it and a trash icon to delete it.

> [!WARNING]
>
> Deleting a key takes effect immediately and cannot be undone. Anything still using it starts failing with `401` right away, so if the key is live in production, deploy a replacement first and delete the old key afterward.

## Which key does my integration need?

| What you are building | Key |
| - | - |
| Uploader in a web page, React, Vue, Angular, Svelte, or mobile app | Public |
| Backend code in Node.js, Python, Java, .NET, or Ruby | Private |
| Listing, renaming, or deleting files from anywhere | Private |
| WordPress, Shopify, Astro, or Webflow plugin | Private |
| [Sanity](https://autorender.io/docs/integrations/sanity.md) or [Strapi](https://autorender.io/docs/integrations/strapi.md) plugin | Private |
| MCP server | Private |

Connecting a plugin with a public key is refused at connect time with a message telling you to use a private key, rather than connecting and then failing on every asset request.

## Workspace ID

The same page shows your **Workspace ID** above the keys. It identifies your workspace — quote it when contacting support — and grants nothing on its own, so it is not a credential and needs no protection.

## Next steps

> [card] [Run quickstart](https://autorender.io/docs/introduction.md)
>
> Turn your key into a transformed delivery URL.

> [card] [View authentication reference](https://autorender.io/docs/api-reference/introduction.md)
>
> Header formats, key scopes, and error responses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.