---
title: "Instant Database"
description: "Get a working ZeroDB project with API key in one request — no signup required. Zero-auth database provisioning."
canonical: "https://docs.ainative.studio/docs/api/instant-db"
last-updated: "2026-10-22T17:48:46.689Z"
---

# Instant Database

Source: https://docs.ainative.studio/docs/api/instant-db

> Get a working ZeroDB project with API key in one request — no signup required. Zero-auth database provisioning.

## Instant Database

Get a working ZeroDB project with API key in **one request** — no signup, no auth, no credit card.

Perfect for prototyping, hackathons, tutorials, and AI agents that need immediate database access.

---

## Create Instant DB

<APIEndpoint method="POST" path="/api/v1/public/instant-db" />

**No authentication required.**

```bash
curl -X POST https://api.ainative.studio/api/v1/public/instant-db
```

```python
import requests

response = requests.post("https://api.ainative.studio/api/v1/public/instant-db")
db = response.json()

print(f"API Key: {db['api_key']}")
print(f"Project ID: {db['project_id']}")
print(f"Expires: {db['expires_at']}")
```

```javascript
const response = await fetch("https://api.ainative.studio/api/v1/public/instant-db", {
  method: "POST"
});
const db = await response.json();

console.log(`API Key: ${db.api_key}`);
console.log(`Project ID: ${db.project_id}`);
```

**Response:**

```json
{
  "api_key": "tmp_a1b2c3d4...",
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "base_url": "https://api.ainative.studio",
  "expires_at": "2026-04-25T12:00:00Z",
  "claim_token": "clm_xyz789..."
}
```

:::tip Authenticated Users Get Permanent Keys
If you include an `Authorization` header with a valid JWT, the returned key uses the `sk_` prefix instead of `tmp_`, and the project is auto-assigned to your Default Workspace. No claiming required.
:::

| Field | Description |
|-------|-------------|
| `api_key` | API key — `tmp_` prefix if unauthenticated, `sk_` prefix if authenticated |
| `project_id` | Your project UUID |
| `base_url` | API base URL for all ZeroDB operations |
| `expires_at` | Expiration (72 hours from creation, N/A for authenticated) |
| `claim_token` | Token to convert to permanent project (unauthenticated only) |

**Limits:**
- 5 instant databases per IP per day
- Projects expire after 72 hours unless claimed
- Free tier storage limits apply

---

## Claim Your Project

Convert a temporary instant-db into a permanent project owned by your account.

<APIEndpoint method="POST" path="/api/v1/public/instant-db/claim" auth />

```bash
curl -X POST https://api.ainative.studio/api/v1/public/instant-db/claim \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "550e8400-e29b-41d4-a716-446655440000",
    "claim_token": "clm_xyz789..."
  }'
```

**Response:**

```json
{
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "api_key": "zdb_live_newpermanentkey...",
  "status": "claimed",
  "owner_id": "your-user-id"
}
```

The temporary `tmp_` key is replaced with a permanent `zdb_live_` key. All data is preserved.

### Merge a Temp Identity

If you already have data under a `tmp_` key and later created a real account, merge the temp identity into your real account:

<APIEndpoint method="POST" path="/api/v1/auth/merge-identity" auth />

```bash
curl -X POST https://api.ainative.studio/api/v1/auth/merge-identity \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"temp_api_key": "tmp_your_temp_key..."}'
```

This transfers all projects and API keys from the temp identity to your real account and deactivates the temp user.

---

## Use With ZeroDB CLI

```bash
## Create instant DB and configure CLI in one step
npx zerodb-cli init --instant

## Or manually
npx zerodb-cli init
## Paste the api_key and project_id when prompted
```

---

## Use With MCP Servers

```json
{
  "mcpServers": {
    "zerodb": {
      "command": "npx",
      "args": ["-y", "ainative-zerodb-memory-mcp"],
      "env": {
        "ZERODB_API_KEY": "sk_your_project_key...",
        "ZERODB_PROJECT_ID": "550e8400-..."
      }
    }
  }
}
```

---

## For AI Agents

Instant DB enables **zero-human provisioning** — agents can create their own database without any user interaction:

1. `POST /api/v1/public/instant-db` — get credentials
2. Use credentials to store vectors, memory, files, or tables
3. When the user signs up, claim the project to make it permanent — or use `POST /auth/merge-identity` to absorb temp data into the real account

:::warning MCP Config and `tmp_` Keys
The MCP config endpoint (`GET /api/v1/public/mcp/config`) rejects `tmp_` keys for authenticated users (returns 400 `TEMP_KEY_NOT_ALLOWED`). Use your project-scoped `sk_` or `zdb_live_` key instead.
:::

This is the foundation of AINative's **agentic experience (AX)** — agents operate autonomously without waiting for human setup.
