API Security
.
12
Mins Read

How to Get and Find Your API Key

Step-by-step paths to find or create an API key for OpenAI, Gemini, Google Cloud, AWS, Stripe, GitHub and more. Every console path was checked against provider docs on 27 November 2026.

Dhayalan Subramanian
Associate Director - Product Growth at DigitalAPI
.
30 November 2026
In this blog
Share blog
TL;DR:

How do you find your API key?

Your API key lives in the provider's console or dashboard, usually on a page named "API keys", "Credentials" or "Developer settings".

To learn how to find api key values, sign in, open that page and copy the key, or create a new one.

Most providers show a secret key only once, so a lost key means a new key, not a recovered one.

You need one value to make your first call, and the docs assume you already have it. You search how to find api key steps, land on a page from 2021, and the menu has moved.

This guide fixes that. It gives the current path for OpenAI, Google, AWS, Stripe, GitHub and five more providers. Every path was checked against provider docs on 27 November 2026. It also covers where to keep the key and what to do if it leaks.

map of where to find api key pages in the OpenAI, Google AI Studio, Google Cloud, AWS, Stripe and GitHub consoles

What is an API key and how do I find it?

An API key is a secret string that identifies your app or account when it calls an API. You find it in the provider's console, on a page for keys or credentials. If you cannot see the full value, create a new key.

Definition

API key

An API key is a unique string a provider issues to identify the caller of its API. The caller sends it with each request, usually in a header. The provider uses it to check access, apply rate limits and bill usage.

If you are asking "what is my api key?", the answer depends on the provider. Each one issues its own keys, and they never work across providers. For the full concept, see our guide to API keys.

How do you get an API key? (general steps)

Most providers follow the same five steps to issue a key. The menu names change, but the flow does not. Here is how to get an api key from almost any service:

  1. Create or sign in to an account on the provider's developer site or console.
  2. Create a project or app if the provider asks for one. Keys usually belong to a project.
  3. Open the keys page. Look for "API keys", "Credentials", "Developer settings" or "Tokens".
  4. Create the key. Give it a clear name and the smallest scope or permissions you need.
  5. Copy and store it at once in a secrets manager. Many providers never show the full secret again.

That last step matters most. Skip it, and next week you will be asking how to find my api key. The answer will be "create a new one".

How do you find your OpenAI API key?

Your OpenAI API key is on the API key page of the OpenAI developer platform. OpenAI shows the full secret key only when you create it, per its help centre (checked 27 Nov 2026).

  1. Sign in to the OpenAI developer platform, not ChatGPT.
  2. Open the API keys page.
  3. Create a new secret key and choose the project it belongs to.
  4. Copy the key and save it in your secrets manager.
  5. If you lost an old key, create a new one and update your app. Delete the old key with the trash icon.

Keys belong to projects. Projects let owners set model access, rate limits and spend limits per team. A ChatGPT subscription does not include API access; API usage is billed separately.

How do you get a Gemini API key or a Google Cloud API key?

Gemini API keys come from the API Keys page in Google AI Studio. Other Google Cloud API keys come from the Credentials page in the Google Cloud console. Every Gemini key belongs to a Google Cloud project.

Gemini API key (Google AI Studio):

  1. Sign in to Google AI Studio and accept the terms.
  2. Open the API Keys page. New users get a default project and key automatically.
  3. Select Create API key to make another one.
  4. Copy the key and store it safely.

Google changed Gemini keys in 2026. Since 28 May 2026, all new AI Studio keys are "auth keys". The Gemini API now rejects unrestricted standard keys, per Google's Gemini API docs (checked 27 Nov 2026). If an old key shows a Blocked tag, create a new one.

Google Cloud API key (Maps, other APIs):

  1. In the Google Cloud console, open APIs & Services > Credentials.
  2. Select Create credentials, then API key.
  3. Add at least one restriction: limit the key to specific APIs, websites or apps.
  4. Copy the key. Standard Google API keys start with AIza.

How do you find your AWS access keys?

AWS does not issue a single "API key". Programmatic access uses an access key ID plus a secret access key, created on the Security credentials page. AWS itself recommends temporary credentials, such as IAM roles, over long-term access keys.

  1. Sign in to the AWS console as the IAM user, never as the root user.
  2. In the upper right, choose your user name, then Security credentials.
  3. In the Access keys section, choose Create access key.
  4. Review the alternatives AWS suggests, then confirm your use case.
  5. Download or copy both values. The secret is shown only once.

Access key IDs for long-term keys start with AKIA. Each IAM user can have two access keys at most, which lets you rotate without downtime. For workloads on AWS, use an IAM role instead, per the AWS IAM user guide (checked 27 Nov 2026).

How do you find your Stripe API keys?

