Skip to main content

1. Grab your credentials

Log into the ZeroGPU dashboard and copy these three values: Send your API key in the x-api-key header, as the examples below do, or as Authorization: Bearer <key>. Both work on the inference endpoints. The Batch & Files API accepts x-api-key only. To use Bearer, swap the header:
The x-project-id header is optional. Send it only to scope a request to a specific project.

2. Send a request

Store your API key in environment variables. Never commit it to version control or expose it in client-side code.

3. See a complete example

A full request - here the llama-3.1-8b-instruct-fast model summarizing a passage:
🎉 The model returns the summary:

4. Verify it worked

Check the dashboard:
  • Logs: your request appears with model, status, and latency.
  • Usage: token counts update in real time.
If you get a 401, no API key was sent. A 403 means the API key is invalid or revoked.

Next steps

API Reference

How ZeroGPU works