Aller au contenu principal

OpenAI API key: how to create and find it in 3 minutes

Par AIFORYA — 26 July 2026 — 8 min de lecture

On this page (11)

Connecting artificial intelligence to your site is no longer a developer's job. What still blocks most people comes down to one question: where is my key, and how do I create it without getting it wrong? An API key is simply the pass that lets your tools — including AIFORYA extensions — talk to OpenAI's service on your behalf, securely.

This guide does exactly that and nothing else: create your key, find it again if you have lost sight of it, protect it, and paste it in the right place. Three minutes. No technical skill required, and you keep control of your spending from start to finish.

One principle governs the whole thing: your AI, your key, your data stays with you. You open an account with the provider, you pay the provider for what you use, and AIFORYA adds no margin and no middleman. That is also what lets you cap your costs, switch providers, or walk away whenever you decide to.

By following this guide, you will:

  • Create your account on the official OpenAI console.
  • Generate your first key — and know what to do if you never see it again.
  • Set spending caps before your very first call.
  • Paste the key into an AIFORYA extension and confirm it works.

Contents

What you need before you start

  • A valid email address, and in some cases a phone number for verification.
  • A payment method. API access is billed per use and generally works on prepaid credit: you top up, you consume, and nothing goes beyond what you have loaded. Introductory offers change regularly — the official pricing page is the reference, not a blog post.

A word on billing, because the question always comes up: usage is counted in tokens, fragments of words. A short text costs a few hundred; a long article a few thousand. You pay for what goes in (your request) and what comes out (the response). That is precisely what makes spending controllable: you see consumption in real time in your dashboard, and you can set a hard limit on it.

Step 1: create your account on the OpenAI console

Estimated time: 1 minute

  1. Go to the developer console at platform.openai.com.
  2. Click Sign up. Email registration works, as does signing in with an existing Google, Microsoft or Apple account.
  3. Verify your email address, then complete the requested details.

Watch out for one thing that catches many people: the developer console account is not the same product as the consumer chat assistant. You can have used one for months without ever activating the other. The console is what issues API keys.

Step 2: generate your API key

Estimated time: 30 seconds

  1. In the console, open the API keys section (usually from the side menu or your profile menu, at platform.openai.com/api-keys).
  2. Click Create new secret key.
  3. Give it an explicit name. Build the habit now: AIFORYA - client site Smith will save you real time the day you manage five keys for five sites. If the console offers to attach the key to a project, create one project per site: consumption then becomes readable per client.
  4. Confirm.

The key is shown once, and only once. Copy it immediately into your password manager before closing the window. This is not excessive caution — it is normal behaviour, and there is no way to display it again afterwards.

Step 3: "I can't see my key any more" — what is actually happening

This is the most asked question, and the answer is reassuring: you have broken nothing.

For security reasons, the console does not store the full value of your key. It keeps the fingerprint: the name you gave it, its creation date, its last characters, its last use. It can verify a key; it cannot show it back to you — nobody can, not even support.

In practice, if you have lost the value:

  1. Open the API keys list.
  2. Identify the key by its name and last characters.
  3. Revoke it, then create a new one and copy it into your password manager this time.
  4. Replace the old value everywhere it was pasted.

Revoking a lost key is not paperwork: a key sitting somewhere you cannot account for is a key someone else can spend. The action takes ten seconds.

Step 4: secure the key and cap the spend

Estimated time: 1 minute

An API key gives programmatic access to a paying account. Treat it like a payment method.

  • Store it in a password manager (1Password, Bitwarden, KeePass). Never in an email, a shared document, a support ticket or a text file on your desktop.
  • Never put it in browser-visible code or in a public repository. Keys belong on the server side, in environment variables or in the settings fields AIFORYA extensions provide.
  • Set a spending cap. In your account's billing settings, define an alert threshold (you get an email) and, where offered, a hard limit (calls stop). This is the most useful protection available, and it takes thirty seconds.
  • One key per site, or per project. The day you lose track of one, you revoke it without breaking anything else.

Step 5: add the key to an AIFORYA extension

  1. In your WordPress dashboard, open the settings of the AIFORYA extension concerned.
  2. Find the field for the provider's key — it carries the provider's name, unambiguously.
  3. Paste the key, checking that no space slipped in before or after.
  4. Save.

The extension is now connected to your account. From there, every generation is billed directly by the provider, to your account, at their rate — no middleman.

Troubleshooting: the most common errors

  • Authentication error. Nine times out of ten a missing character or a space picked up while copying. Paste the whole key, nothing around it. If it persists, the key has probably been revoked: create a new one.
  • Quota or credit error. The account has no available credit, or the hard cap you set has been reached. Check billing before any other hypothesis — it is the most common cause of a service that "stops for no reason".
  • Rate limit reached. Too many calls in too little time, typically during a batch run. Space out the work or reduce batch size.
  • The requested model is not available. Not every model is open to every account, and catalogues change. Choose from the list the extension offers rather than typing an identifier by hand.

Putting the key to work: the writing studio

A key is only worth what it lets you do. The most immediate case is writing: AIFORYA Constructeur Contenu is a writing studio that lives inside the WordPress editor — no leaving the page, no copy-pasting from another tab. You write, you ask for an outline, a rewrite, a short version for social — all in your editor, with your key, at your rate.

The real benefit is not "writing for you". It is removing the round trips: the blank page, the separate tab, the paste that breaks your formatting. You remain the author; the tool removes the friction.

Discover AIFORYA Constructeur Contenu

Working with your own key is an architectural choice at AIFORYA, not an option. Your AI costs are billed by the provider, directly, with no margin and no hidden fees from us. Your content does not pass through our servers to be generated. You can cap, revoke, switch provider or leave: nothing holds you, and that is deliberate.

Conclusion

You have a working key, stored safely, capped, and connected to your site. Three things to remember:

  1. The key is displayed once. If you no longer have it, that is not a fault: revoke and create a new one.
  2. The spending cap is your best setting. Set it before the first call, not after the first invoice.
  3. One key per site. You will be glad of it when you have ten.

Comparing providers before you commit? The same steps apply everywhere: see the Anthropic key guide, the Google Gemini key guide or the Mistral AI key guide. To understand why we made this architectural choice, our dedicated page explains it plainly.

Comparing AI writing tools? Our comparison of Jasper AI alternatives for WordPress starts from the same logic: your key, your costs, no per-word subscription.

FAQ

1. How much does the OpenAI API cost? You pay per use, based on the volume of text processed, and the rate depends on the model chosen. Official pricing is the reference and changes over time. AIFORYA adds nothing to that invoice — you pay the provider, directly.

2. Can I retrieve a key I already created? No, and that is a protection. The console shows the name, date and last characters of your keys, never the full value. If you have lost it: revoke and recreate.

3. Can I use the same key on several sites? Technically yes. In practice, create one per site: consumption becomes readable, and you can cut off one site without touching the others.

4. What if my key is compromised? Revoke it immediately from the console — access is cut at once — then create a new one and replace it in your settings. A spending cap already in place limits the damage in the meantime.

5. Do I need a consumer subscription to use the API? No. The consumer assistant subscription and API access are two separate products, billed separately. For AIFORYA extensions, only API access matters.

OpenAI API key: how to create and find it in 3 minutes | AIFORYA