Stripe API keys are on the API keys page of the Stripe Dashboard, under Developers. Stripe gives you publishable, secret and restricted keys, each in sandbox and live modes.

  1. Sign in to the Stripe Dashboard.
  2. Open Developers > API keys.
  3. For server code, select Create restricted key and grant only the permissions you need.
  4. Copy the key. In live mode, Stripe shows a new secret or restricted key only once.

Key prefixes, per Stripe's docs (checked 27 Nov 2026):

  • Publishable: pk_test_ or pk_live_. Safe in front-end code.
  • Secret: sk_test_ or sk_live_. Server side only.
  • Restricted: rk_test_ or rk_live_. Stripe recommends these for most uses.

Sandbox keys are free to use. Live keys move real money, so treat them like passwords.

How do you create a GitHub personal access token?

GitHub uses personal access tokens instead of API keys. You create them under Settings, then Developer settings. GitHub offers fine-grained tokens and classic tokens.

  1. Click your profile picture, then Settings.
  2. In the left sidebar, click Developer settings.
  3. Under Personal access tokens, click Fine-grained tokens.
  4. Click Generate new token, set an expiry, and pick the repositories and permissions.
  5. Copy the token. GitHub will not show it again.

Fine-grained tokens start with github_pat_. Classic tokens start with ghp_, per GitHub's docs (checked 27 Nov 2026). Prefer fine-grained tokens, because you can limit them to specific repositories.

How to find API keys for other providers

The table below lists where to find api key pages for ten common providers. Think of it as a manual api key finder: the console path, the key format and where the provider documents it.

Where to find API keys for common providers

ProviderWhere to find or create the keyKey formatDocumented in
OpenAIDeveloper platform > API keysNot stated in help docsOpenAI Help Center
Google AI Studio (Gemini)AI Studio > API KeysAuth key (since May 2026)Gemini API docs
Google CloudConsole > APIs & Services > CredentialsStarts with AIzaGoogle Cloud authentication docs
AWSUser name > Security credentials > Access keysID starts with AKIAAWS IAM user guide
StripeDashboard > Developers > API keyspk_, sk_, rk_ plus test_ or live_Stripe docs: API keys
GitHubSettings > Developer settings > Personal access tokensgithub_pat_ or ghp_GitHub docs: authentication
Anthropic (Claude)Claude Console > API keysNot stated in docsClaude API docs
SendGridSettings > API Keys > Create API KeyNot stated in docsSendGrid docs
TwilioConsole > API keys (Main, Standard, Restricted)Not stated in docsTwilio IAM docs
SlackApp settings > OAuth & Permissions (bot token)Bot tokens start with xoxb-Slack developer docs

Swipe sideways to see all columns →

Last verified: 27 Nov 2026. Menus change often, so confirm in the provider's docs before you build.

five-step flow showing how to get an api key: sign in, create a project, open the keys page, create a scoped key, store it in a secrets manager

Can you get API keys for free, and can you create your own?

Yes, most providers issue API keys for free. You pay for usage, not for the key. Some APIs have free tiers or test modes, such as Stripe sandbox keys.

So, is an API key free or paid? The key itself costs nothing. The calls you make with it may be billed, as with OpenAI or AWS. Check the provider's pricing page before you ship.

Can you create your own API key? For someone else's API, no. Only the provider can issue a valid key. For your own API, yes. You generate random keys, store only a hash and check each request against it. Most teams let an API gateway or developer portal do this instead of writing it by hand.

How do you store an API key safely?

Keep API keys out of code. Load them at runtime from environment variables or a secrets manager. A key pasted into source code ends up in git history, builds and backups.

  • Use a secrets manager in production, such as your cloud provider's vault.
  • Use environment variables for local work, and keep .env files out of git.
  • Scope every key to the least access it needs. Use restricted or fine-grained keys where offered.
  • Never send keys over email, chat or tickets. See stop sharing API keys over email.
  • Rotate keys on a schedule. See how to automate API key management.

Leaks are common. GitGuardian's State of Secrets Sprawl 2025 report counted 23.8 million secrets leaked on public GitHub in 2024. For how keys end up in code and how to remove them, read hardcoded API keys.

What should you do if you lose or leak an API key?

A lost key cannot be recovered, and a leaked key must be replaced. In both cases, create a new key first, then revoke the old one.

  1. Create a replacement key with the same or tighter scope.
  2. Deploy it to every app and pipeline that used the old key.
  3. Revoke or delete the old key in the provider console.
  4. Review usage for the exposure window: unknown IPs, spikes or new resources.
  5. Find the leak source and fix it, whether a commit, a log or a shared doc.

Deleting the commit is not enough. The same GitGuardian report found 70% of secrets leaked in 2022 were still valid. Revoking is the only real fix.

five-step response when an API key is lost or leaked: create a new key, deploy it, revoke the old key, review usage and fix the source

How should API providers issue keys to developers?

