Authentication

Overview

Authentication is required for all Kie.ai API requests. We use a secure Bearer Token authentication system to ensure API access is properly authorized.

Getting Your API Key

To access the API services, you'll need to:

  1. Visit the API Key Management Page
  2. Sign in to your Kie.ai account
  3. Generate your unique API key
  4. Copy and store your key securely
⚠️ IMPORTANT

Your API key gives direct access to your account and resources. Never share it publicly or include it in client-side code.

Using Your API Key

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Example Request with Bearer Token

curl -X POST https://api.kie.ai/api/v1/gpt4o-image/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A cute cat playing in a garden",
    "aspectRatio": "1:1"
  }'