npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

firemoon-ai-sdk-provider

v0.0.0

Published

AI SDK provider for Firemoon Studio - image and video generation

Readme

AI SDK - Firemoon Provider

The Firemoon provider for the AI SDK contains image and video generation support for the Firemoon Studio API.

Setup

The Firemoon provider is available in the firemoon-ai-sdk-provider module. You can install it with:

npm i firemoon-ai-sdk-provider

Provider Instance

You can import the default provider instance firemoon from firemoon-ai-sdk-provider:

import { firemoon } from 'firemoon-ai-sdk-provider';

Configuration

If you need to configure the provider, you can use the createFiremoon function:

import { createFiremoon } from 'firemoon-ai-sdk-provider';

const firemoon = createFiremoon({
  apiKey: 'your-api-key', // defaults to FIREMOON_API_KEY environment variable
  baseURL: 'https://firemoon.studio/api', // optional, defaults to Firemoon Studio API
});

Usage

Image Generation

Generate images using FLUX models:

import { firemoon } from 'firemoon-ai-sdk-provider';
import { experimental_generateImage as generateImage } from 'ai';

const { image } = await generateImage({
  model: firemoon.image('flux/dev'),
  prompt: 'A serene mountain landscape at sunset',
});

const filename = `image-${Date.now()}.png`;
fs.writeFileSync(filename, image.uint8Array);
console.log(`Image saved to ${filename}`);

Advanced Image Generation

Pass additional options using providerOptions:

const { image } = await generateImage({
  model: firemoon.image('flux/dev'),
  prompt: 'A futuristic city with flying cars',
  size: 'landscape_16_9',
  providerOptions: {
    firemoon: {
      guidance_scale: 7.5,
      num_inference_steps: 35,
      seed: 12345,
    },
  },
});

Multiple Images

Generate multiple images in a single request:

const { images } = await generateImage({
  model: firemoon.image('flux/dev'),
  prompt: 'A beautiful sunset',
  n: 4, // Generate 4 images
});

images.forEach((image, index) => {
  fs.writeFileSync(`image-${index}.png`, image.uint8Array);
});

Video Generation

Generate videos using Kling models:

const result = await generateImage({
  model: firemoon.image('kling/kling-2-1-master'),
  prompt: 'A butterfly emerging from its chrysalis',
  providerOptions: {
    firemoon: {
      duration: '5',
      aspect_ratio: '16:9',
    },
  },
});

Supported Models

Image Models

  • FLUX Models

    • flux/dev - Fast, high-quality image generation
    • flux/schnell - Rapid image generation
    • flux/pro - Professional-grade images
  • Ideogram Models

    • ideogram/v3 - Advanced image generation
    • ideogram/v3-turbo - Fast ideogram generation
    • ideogram/v3-character-edit - Character editing

Video Models

  • Kling Models

    • kling/kling-2-1-master - Professional video generation
    • kling/kling-1-6 - Video generation
  • Minimax Models

    • minimax/hailuo-02 - Creative AI content
    • minimax/video-01 - Video generation
  • Google Veo Models

    • google/veo-3-fast - Fast video generation

Model Options

Common Options

All models support these options via providerOptions.firemoon:

  • seed (number) - Random seed for reproducible results
  • num_images (number) - Number of images to generate (1-4)

Image Model Options

FLUX and Ideogram models support:

  • image_size (string) - Image dimensions: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9
  • guidance_scale (number) - How closely to follow the prompt (1-20)
  • num_inference_steps (number) - Number of denoising steps (1-50)

Video Model Options

Kling and video models support:

  • duration (string) - Video duration in seconds
  • aspect_ratio (string) - Video aspect ratio: 16:9, 9:16, 1:1

Authentication

You need a Firemoon Studio API key to use this provider. You can obtain one from:

  1. Sign in to Firemoon Studio
  2. Navigate to the API Keys page
  3. Create a new API key

Set your API key as an environment variable:

export FIREMOON_API_KEY=your_api_key_here

Or pass it directly when creating the provider:

const firemoon = createFiremoon({
  apiKey: 'your_api_key_here',
});

Error Handling

The provider handles various error scenarios:

  • 401 Unauthorized - Invalid or missing API key
  • 403 Forbidden - Access denied or insufficient credits
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Generation failed

Example error handling:

try {
  const { image } = await generateImage({
    model: firemoon.image('flux/dev'),
    prompt: 'A beautiful landscape',
  });
} catch (error) {
  console.error('Generation failed:', error.message);
}

Documentation

For more information about Firemoon Studio:

For more information about the AI SDK:

Support

Need help? Contact Firemoon Studio at [email protected]