TheFluxTrain gives you hosted APIs so you can generate images, video, audio, and text from your own products, workflows, or automations. Everything runs on our servers — you call the API over HTTPS; you do not download or run TheFluxTrain code on your machine.
Base URL: https://api.thefluxtrain.com/api/v1
Authenticate with an API key in the x-api-key header on every request. See Authentication.
thefluxtrain-cli and run API commands from your terminal. See CLI for install and sign-in.Creative walkthroughs and examples live in Tutorials. This section is reference for setup and API calls.
Successful JSON responses use this shape:
{
"data": { },
"error": null,
"total_count": null
}
When something fails, data is null and error contains:
{
"code": "error_code",
"message": "Human-readable message"
}
Many generation endpoints return a job inside data with an id, status, and url. If status is PENDING, poll Jobs until the asset is ready.
Explore and try request shapes in your browser:
| Resource | URL |
|---|---|
| Swagger UI | https://api.thefluxtrain.com/api/v1/docs |
| ReDoc | https://api.thefluxtrain.com/api/v1/redoc |
| OpenAPI JSON | https://api.thefluxtrain.com/api/v1/openapi.json |
The OpenAPI file lists every model name and field for video and other advanced options.
| Area | Documentation |
|---|---|
| Image generation | Image generation |
| LoRA | LoRA |
| Cartoon | Cartoon |
| Product photo | Product photo |
| Video generation | Video generation |
| Motion control | Motion control |
| Audio | Audio generation |
| LLM chat | LLM completion |
| Image description | Image description |
| Job polling | Jobs |
| Code | Meaning |
|---|---|
403 | Missing or invalid API key |
404 | Resource not found (for example a job ID that is not yours) |
500 | Server error while processing |
| Topic | Page |
|---|---|
| Create and manage keys | API keys |
| How to send your API key | Authentication |
| Terminal quick start | CLI |