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:
- Log In to the OpenAI API Platform
Sign in with your OpenAI account (you can use the same account as your ChatGPT plan if you like).
- Add a Payment Method
Click “Add payment method.”
Enter your credit/debit card details and save.
- Enable Pay-As-You-Go or Buy Prepaid Credits
Option A — Pay-As-You-Go
Enable Pay-As-You-Go billing.
Set a monthly spending limit (optional but recommended to avoid surprises).
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.
- Generate an API Key
Go to: platform.openai.com/api-keys
Click “Create new secret key.”
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
Last updated
