Skip to main content
Method: client.createImageEdit(...)
import ai.stats.sdk.AIStats;

AIStats client = new AIStats(System.getenv("AI_STATS_API_KEY"));

String body = """
{
  "model": "openai/gpt-image-1",
  "prompt": "Make this image warmer",
  "image": "data:image/png;base64,..."
}
""";

Object response = client.createImageEdit(body);
System.out.println(String.valueOf(response));
The preview Java client sends JSON request bodies directly. For advanced multipart workflows, use direct REST calls until higher-level helpers are added.
Last modified on May 6, 2026