# Pixelrope auth.md

How AI agents and MCP clients get access to a Pixelrope account.

## Audience

Agents acting for a Pixelrope user: MCP clients (Claude, Cursor, ChatGPT connectors…) and apps that call the API on
the user's behalf. Every action runs as that user and spends their credits.

## Register

OAuth 2.0 Dynamic Client Registration (RFC 7591), no prior account needed for the client:
`POST https://pixelrope.com/api/auth/oauth2/register` with `client_name`, `redirect_uris`, and `token_endpoint_auth_method: "none"` for public
clients. Metadata: https://pixelrope.com/api/auth/.well-known/oauth-authorization-server.

## Methods

- Authorization code with PKCE (S256): the user signs in at Pixelrope and approves the client on the consent screen.
- Refresh tokens with the `offline_access` scope.
- Resource indicator (RFC 8707): request `resource=https://pixelrope.com/mcp`; access tokens carry it as `aud`.

Protected resource metadata (RFC 9728): https://pixelrope.com/.well-known/oauth-protected-resource

## Use the credential

Send `Authorization: Bearer <access_token>` with each JSON-RPC `POST https://pixelrope.com/mcp` (MCP Streamable HTTP, stateless).
Tools: list_models, get_model_schema, get_balance, generate, get_generation, list_generations. Output files come
back as signed links valid for 24 hours.

Users can revoke a client at any time by signing out of it or contacting support@pixelrope.com.