If you run APIs, give developers a self-service portal so they never wait for a key or ask for one by email. Most "where is my key" tickets come from manual issuing.

Self-service key issuing is right for you if:

  • External partners or many internal teams call your APIs.
  • Keys are sent by email or chat today, or live in a shared spreadsheet.
  • Nobody can say which app owns which key, or when it was last rotated.

It is not right for you if:

  • One internal script calls one API, and a secrets manager is enough.

The DigitalAPI API Developer Portal issues keys automatically once an access request is approved. Partners rotate their own keys, and admins can revoke an app or subscription at once. For a wider view, compare the top API key management tools and read our API key management guide.

See how DigitalAPI lets developers get scoped API keys in minutes, without email or tickets → Book a Demo

Key takeaways

  • To learn how to find api key values, open the provider's keys or credentials page. The name varies, the location rarely does.
  • Most secrets are shown once. Copy the key into a secrets manager the moment you create it.
  • AWS and GitHub use different names: access keys and personal access tokens. AWS prefers temporary credentials.
  • Gemini keys changed in 2026. New AI Studio keys are auth keys, and unrestricted standard keys are rejected.
  • Keys are free; usage may not be. Check pricing before going live.
  • Replace first, revoke second when a key is lost or leaked.

Frequently asked questions

1. How do I find my API key?

Sign in to the provider's console and open the page for API keys, credentials or developer settings. Copy the key if it is visible. Most providers show a secret key only once, at creation. If you cannot see the full value, create a new key, update your app and delete the old one.

2. Can you get API keys for free?

Yes. Most providers, including OpenAI, Google, AWS, Stripe and GitHub, issue API keys at no cost. You pay for what you use with the key, not for the key itself. Some providers add free tiers or test modes, such as Stripe sandbox keys, so you can build before you pay.

3. Can I create my own API key?

Not for someone else's API. Only the provider can issue a valid key. For an API you run, yes: generate a long random string, store only its hash and check each request against it. Most teams use an API gateway or developer portal to issue, scope and revoke keys instead.

4. Is an API key free or paid?

The key is free. Usage can be paid. OpenAI and AWS bill per use, while GitHub tokens cost nothing. Stripe charges per transaction, not per key. Check the provider's pricing page to see what calls made with your key will cost.

5. How do I get an OpenAI API key?

Sign in to the OpenAI developer platform and open the API keys page. Create a new secret key, choose a project and copy the key at once. OpenAI shows the full key only when you create it. API usage is billed separately from a ChatGPT subscription.

6. Why can't I see my full API key anymore?

Providers such as OpenAI, AWS, GitHub and Stripe live mode show secret values only once, for security. After that, the console never displays the full key. Create a new key, deploy it everywhere and revoke the one you lost.

7. What should I do if my API key leaks?

Create a replacement key and deploy it first. Then revoke the leaked key in the provider console. Review usage for the time it was exposed, and fix the source of the leak. Deleting the commit or message is not enough, because copies of the key may already exist.

Conclusion

Now you know how to find api key pages for the providers you use most. The path is always the same: console, keys page, create, copy once, store safely.

Save the provider table for later, because menus move. When a key goes missing, replace it rather than searching for it. When a key leaks, replace first and revoke second.

If you are on the other side, issuing keys to your own developers, make the process self-service. That removes most lost-key tickets before they start.


Issuing keys to your own developers? Self-serve key issuance in the DigitalAPI developer portal. Explore the DigitalAPI developer portal

Prefer a walkthrough?
Book a Demo
About the author
Dhayalan Subramanian

Dhayalan Subramanian is Associate Director, Product Growth at DigitalAPI, where he leads go-to-market and product growth for the company’s multi-gateway API management platform. His work focuses on helping large enterprises and mid-market cloud companies consolidate APIs across AWS, Azure, Apigee, Kong, MuleSoft, and other gateways into a single control plane for governance, discovery, monetization, and agent consumption.

‍

Dhayalan brings 14+ years of experience across product strategy, enterprise architecture, and engineering leadership. Earlier in his career, he held senior roles at Encora (as Associate Architect and Technical Manager), Mindtree (Technology Lead), Tech Mahindra (Technical Lead), and Primus Analytics, where he designed integration frameworks and delivered enterprise-grade digital platforms for global customers.

‍

At DigitalAPI, he works directly with platform, integration, and developer experience leaders at Fortune 500 organizations to operationalize unified API catalogs, developer portals, and MCP-ready APIs. He writes regularly on API developer experience, API governance, and AI agent architectures.

Become AI-ready
Make every API agent-callable.
An 8-week pilot. We connect to your gateways, ship MCP-callable APIs, and onboard your first agent.
0 rip-and-replace
Same auth, same audit
Live in production in 8 weeks
Get started

One email a fortnight. Worth opening.

A short digest of what we're writing, what we're learning from customers, and the handful of links you'd actually want from us. No tracking pixels.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.