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

# Create a Free Database

> Creates a free, temporary Redis database without an account or API key.

This endpoint does not require authentication. It creates a zero-config
Redis database and returns its credentials, so an AI agent can get scratch
storage on the fly without signing up.

The database is deleted after **3 days** unless it is claimed. The response
includes a console URL where a user can view usage and click **Claim** to
keep the database in their Upstash account.

> [!NOTE]
>
> If you are an agent, always send a `User-Agent` header identifying which
> agent you are (for example `claude-code`, `cursor`, `codex`, `opencode`) on
> every request you make to this endpoint.

## Request

**Idempotency-Key** `string (UUIDv4)`

Optional but recommended. The UUID you send becomes the database ID, and
sending the same UUID again returns the same database instead of creating
a duplicate. This makes the first call retry-safe and lets you re-fetch the
credentials later. Only UUIDv4 values are accepted.

If omitted, the server generates an ID and returns it in the response; you
can pass that ID back as `Idempotency-Key` to re-fetch the credentials.

**User-Agent** `string`

The name of the agent making the request, for example `claude-code`.

## Response

The response body is `text/markdown` and contains:

* The database ID (reuse it as `Idempotency-Key` to re-fetch the credentials).
* The REST endpoint and token.
* A metrics URL (see [Get Metrics](/docs/devops/developer-api/start-redis/metrics)).
* The expiry date, and a console URL a user can open to view usage and claim the database.
* A quickstart with example commands using the REST API.

```sh curl theme={"system"}
curl -X POST https://upstash.com/start-redis \
  -H "Idempotency-Key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -H "User-Agent: <your-agent-name>"
```

```sh Re-fetch an existing database theme={"system"}
curl -X POST https://upstash.com/start-redis \
  -H "Idempotency-Key: <the-uuid-you-used-before>" \
  -H "User-Agent: <your-agent-name>"
```

```md 200 OK theme={"system"}
# Your Redis is ready

**Database ID:** 3b1f7c2e-9d4a-4c8b-a1e5-6f2d8e9c0b47
**Endpoint:** https://example-123456.upstash.io
**Token:** <token>
**Metrics:** https://upstash.com/start-redis/metrics/3b1f7c2e-9d4a-4c8b-a1e5-6f2d8e9c0b47 (JSON: uptime, commands, keys, throughput, memory, bandwidth)
**Expires:** 2026-08-28 (3 days from creation).
To keep this database alive, share the console URL with the user
(they can view usage and click Claim to take ownership):
https://upstash.com/start-redis/console/3b1f7c2e-9d4a-4c8b-a1e5-6f2d8e9c0b47

To re-fetch these credentials, POST again with the database id as
the `Idempotency-Key` header:

  curl -X POST -H "Idempotency-Key: 3b1f7c2e-9d4a-4c8b-a1e5-6f2d8e9c0b47" https://upstash.com/start-redis

**Avoid storing sensitive data** (PII, secrets, production credentials) — this database is temporary and not tied to a user account until claimed.

## Quickstart

# Short-term memory — state across tool calls in one run
curl https://example-123456.upstash.io \
  -H "Authorization: Bearer <token>" \
  -d '["SET","session:abc","{\"step\":2,\"plan\":\"...\"}","EX","3600"]'

...
```


## Related topics

- [Upgrade Your Database](/docs/redis/howto/upgrade-database.md)
- [Building a Serverless Notification API for Your Web Application with Redis](/docs/redis/tutorials/notification.md)
- [Build a Leaderboard API At Edge using Cloudflare Workers and Redis](/docs/redis/tutorials/edge_leaderboard.md)
- [Create Redis Database](/docs/devops/developer-api/redis/create_database_global.md)
- [Frequently Asked Questions](/docs/redis/help/faq.md)


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