Skip to main content
Method: Operations.createChatCompletion(...)
import ai.stats.gen.Operations;

String body = """
{
  "model": "openai/gpt-5-nano",
  "messages": [
    { "role": "user", "content": "Write a one-line haiku." }
  ]
}
""";

Object response = Operations.createChatCompletion(client, null, null, null, body);
System.out.println(String.valueOf(response));
Last modified on March 16, 2026