cred.diy/ docs
    Sign inGet an API key
    All documentation

    Authentication - cred.diy API documentation

    Authentication

    All API requests require authentication using your API key. Generate API keys from the API Keys page in your dashboard.

    API Key Format

    API keys are prefixed with sk_live_ or sk_test_ for identification. Keep your API keys secure and rotate them regularly.

    Secret Keys — Full access, use on server-side only

    Request Headers

    x-api-key: sk_live_your_api_key

    API Key Management

    • • Create multiple API keys for different environments
    • • Set expiration dates (30 days to 1 year) for enhanced security
    • • Expired keys are highlighted and stop working automatically
    • • Revoke keys instantly if compromised
    • • Track last usage time for each key

    Rate Limiting

    API requests are limited to 100 requests per minute per API key. Rate limit information is included in response headers:

    • • X-RateLimit-Limit — Maximum requests per window (100)
    • • X-RateLimit-Remaining — Requests remaining

    If you exceed the limit, a 429 Too Many Requests response is returned. Implement exponential backoff in your client.

    Platform Credits (CRD)

    Each API call costs 1 platform credit (CRD). Your CRD balance is displayed in the dashboard header and is independent of your project credit types. If your CRD balance is depleted, API calls return 402 Payment Required. Top up from the Billing page.

    Your first credit is one request away.

    Create a project, copy an API key, and issue a credit from your server.