Skip to content

Add Ideogram.ai API integration for automated blog image generation#77

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-ideogram-api-integration
Draft

Add Ideogram.ai API integration for automated blog image generation#77
Copilot wants to merge 4 commits intomainfrom
copilot/add-ideogram-api-integration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 18, 2026

Adds automated blog post image generation using Ideogram.ai API with comprehensive setup instructions for configuring the API key as a GitHub repository secret.

Implementation

Core Script (scripts/generate-images-with-ideogram.js)

  • Reads existing image-prompts.json and generates images via Ideogram.ai API v3
  • Native Node.js implementation (no additional dependencies)
  • Command-line options: --limit, --year, --skip-existing
  • Built-in rate limiting and error handling

GitHub Secret Setup Documentation

  • QUICKSTART_IDEOGRAM.md - Condensed reference with visual navigation guide
  • IDEOGRAM_API_SETUP.md - Complete setup, usage patterns, and troubleshooting

GitHub Actions Workflow (.github/workflows/generate-blog-images.yml)

  • Manual trigger with configurable batch processing
  • Explicit permissions (contents: write)
  • Auto-commit generated images

Integration

  • Added generate-blog-images npm script to package.json
  • Updated README.md with usage examples
  • Updated scripts/IMAGE-GENERATION-README.md with new automation option

Usage

# Local development
export IDEOGRAM_API_KEY="your_key"
npm run generate-blog-images -- --limit 10 --skip-existing

# GitHub Actions
# Manually trigger workflow from Actions tab
# Or reference secret in custom workflows:
env:
  IDEOGRAM_API_KEY: ${{ secrets.IDEOGRAM_API_KEY }}

GitHub Secret Setup

  1. Obtain API key: https://ideogram.ai → Settings → API Beta → Create API key
  2. Add to repository: Settings → Secrets and variables → Actions → New repository secret
  3. Name: IDEOGRAM_API_KEY
  4. Detailed instructions in QUICKSTART_IDEOGRAM.md

Security

  • CodeQL scan: 0 alerts
  • API key via environment variables/secrets only
  • Explicit workflow permissions
  • Input validation for prompts and URLs
Original prompt

Add a step during blog creation to call out to the ideogram.ai api service to generate an image using my API key. Give me the instructions needed to set up my API key as a GitHub repository secret that can be used when generating


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 18, 2026 23:45
Co-authored-by: martinwoodward <856858+martinwoodward@users.noreply.github.com>
Co-authored-by: martinwoodward <856858+martinwoodward@users.noreply.github.com>
Co-authored-by: martinwoodward <856858+martinwoodward@users.noreply.github.com>
Copilot AI changed the title [WIP] Add step to blog creation for ideogram.ai image generation Add Ideogram.ai API integration for automated blog image generation Jan 18, 2026
Copilot AI requested a review from martinwoodward January 18, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants