Xquik uses API key authentication for all developer-facing endpoints.Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
API Key Format
Keys follow this format:- Prefix:
xq_ - Body: 64 hexadecimal characters
- Storage: Hashed in database (raw key never stored)
Using your API key
Pass the key in thex-api-key header:
Auth methods by endpoint
Most endpoints support dual authentication: either an API key or a session cookie from the dashboard.API key only
GET /account accepts x-api-key. Use it to check plan, monitor quota, and credit balance from server-side integrations.Session cookie only
POST /api-keys, GET /api-keys, and DELETE /api-keys/{id} require a dashboard session cookie.Account and billing
PATCH /account, PUT /account/x-identity, and POST /subscribe accept either x-api-key or a dashboard session cookie.Events and webhooks
* /monitors/*, GET /events/*, * /webhooks/*, and GET /webhooks/{id}/deliveries accept either auth method.Data and X actions
* /draws/*, * /extractions/*, * /x/*, POST /x/media/download, * /x-accounts/*, and * /x-write/* accept either auth method.Content tools and support
GET /trends, GET /radar, * /styles/*, * /drafts/*, POST /compose, and * /support/* accept either auth method.Use a dashboard session cookie to create the first API key. Existing API keys and OAuth bearer tokens can manage keys for the same account.
The MCP server also supports OAuth 2.1 with PKCE for browser-based clients (Claude.ai, ChatGPT Developer Mode). See OAuth 2.1 for the complete flow.
Machine Payments Protocol
31 X-API read-only endpoints also accept MPP payments instead of API key authentication. When you call an eligible endpoint without an API key or session cookie, the server returns a 402 payment challenge.Challenge header
| Parameter | Description |
|---|---|
id | Unique challenge identifier |
realm | Protection space (xquik.com) |
method | Payment method (tempo) |
intent | Payment intent (charge or session) |
request | Base64url-encoded JSON with amount, currency, and recipient |
Credential header
After completing the payment, retry the request with a payment credential:Receipt header
Settled responses include a receipt:Eligible endpoints
See the MPP overview for the full list of 31 endpoints, pricing, and intent types.MPP only applies to eligible X-API read-only endpoints. Media downloads, private reads, write actions, and all other endpoints require an API key or session cookie.
Key management
Create a Key
Generate keys from the API Keys page in your dashboard or via the API (session auth only):Create API Key
fullKey) is returned once in the creation response. Store it securely.
Revoke a Key
Revoke API Key
Error response
Invalid or missing API key returns:401 Unauthorized
Security best practices
Store keys in environment variables
Store keys in environment variables
Never hardcode API keys in your source code. Use environment variables to keep keys separate from your codebase:Access the key in your application:
.env
Never commit keys to version control
Never commit keys to version control
Add If a key is accidentally committed, revoke it immediately from your dashboard and generate a new one. Consider the exposed key compromised even if you force-push to remove it from history.
.env to your .gitignore to prevent accidental commits:.gitignore
Rotate keys regularly
Rotate keys regularly
Rotate API keys periodically to limit the impact of a potential leak:
- Create a new key from the dashboard
- Update the key in all your environments
- Verify all services work with the new key
- Revoke the old key
Use separate keys for development & production
Use separate keys for development & production
Create distinct API keys for each environment. This limits blast radius if a development key is compromised and makes it easier to track usage per environment:Name your keys descriptively (e.g., “Production - Backend”, “Staging”, “Local Dev”) so you can identify them in the dashboard.
.env.local
.env.production
Next steps: Quickstart for a complete setup walkthrough, or OAuth Overview for OAuth 2.1 integration.