API keys for developers
Use the models from your own code with a personal API key. Keep it secret.
With an API key you can start generations from your own code and pay with the credits on your account, at the same prices as the studio. The developer documentation explains how.
- Create a key on Account > API keys. The full key is shown only once; we store only a hash of it.
- Anyone with your key can spend your credits. Keep it on your server, never in a web page, an app or a public repository.
- Revoke a key you no longer use, or that may have leaked. It stops working immediately.
- There are rate limits per key, listed in the documentation.
- Jobs you start through the API also appear in your library.
You are responsible for everything done with your keys. Our terms and acceptable use policy apply to the API too.
Related articles
- Two-step login and recovery codesProtect your account with a code from an authenticator app. Keep your recovery codes safe.
- What credits are and what things cost1 credit is worth €0.01. The price depends on the model and your settings, and you always see it first.
- Deleting your accountPermanent, and unused credits are lost. Here is what happens.
- Download your dataOne file with everything we store about you.
Still need help?
Send us a message and a person will get back to you by email. Include the date and the model if it is about a generation.