AI providers
FX runs a workflow's own code with no provider at all. A step that calls an AI model (an image, a
clip, a 3D model, structured text) runs on a route, model@provider, and a live run needs
that provider's key, or its program for Codex. This page lists the ways to set one up and what each
one serves.
| Path | What you set up | What it serves | Who bills |
|---|---|---|---|
| No provider | nothing | your own code and the built-in local steps | nobody |
| Your own Codex | Codex, signed in to ChatGPT | images | your ChatGPT plan; $0 to FX |
| Grida Gateway | GG_API_KEY | text, agent turns, images, video, 3D models and rigs | your organization's Grida AI credits |
| Your own keys | each provider's key | that provider's routes | each provider's account |
You can mix them: a project picks a route per capability in fx.yaml, and a step can name its own
route:. grida fx doctor says which keys FX found, where, and which routes a live run could
serve (Running).
No provider
FX is a workflow engine first. Your Python nodes, the built-in local steps (image.resize,
json.merge, package, …) and file facts run with no key and without --live, and a run of them
is cached and recorded like any other. Without --live, a step that would call a provider is
refused for nothing, so you can build and test the rest of a workflow first, or answer paid calls
with stand-ins.
Your own Codex
With Codex installed and signed in to your ChatGPT account,
the route imagegen@codex draws and edits images with no API key. Codex counts each image against
your plan; FX books it at $0, and a run whose calls are all on Codex needs no --max-usd.
It serves images only (image.generate and image.edit), and Codex picks the model and the
quality. Setup and caveats, sizes above all: Images from your own Codex.
Grida Gateway
One key serves every route on Grida Gateway (@gg). Create it at
console.grida.co, where you also add credits and see
what each call was charged, then set it:
GG_API_KEY=…
in the environment, or in a .env file in your project (keep it out of version control). FX books
a GG call at what GG charged for it (providers.md §9.7).
The key needs both scopes, text for text and agent steps and media for everything else.
GG's own API reference, written for people and agents alike, is
gateway.grida.ai/llms.txt: key scopes, credits, spending
caps and limits.
GG serves text and agent turns, images, video, and 3D models and rigs. It does not serve sound, speech or music: those routes need their provider's own key (below).
Your own provider keys
Every other route takes its provider's key under its usual name. Set only the ones your routes use; a missing key refuses only the calls that need it, before anything is sent.
| Provider | Variable | Built-in routes for | Get a key |
|---|---|---|---|
| OpenAI | OPENAI_API_KEY | images | platform.openai.com |
| OpenRouter | OPENROUTER_API_KEY | text, agent turns, images, music | openrouter.ai |
| fal | FAL_KEY | images, video | fal.ai |
| Tripo | TRIPO_API_KEY | 3D models and rigs | platform.tripo3d.ai |
| ElevenLabs | ELEVENLABS_API_KEY | sound effects, speech | elevenlabs.io |
OPENAI_BASE_URL, OPENROUTER_BASE_URL, FAL_BASE_URL, ELEVENLABS_BASE_URL and GG_BASE_URL
point a provider at another address, such as a proxy. How FX reads keys and the .env file:
Keys and live runs.
The built-in routes
| Capability | Grida Gateway | Codex | Your own keys |
|---|---|---|---|
structured.generate, agent.turn | ✓ | OpenRouter | |
image.generate, image.edit | ✓ | ✓ | OpenAI, OpenRouter, fal |
video.generate | ✓ | fal | |
mesh.generate, mesh.rig | ✓ | Tripo | |
music.generate | OpenRouter | ||
sound.generate, speech.generate | ElevenLabs |
The routes themselves, with their models and planning prices, are in FX's built-in route table:
grida fx nodes <type> lists a capability's routes, and grida fx doctor says which ones a live
run could serve. A project can add or restate routes in its own route_tables:
(where prices come from).