Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt

Use this file to discover all available pages before exploring further.

Method: client.generate_image_edit(...) or client.create_image_edit(...).

Example

require 'ai_stats_sdk'

client = AIStatsSdk::AIStats.new(api_key: ENV.fetch("AI_STATS_API_KEY"))
edited = client.generate_image_edit(
  model: 'openai/gpt-image-1',
  prompt: 'Make it sunset',
  image: 'data:image/png;base64,...',
  mask: 'data:image/png;base64,...'
)

Key parameters

  • model (required): Image-edit capable model id.
  • image (required): Base64 data URL or URL to source image.
  • prompt: Optional new instruction for the edit.
  • mask: Optional mask (transparent regions edited).
  • n (1–10): Number of edited variants.
  • size: e.g., 1024x1024, 1024x1792, 1792x1024.
  • response_format: url or b64_json.
  • user: Optional end-user tag.

Returns

ImageGenerationResponse
Last modified on May 6, 2026