OpenAI API

Set up API access for GPT, DALL-E, Whisper, and other OpenAI models.

⏱ 5 minutes ai llm platform.openai.com
getapi openai

Prerequisites

  • An OpenAI account

Credentials

Variable Description Sensitive
OPENAI_API_KEY API key for authenticating requests Secret

Setup Steps

  1. 1 Info

    We'll get you an OpenAI API key. You'll need to add a payment method if you haven't already — OpenAI's API is pay-per-use.

  2. 2 Open URL

    Opening the OpenAI API keys page. Sign in if prompted.

    https://platform.openai.com/api-keys
  3. 3 Choice

    Do you have a payment method on file?

  4. 4 Open URL

    Opening billing settings. Add a payment method to enable API access.

    https://platform.openai.com/settings/organization/billing/overview
  5. 5 Confirm

    Payment method added?

    Checkpoint — confirm before continuing
  6. 6 Info

    Click '+ Create new secret key'. Give it a descriptive name (e.g. your project name). Leave permissions as 'All' unless you need to restrict access.

  7. 7 Input

    Paste your API key here (starts with sk-):

    → OPENAI_API_KEY
    Starts with sk-. At least 20 characters
  8. 8 Validate

    Checking your API key works...

    API key verified. You're all set.
    Couldn't verify the API key. Make sure you have billing set up and the key is active.

Things to Know

  • API keys are only shown once when created. If you lose it, you'll need to create a new one.
  • New accounts get a small free credit, but it expires. After that, you pay per token.
  • Set a monthly spending limit in billing settings to avoid surprises.
  • Rate limits depend on your usage tier — new accounts start with lower limits.