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

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

String body = """
{
  "model": "openai/gpt-image-1",
  "prompt": "A minimalist poster of a lighthouse at dawn"
}
""";

Object response = client.createImage(body);
System.out.println(String.valueOf(response));
Last modified on May 6, 2026