Skip to main content
SDKs are in very early alpha: We’re working as hard as we can to get them into a stable state. Please bear with us as we iterate rapidly.

Installation

pip install phaseo

Requirements

  • Python 3.10+

Setup

API key

Create an API key in the Phaseo Dashboard.

Environment variable

export PHASEO_API_KEY="phaseo_v1_sk_<kid>_<secret>"

Basic usage

from phaseo import Phaseo
import os

client = Phaseo(api_key=os.environ["PHASEO_API_KEY"])

response = client.generate_text(
    {
        "model": "openai/gpt-5-nano",
        "messages": [{"role": "user", "content": "Hello!"}],
    }
)

print(response["choices"][0]["message"]["content"])

Optional client configuration

from phaseo import Phaseo

client = Phaseo(
    api_key="your-api-key",
    base_url="https://api.phaseo.ai/v1",
    timeout=30.0,
)

Next steps

Last modified on July 9, 2026