⚡ Easiest Option: Interactive Wizard
Let the wizard guide you through setup with automatic browser opening and validation.
npx kai-api-setup
YouTube
1
Go to Google Cloud Console
Create a project and enable the YouTube Data API v3
Open Google Cloud Console2
Create an API Key
In Credentials → Create Credentials → API Key. Copy the key (starts with AIza...)
# Add to your environment
export YOUTUBE_API_KEY=your_key_here
export YOUTUBE_API_KEY=your_key_here
3
Start Using
In Claude, just ask: "Get my YouTube stats for channel UC..."
💡 Tip
The interactive wizard npx kai-api-setup can do steps 1-2 automatically.
Instagram
1
2
Add Instagram Basic Display
In your app, click "Add Product" → "Instagram Basic Display" → "Set Up"
3
Generate Access Token
Go to "User Token Generator" and click "Generate Token"
# Add to your environment
export INSTAGRAM_ACCESS_TOKEN=your_token_here
export INSTAGRAM_ACCESS_TOKEN=your_token_here
Twitter / X
1
Apply for Twitter Developer Account
Sign up at the Twitter Developer Portal
Open Twitter Developer Portal2
Create a Project and App
Go to Dashboard → Create Project → Create App. Get your API Key and Secret.
# Add to your environment
export TWITTER_API_KEY=your_key
export TWITTER_API_SECRET=your_secret
export TWITTER_API_KEY=your_key
export TWITTER_API_SECRET=your_secret
OpenRouter (AI Image Generation)
1
2
Copy your API Key
# Add to your environment
export OPENROUTER_API_KEY=your_key_here
export OPENROUTER_API_KEY=your_key_here
Manual Environment Setup
1
Create .env file
Create a .env file in your project root or home directory
# ~/.kai/.env
YOUTUBE_API_KEY=your_key
INSTAGRAM_ACCESS_TOKEN=your_token
TWITTER_API_KEY=your_key
TWITTER_API_SECRET=your_secret
OPENROUTER_API_KEY=your_key
YOUTUBE_API_KEY=your_key
INSTAGRAM_ACCESS_TOKEN=your_token
TWITTER_API_KEY=your_key
TWITTER_API_SECRET=your_secret
OPENROUTER_API_KEY=your_key
2
Or use shell exports
# Add to ~/.zshrc or ~/.bashrc
export YOUTUBE_API_KEY=xxx
export INSTAGRAM_ACCESS_TOKEN=xxx
export YOUTUBE_API_KEY=xxx
export INSTAGRAM_ACCESS_TOKEN=xxx
3
Reload shell
source ~/.zshrc # or ~/.bashrc