
I purchased API credits in Claude Console and issued an API key.
This page has been translated by machine translation. View original
When validating the "ClaudeForFoundationModels" library that uses Apple's Foundation Models in iOS apps via the Claude API, a Claude API key was required. When attempting to issue an API key in the Claude Console, it turned out that API credits needed to be purchased in advance.
This article introduces the steps to purchase API credits in the Claude Console and issue an API key.
Testing Environment
- Claude Console (Web version)
- Verified on: July 31, 2026
Prerequisites
- A Claude Console account must already be created
- A credit card to use for payment must be prepared
Purchasing Credits
Step 1: Access the Billing Page
Accessing https://platform.claude.com/settings/billing displays the "Billing" screen. When no credits have been purchased yet, a "Purchase credits to get started" notice and a "Buy credits" button are displayed.
Credits are consumed by usage in the API, Claude Code, and Workbench. Credits can be purchased directly or you can set an auto-recharge threshold.

Step 2: Enter the Amount and Billing Address
Clicking the "Buy credits" button displays a modal.
The purchase amount can be selected from $5 / $20 / $100 / Other, and $20 (the recommended amount) was selected this time. Next, expand "Billing address" and enter the address.

Step 3: Enter Card Information and Confirm the Purchase
After entering the billing address, the card information entry field expands. Enter the credit card information. "Shipping address is the same as billing address" is ON by default and is used for tax purposes. "Business tax ID" is an optional field; if you are a registered business taxpayer, enter it here.
Once the entry is complete, a summary of the purchase is displayed.
- Credits used: $20.00
- Estimated tax: $2.00
- Total amount: $22.00
Confirm the details and click the "Buy $20 in credits" button.

Step 4: Wait for the Purchase to Process
After clicking the purchase button, a modal showing "Processing purchase..." is displayed.

Step 5: Confirm Purchase Completion
Once processing is complete, a modal showing "You're all set!" is displayed. Selecting "View console" proceeds to a screen where you can create and evaluate prompts in the Claude console, and selecting "Get started with the API" proceeds to a screen where you can start using the Claude API or client SDK.
The credit balance on the billing page is also updated to reflect the purchase amount ($20.00), and the purchase record ($22.00 · Paid) is added to the billing history.

Creating an API Key
Step 6: Navigate to the API Keys Page
Opening "API Keys" from the left menu shows a state where no keys exist yet.
API keys are owned by the workspace and remain valid after the creator is deleted
Proceed to create a key from the "Create Key" button in the upper right.

Step 7: Create an API Key
In the modal, select the workspace to associate the key with (in this case Default), set a name that indicates the purpose, and select an expiration date from the dropdown.
This time, for validating this library, the name was set to ios-foundationmodels-test and the expiration was set to the shorter option of "3 hours." It is not ideal from a security standpoint to keep issuing long-lived keys for validation purposes, so it is recommended to set a short expiration so that the key expires as soon as the use case is complete.

Step 8: Save the API Key
Clicking "Add" issues the key and displays the "Save your API key" modal. Once this modal is closed, the API key cannot be viewed again. Since the full key can only be viewed on this screen, be sure to copy it and store it in a safe place (such as 1Password or Keychain).
After viewing, close the modal with "Done."

Summary
The flow from purchasing credits to issuing an API key in the Claude Console is as follows.
- Purchase credits on the billing page (select amount → billing address → card information → confirm purchase)
- Create a key on the API keys page (workspace → name → expiration date)
- Copy the key from the screen immediately after issuance and store it safely
For validation purposes, setting a short expiration for API keys provides peace of mind. I hope this is helpful for anyone else struggling with issuing API keys in the Claude Console.
