Higgsfield API
Generate images and videos through one authenticated, asynchronous API.
Higgsfield provides one integration point for generative media models. Submit a request to a model endpoint, then poll for the result or receive a webhook when processing finishes.
Create credentials and complete a generation from submission to result.
Create and manage server-side credentials in Higgsfield Console.
#Make a request
Every model uses the same authentication and asynchronous request lifecycle. The JSON body depends on the selected model.
Start with Grok Image 2.0. Send a text prompt to create an image.
curl --request POST \
--url https://api.higgsfield.ai/xai/grok-imagine-image-2.0 \
--header "Authorization: Key ${HF_API_KEY_ID}:${HF_API_KEY_SECRET}" \
--header "Content-Type: application/json" \
--data '{
"prompt": "Editorial portrait in soft daylight"
}'
The API immediately returns a request identifier and links for checking or canceling the request.
{
"status": "queued",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff",
"status_url": "https://api.higgsfield.ai/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/status",
"cancel_url": "https://api.higgsfield.ai/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/cancel"
}
#Choose your path
Use the Python or TypeScript SDK to submit a request and wait for its result.
Learn the request lifecycle, polling, webhooks, errors, and limits.
Upload input files to Higgsfield storage before generation.
Note
Output files are available for at least seven days. Download completed output to your own storage for long-term retention.