Skip to main content

Setup

import app.phaseo.sdk.Phaseo;

String apiKey = System.getenv("PHASEO_API_KEY");
Phaseo client = new Phaseo(apiKey);

Pattern

Common wrapper calls look like this:
Object response = client.createChatCompletion("""
{
  "model": "openai/gpt-5-nano",
  "messages": [
    { "role": "user", "content": "Say hello from Java" }
  ]
}
""");
Wrapper methods return parsed JSON nodes for most JSON endpoints, and byte arrays for file/video content helpers.
  • Use app.phaseo.sdk.Phaseo for the common gateway surfaces first.
  • Drop to app.phaseo.gen.Client and app.phaseo.gen.Operations only when you need a lower-level operation that has not been promoted to the wrapper yet.
  • Start from the endpoint-specific examples in this section for the current wrapper method names.
Last modified on July 9, 2026