An API key ties requests to your TheFluxTrain account. Generations, folders, and Flow Studio data created through the API belong to you, the same as when you use the website.
Revoked or expired keys return 403 Unauthorised.
Keys can only be created or revoked while you are signed in on the website. The API itself does not create new keys.
Send your key on every request in the x-api-key header:
x-api-key: YOUR_API_KEY
Full URL example:
POST https://api.thefluxtrain.com/api/v1/image-generate/generate
x-api-key: YOUR_API_KEY
Content-Type: application/json
See Authentication for details and error handling.
For terminal use, prefer CLI sign-in (tft login). The CLI creates and stores an API key for you after you authorize at thefluxtrain.com/cli/authorize. You can still create keys manually here for other integrations.