ideogram-multi-env-setup
Configure and isolate Ideogram API settings and keys across different software development environments.
Install
mkdir -p .claude/skills/ideogram-multi-env-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5433" && unzip -o skill.zip -d .claude/skills/ideogram-multi-env-setup && rm skill.zipInstalls to .claude/skills/ideogram-multi-env-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Configure Ideogram across development, staging, and production environments.Key capabilities
- →Isolate API keys per environment
- →Configure environment-specific model and speed settings
- →Implement secure secret management
How it works
The workflow detects the current environment and retrieves the corresponding API key and configuration settings, ensuring isolation between development, staging, and production.
Inputs & outputs
When to use ideogram-multi-env-setup
- →Isolating dev and prod API keys
- →Configuring environment-specific caches
- →Setting up CI/CD secret management
- →Defining per-environment timeouts
- →Managing model/speed settings
About this skill
Ideogram Multi-Environment Setup
Overview
Configure Ideogram API access across development, staging, and production with isolated API keys, environment-specific model/speed settings, and proper secret management. Each environment gets its own key and configuration to prevent cross-environment issues.
Environment Strategy
| Environment | API Key Source | Model | Speed | Cache | Billing |
|---|---|---|---|---|---|
| Development | .env.local | V_2_TURBO | TURBO | Disabled | Minimal top-up |
| Staging | CI/CD secrets | V_2 | DEFAULT | 5 min TTL | Moderate |
| Production | Secret manager | V_2 or V3 | DEFAULT | 10 min TTL | Full auto top-up |
Instructions
Step 1: Configuration Structure
// config/ideogram.ts
type Environment = "development" | "staging" | "production";
interface IdeogramConfig {
apiKey: string;
defaultModel: string;
renderingSpeed: string;
timeout: number;
maxRetries: number;
concurrency: number;
cache: { enabled: boolean; ttlSeconds: number };
debug: boolean;
}
const configs: Record<Environment, Omit<IdeogramConfig, "apiKey">> = {
development: {
defaultModel: "V_2_TURBO",
renderingSpeed: "TURBO",
timeout: 30000,
maxRetries: 1,
concurrency: 2,
cache: { enabled: false, ttlSeconds: 60 },
debug: true,
},
staging: {
defaultModel: "V_2",
renderingSpeed: "DEFAULT",
timeout: 60000,
maxRetries: 3,
concurrency: 5,
cache: { enabled: true, ttlSeconds: 300 },
debug: false,
},
production: {
defaultModel: "V_2",
renderingSpeed: "DEFAULT",
timeout: 60000,
maxRetries: 5,
concurrency: 8,
cache: { enabled: true, ttlSeconds: 600 },
debug: false,
},
};
export function getIdeogramConfig(): IdeogramConfig {
const env = detectEnvironment();
const apiKey = getApiKeyForEnv(env);
if (!apiKey) {
throw new Error(`IDEOGRAM_API_KEY not set for environment: ${env}`);
}
return { ...configs[env], apiKey };
}
function detectEnvironment(): Environment {
const env = process.env.NODE_ENV || "development";
if (env === "production") return "production";
if (env === "staging" || process.env.VERCEL_ENV === "preview") return "staging";
return "development";
}
function getApiKeyForEnv(env: Environment): string {
const envVar = {
development: "IDEOGRAM_API_KEY_DEV",
staging: "IDEOGRAM_API_KEY_STAGING",
production: "IDEOGRAM_API_KEY",
}[env];
return process.env[envVar] || process.env.IDEOGRAM_API_KEY || "";
}
Step 2: Environment Files
# .env.local (development -- git-ignored)
IDEOGRAM_API_KEY_DEV=your-dev-key
NODE_ENV=development
# .env.staging (CI only)
IDEOGRAM_API_KEY_STAGING=your-staging-key
NODE_ENV=staging
# Production: use secret manager, never .env files
Step 3: Secret Management by Platform
set -euo pipefail
# --- GitHub Actions ---
gh secret set IDEOGRAM_API_KEY_STAGING --env staging
gh secret set IDEOGRAM_API_KEY --env production
# --- AWS Secrets Manager ---
aws secretsmanager create-secret \
--name ideogram/staging/api-key \
--secret-string "your-staging-key"
aws secretsmanager create-secret \
--name ideogram/production/api-key \
--secret-string "your-production-key"
# --- GCP Secret Manager ---
echo -n "your-staging-key" | gcloud secrets create ideogram-api-key-staging --data-file=-
echo -n "your-production-key" | gcloud secrets create ideogram-api-key-prod --data-file=-
Step 4: GitHub Actions with Environment Secrets
# .github/workflows/deploy.yml
jobs:
deploy-staging:
runs-on: ubuntu-latest
environment: staging
env:
IDEOGRAM_API_KEY_STAGING: ${{ secrets.IDEOGRAM_API_KEY_STAGING }}
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- run: npm run deploy:staging
deploy-production:
runs-on: ubuntu-latest
environment: production
needs: deploy-staging
env:
IDEOGRAM_API_KEY: ${{ secrets.IDEOGRAM_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- run: npm run deploy:production
Step 5: Startup Validation
import { z } from "zod";
const configSchema = z.object({
apiKey: z.string().min(10, "API key too short"),
defaultModel: z.enum(["V_1", "V_1_TURBO", "V_2", "V_2_TURBO", "V_2A", "V_2A_TURBO"]),
timeout: z.number().min(5000).max(120000),
concurrency: z.number().min(1).max(10),
});
// Validate at application startup
try {
const config = configSchema.parse(getIdeogramConfig());
console.log(`Ideogram configured for ${detectEnvironment()} (model: ${config.defaultModel})`);
} catch (err: any) {
console.error("Ideogram config invalid:", err.message);
process.exit(1);
}
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Wrong environment detected | Missing NODE_ENV | Set in deployment platform |
| Secret not found | Wrong variable name | Check env-specific key name |
| Cross-env data leak | Shared API key | Create separate keys per env |
| Staging using prod key | No env isolation | Validate key identity at startup |
Output
- Environment-aware configuration with separate API keys
- Secret management for GitHub Actions, AWS, and GCP
- Startup validation preventing misconfiguration
- CI/CD pipeline with environment gates
Resources
Next Steps
For deployment patterns, see ideogram-deploy-integration.
When not to use it
- →Using shared API keys across environments
- →Storing production secrets in .env files
Prerequisites
Limitations
- →Requires distinct API keys for each environment
- →Startup validation fails if configuration is incomplete
How it compares
This approach prevents cross-environment pollution by enforcing strict secret management and environment-specific configuration schemas.
Compared to similar skills
ideogram-multi-env-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ideogram-multi-env-setup (this skill) | 1 | 27d | Review | Intermediate |
| swarm-act | 0 | 1mo | Review | Advanced |
| miniprogram-development | 37 | 2mo | No flags | Intermediate |
| azure-functions | 10 | 5mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
swarm-act
ethersphere
Guide to Swarm ACT encryption and access control: create grantees, upload protected data, grant/revoke access, and troubleshoot not-found/history issues.
miniprogram-development
TencentCloudBase
WeChat Mini Program development rules. Use this skill when developing WeChat mini programs, integrating CloudBase capabilities, and deploying mini program projects.
azure-functions
aj-geddes
Create serverless functions on Azure with triggers, bindings, authentication, and monitoring. Use for event-driven computing without managing infrastructure.
firebase
davila7
Firebase gives you a complete backend in minutes - auth, database, storage, functions, hosting. But the ease of setup hides real complexity. Security rules are your last line of defense, and they're often wrong. Firestore queries are limited, and you learn this after you've designed your data model. This skill covers Firebase Authentication, Firestore, Realtime Database, Cloud Functions, Cloud Storage, and Firebase Hosting. Key insight: Firebase is optimized for read-heavy, denormalized data. I
blockchain-developer
sickn33
Build production-ready Web3 applications, smart contracts, and decentralized systems. Implements DeFi protocols, NFT platforms, DAOs, and enterprise blockchain integrations. Use PROACTIVELY for smart contracts, Web3 apps, DeFi protocols, or blockchain infrastructure.
file-uploads
davila7
Expert at handling file uploads and cloud storage. Covers S3, Cloudflare R2, presigned URLs, multipart uploads, and image optimization. Knows how to handle large files without blocking. Use when: file upload, S3, R2, presigned URL, multipart.