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
Best Practices
- Store API keys securely: Use environment variables or secure key management services
- Rotate keys regularly: Generate new API keys periodically for better security
- Monitor usage: Keep track of your API usage to avoid hitting rate limits
- 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