> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Java SDK Usage

> How to initialize and use the Java SDK wrapper.

## Setup

```java theme={null}
import app.phaseo.sdk.Phaseo;

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

## Pattern

Common wrapper calls look like this:

```java theme={null}
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.

## Recommended

* 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.
