Browse docs

Getting Started

Tap to expand

Contribute

StartUpdated 2026-03-18

Sign Up, Create a Project, and Get an API Key

Get the minimum account and credential setup in place before you touch the API, SDK, or MCP flow.

This page is for the first-time developer who has not set up RetainDB yet. The goal is simple: finish with one project and one API key that you can immediately use from a server or terminal.

What you need to leave with

Before you move on, you should have all three:

  • a RetainDB account
  • a project you can name and recognize later
  • an API key you can use from server-side code

For most people, the dashboard is the fastest and least error-prone way to get started.

  1. Sign in at useRetainDB.dev.
  2. Create a new project.
  3. Copy the API key created for that project.
  4. Store it in a server-side environment variable such as RETAINDB_API_KEY.

Use a project name that will still make sense a month from now. my-app-prod is better than test-1.

Warning
Treat the API key like a password. Keep it out of client-side code, browser bundles, screenshots, and shared snippets.

If you need to do this programmatically

Create a project:

bash
curl -X POST "https://api.retaindb.com/v1/projects" \
  -H "Authorization: Bearer $RETAINDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "retaindb-quickstart"
  }'

Create or rotate a key through the keys API when your environment requires it:

bash
curl -X POST "https://api.retaindb.com/v1/keys" \
  -H "Authorization: Bearer $RETAINDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "server-key"
  }'

Where to keep the key

Use an environment variable on the server:

bash
export RETAINDB_API_KEY="rdb_..."
export RETAINDB_PROJECT="my-project"

RETAINDB_PROJECT is your default project slug or id. Set it once and the SDK and MCP tools will use it automatically — no need to pass project in every call.

If you are using a framework or deployment platform, use its secret-management mechanism rather than committing credentials to the repo.

Which auth model to use

Before making requests, decide which surface you are calling from:

  • server or backend job: use the API key
  • browser or dashboard-authenticated surface: use the authenticated caller model described in auth caller model

Verify your setup

The fastest verification is to run the 5 minute quickstart immediately after creating the project and key.

Next step

Continue with 5 minute quickstart if you want a manual proof of value, or Setup Wizard if you want a guided flow.

Was this page helpful?

Your feedback helps us prioritize docs improvements weekly.