Skip to main content

Overview

The Kaspa Developer Platform (KDP) API uses API keys to authenticate requests. You can get your API key by signing up at developer.kas.fyi.

Using Your API Key

Include your API key in the x-api-key header with each request:
Keep your API key secure and never expose it in client-side code or public repositories.

Example Usage

JavaScript/TypeScript

Python

Go

Best Practices

  1. Store API keys securely: Use environment variables or secure key management services
  2. Rotate keys regularly: Generate new API keys periodically for better security
  3. Monitor usage: Keep track of your API usage to avoid hitting rate limits
  4. Use HTTPS only: Always make requests over HTTPS to protect your API key

Error Handling

If your API key is missing or invalid, you’ll receive a 401 Unauthorized response:
or