Skip to content

davila7/claude-code-templates / cli-tool/components/skills/database/using-neon

using-neon

Flagged

Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/auth), PostgREST-style data API (@neondatabase/neon-js), Neon CLI, and Neon's Platform API/SDKs. Use for any Neon-related questions.

references/neon-platform-api.md

View on GitHub
# Neon Platform API

The Neon Platform API allows you to manage Neon projects, branches, databases, and resources programmatically. You can use the REST API directly or through official SDKs.

## Options

| Method         | Package/URL                         | Best For                        |
| -------------- | ----------------------------------- | ------------------------------- |
| REST API       | `https://console.neon.tech/api/v2/` | Any language, direct HTTP calls |
| TypeScript SDK | `@neondatabase/api-client`          | Node.js, TypeScript projects    |
| Python SDK     | `neon-api`                          | Python scripts and applications |
| CLI            | `neonctl`                           | Terminal-based management       |

## Documentation

```bash
# REST API documentation
curl -H "Accept: text/markdown" https://neon.tech/docs/reference/api-reference

# TypeScript SDK
curl -H "Accept: text/markdown" https://neon.tech/docs/reference/typescript-sdk

# Python SDK
curl -H "Accept: text/markdown" https://neon.tech/docs/reference/python-sdk

# CLI
curl -H "Accept: text/markdown" https://neon.tech/docs/reference/neon-cli
```

For the interactive API reference: https://api-docs.neon.tech/reference/getting-started-with-neon-api

## Sub-Resources

For detailed information, reference the appropriate sub-resource:

### REST API Details

| Topic                         | Resource                         |
| ----------------------------- | -------------------------------- |
| Guidelines, Auth, Rate Limits | `neon-rest-api/guidelines.md`    |
| Projects                      | `neon-rest-api/projects.md`      |
| Branches, Databases, Roles    | `neon-rest-api/branches.md`      |
| Compute Endpoints             | `neon-rest-api/endpoints.md`     |
| API Keys                      | `neon-rest-api/keys.md`          |
| Operations                    | `neon-rest-api/operations.md`    |
| Organizations                 | `neon-rest-api/organizations.md` |

### SDKs

| Language   | Resource                 |
| ---------- | ------------------------ |
| TypeScript | `neon-typescript-sdk.md` |
| Python     | `neon-python-sdk.md`     |

## Quick Start

### Authentication

All API requests require a Neon API key:

```bash
Authorization: Bearer $NEON_API_KEY
```

### API Key Types

| Type           | Scope                           | Best For                      |
| -------------- | ------------------------------- | ----------------------------- |
| Personal       | All projects user has access to | Individual use, scripting     |
| Organization   | Entire organization             | CI/CD, org-wide automation    |
| Project-scoped | Single project only             | Project-specific integrations |

### Rate Limits

- 700 requests per minute (~11 per second)
- Bursts up to 40 requests per second per route
- Handle `429 Too Many Requests` with retry/backoff

## Common Operations Quick Reference

| Operation          | REST API                                   | TypeScript SDK              | Python SDK            |
| ------------------ | ------------------------------------------ | --------------------------- | --------------------- |
| List Projects      | `GET /projects`                            | `listProjects({})`          | `projects()`          |
| Create Project     | `POST /projects`                           | `createProject({...})`      | `project_create(...)` |
| Get Connection URI | `GET /projects/{id}/connection_uri`        | `getConnectionUri({...})`   | `connection_uri(...)` |
| Create Branch      | `POST /projects/{id}/branches`             | `createProjectBranch(...)`  | `branch_create(...)`  |
| Start Endpoint     | `POST /projects/{id}/endpoints/{id}/start` | `startProjectEndpoint(...)` | `endpoint_start(...)` |

## Error Handling

| Status | Meaning      | Action                       |
| ------ | ------------ | ---------------------------- |
| 401    | Unauthorized | Check API key                |
| 404    | Not Found    | Verify resource ID           |
| 429    | Rate Limited | Implement retry with backoff |
| 500    | Server Error | Retry or contact support     |
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall