首页/ AI 技能 / @skilllib/skill-2117939930272415248
Skill站外收录 @skilllib/skill-2117939930272415248

gamma-install-auth

完成 Gamma API 的集成环境搭建,包括 SDK 安装、API 密钥配置及连接验证,支持在 Node.js 或 Python 项目中快速启用 AI 演示生成功能。

0.0 (0) 21 次安装 原作者 编程导航
收录于 2026-01-22
测试与安全 AI 技能

Skills.MD

# Gamma Install & Auth ## Overview Set up Gamma API and configure authentication credentials for AI-powered presentation generation. ## Prerequisites - Node.js 18+ or Python 3.10+ - Package manager (npm, pnpm, or pip) - Gamma account with API access - API key from Gamma dashboard ## Instructions ### Step 1: Install SDK ```bash # Node.js npm install @gamma/sdk # Python pip install gamma-sdk ``` ### Step 2: Configure Authentication ```bash # Set environment variable export GAMMA_API_KEY="your-api-key" # Or create .env file echo 'GAMMA_API_KEY=your-api-key' >> .env ``` ### Step 3: Verify Connection ```typescript import { GammaClient } from '@gamma/sdk'; const gamma = new GammaClient({ apiKey: process.env.GAMMA_API_KEY }); const status = await gamma.ping(); console.log(status.ok ? 'Connected!' : 'Failed'); ``` ## Output - Installed SDK package in node_modules or site-packages - Environment variable or .env file with API key - Successful connection verification output ## Error Handling | Error | Cause | Solution | |-------|-------|----------| | Invalid API Key | Incorrect or expired key | Verify key in Gamma dashboard | | Rate Limited | Exceeded quota | Check quota at https://gamma.app/docs | | Network Error | Firewall blocking | Ensure outbound HTTPS allowed | | Module Not Found | Installation failed | Run `npm install` or `pip install` again | ## Examples ### TypeScript Setup ```typescript import { GammaClient } from '@gamma/sdk'; const gamma = new GammaClient({ apiKey: process.env.GAMMA_API_KEY, }); ``` ### Python Setup ```python from gamma import GammaClient client = GammaClient( api_key=os.environ.get('GAMMA_API_KEY') ) ``` ## Resources - [Gamma Documentation](https://gamma.app/docs) - [Gamma Dashboard](https://gamma.app/dashboard) - [Gamma API Reference](https://gamma.app/docs/api) ## Next Steps After successful auth, proceed to `gamma-hello-world` for your first presentation generation.

评论 0

还没有评论,来抢沙发。