# RankAndWrite API Quickstart

RankAndWrite exposes protected API endpoints for tool runs and account reads.

## Base URL

https://rankandwrite.com

## Discovery

- API catalog: https://rankandwrite.com/.well-known/api-catalog
- OpenAPI: https://rankandwrite.com/openapi.json
- OAuth metadata: https://rankandwrite.com/.well-known/oauth-authorization-server
- Protected resource metadata: https://rankandwrite.com/.well-known/oauth-protected-resource
- Agent auth guide: https://rankandwrite.com/auth.md
- Health: https://rankandwrite.com/api/v1/health

## Authentication

Use a RankAndWrite API key as a Bearer token:

```
Authorization: Bearer YOUR_API_KEY
```

Create a key from Dashboard > API Keys after your account is approved for API access.

## Core Endpoints

- `GET /api/v1/health`
- `POST /api/v1/tools/{action}`
- `GET /api/v1/account/credits`
- `GET /api/v1/account/usage`

## Example

```bash
curl -X POST "https://rankandwrite.com/api/v1/tools/grammar-check" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Draft copy to review."}'
```

## Notes

- Browser sessions and admin features are not exposed here.
- Rate limits and credits still apply.
- For higher-volume or partner access, start with https://rankandwrite.com/auth.md.
