GraphN serves open models behind an OpenAI-compatible API. If you already use an OpenAI SDK, change two things: the base URL and the API key. New accounts start with $1 of inference credit.
1. Create an API key
In the app, open API keys at the bottom of the sidebar and create a key. Keys start with gn_ and belong to one workspace; requests made with a key are billed to that workspace's organization.
brew tap voltagepark/graphn && brew install graphn
graphn login
graphn model chat qwen3-80b -m"Hello"
graphn model chat without -m starts an interactive session. See Developing with agents for other install options.
3. Pick a model
The model field takes the model's callable name, such as qwen3-80b or deepseek-v4.1-flash. Models lists every built-in model with its context window, and each links to a page with pricing. To list the models your key can call:
Models you import or deploy yourself are called the same way, as imported:<id> or custom:<id>. The Playground in the app runs any of them and shows the matching request in its Code view.
Streaming
Set stream to receive the reply as server-sent events, one chunk at a time:
python
stream = client.chat.completions.create( model="qwen3-80b", messages=[{"role":"user","content":"Write a haiku about GPUs."}], stream=True,)for chunk in stream:if chunk.choices and chunk.choices[0].delta.content:print(chunk.choices[0].delta.content, end="", flush=True)
Images
Vision models take OpenAI-style content parts. An image can be an https URL or a data: URL:
python
response = client.chat.completions.create( model="qwen3-vl", messages=[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":"https://example.com/photo.jpg"}},],}],)
Parameters beyond the OpenAI SDK
Some models take parameters the OpenAI SDK does not define, such as top_k or a thinking switch. In Python, pass them through extra_body: