How to Buy OpenAI API Credits and Add a Payment Method

If you want to use OpenAI’s API in your own apps, bots, or systems, you’ll need to: Add a payment method Buy credits or enable pay-as-you-go billing Generate an API key

Here’s a simple step-by-step guide:

1️ Log In to the OpenAI API Platform

  1. Sign in with your OpenAI account (you can use the same account as your ChatGPT plan if you like).


2️Add a Payment Method

  1. Click “Add payment method.”

  2. Enter your credit/debit card details and save.


3️ Enable Pay-As-You-Go or Buy Prepaid Credits

Option A — Pay-As-You-Go

Option B — Buy Prepaid Credits (Optional)

  • Purchase credits in fixed amounts ($5, $10, $20, etc.).

  • The cost of your API usage will be deducted from these prepaid credits instead of charging your card per use.


4️ Generate an API Key

  1. Click “Create new secret key.”

  2. Copy and store the key securely — you’ll use it in your code to authenticate API calls.


Important Notes

  • The ChatGPT Plus/Pro subscription does NOT include API credits — you must add a payment method and buy credits separately.

  • New developers often get free credits (e.g., $5–$18) for a limited trial — check your account for eligibility.

  • Monitor your usage to control costs: platform.openai.com/account/usage


You’re Ready to Build!

Once your payment method is added and your API key is ready, you can start calling OpenAI’s models in your own apps, scripts, or integrations.

Last updated