Prerequisites
You need an API key. If you do not have one, create it now — it takes 30 seconds.1. Create a generation
Send aPOST request to /api/run with a tool and prompt:
2. Poll for the result
Check the generation status every few seconds until it completes:3. Use webhooks instead (recommended)
Polling works, but webhooks are better for production. Add awebhook URL to your request and the API will POST the result to your server when the generation finishes:
Next steps
API reference
Full details on the
/api/run endpoint.Browse models
See all available models and their parameters.
Webhooks
Set up real-time notifications for completed generations.
List tools
Discover all available tools and capabilities.