OpenAI SDK
Install
Set up the client
Set OPENAI_BASE_URL and OPENAI_API_KEY in the environment instead, and OpenAI() picks them up with no arguments. Useful for tools built on the SDK that don’t expose a base URL setting.
What works
Errors and retries
The SDK raises its usual exceptions with Flow AI’s message and code, for example openai.APIStatusError with status 402 for a low balance. It retries 429 and 5xx by itself. See Errors.