AI Media Maker Docs
Sample Projects

Sample Project 1

Generate AI images programmatically using the AI Media Maker API.

Sample Project 1

Generate AI images programmatically using the AI Media Maker Cloud API.

Overview

This sample demonstrates how to use the AI Media Maker API to generate images from text prompts in a Node.js application.

Demo

See the live demo at maker.cappuai.com/playground.

How It Works

  1. Authenticate - Use your API key to authenticate requests
  2. Submit Prompts - Send an array of text prompts to the API
  3. Poll for Results - Check the job status until images are ready

Code Example

const API_KEY = process.env.AI_MEDIA_MAKER_API_KEY;

// Submit prompts for image generation
const response = await fetch('https://maker.cappuai.com/api/playground/images', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompts: ['A sunset over the ocean', 'A futuristic cityscape']
  }),
});

const { jobId } = await response.json();
console.log('Job started:', jobId);

Resources

On this page