
Introduction: Why call the API directly?
Chatting on the ChatGPT website and calling the API directly are two completely different levels of use.
Category | Web chat (Before) | API call (After) |
|---|---|---|
Automation | Manual input every time | Connects to Excel, Slack, and CRM |
Cost | Fixed $20/month (ChatGPT Plus) | Pay only for what you use (per token) |
Customization | Limited | Fine-grained control over temperature, system prompts, and more |
Bulk processing | Copy and paste one item at a time | Batch-process hundreds of items at once |
💡 Once you understand the API, you level up from someone who “uses AI” to **someone who “builds AI into their work.”** You don’t need to know how to code: a free tool called Postman is all it takes to follow along.
If you follow this guide to the end, you will have called the APIs of all three providers yourself: OpenAI (GPT-4o), Anthropic (Claude), and Google (Gemini). It takes about 40–60 minutes.
Step 1. Preparation: Install Postman
Postman is a free tool that lets you test APIs without coding. Developers use it every day, but non-developers can use it easily too.
1-1. Download and install Postman
In your browser, go to postman.com/downloads.
Click the orange “Download the App” button in the center of the screen.
The installer for your operating system (Windows/Mac) downloads automatically.
Run the downloaded file to finish the installation.
When you launch Postman after installing, the Sign Up screen appears.
Create a free account with your Google account or email.
1-2. Check the home screen
After logging in, you’re ready when you see the “+” tab at the top.
Clicking this “+” tab opens a screen where you can create a new API request.
The dropdown on the left should say **“GET”**. You’ll change it to **“POST”** later.
💡 There is also a web version of Postman (app.getpostman.com), but the desktop app is more stable. Use the web version only if your company’s security policy makes installation difficult.
Step 2. Get an OpenAI API key and make your first call
2-1. Get an API key
In your browser, go to platform.openai.com.
Log in with the same account you use for ChatGPT. (You may need to sign up separately.)
After logging in, click the ⚙️ gear icon (Settings) in the left sidebar.
Click "API keys" in the left menu.
Click the "+ Create new secret key" button at the top of the screen.
In the Name field, type "My first key" and click "Create secret key".
A long string starting with sk- appears. This is your API key.
Be sure to click the "Copy" button and paste the key into a notepad.
⚠️ This key is shown only once. You can't view it again after closing the window, so save it somewhere safe. If you lose it, you'll need to generate a new key.
2-2. Add a payment method (required)
The API is a paid service, so you must add a payment method before any calls will work.
Click "Billing" in the left menu.
Click the "Add payment method" button.
Enter your credit card details.
Enter $5 under "Initial credit balance". (This is the minimum top-up.)
OpenAI pricing at a glance:
Model | Input (per 1M tokens) | Output (per 1M tokens) | Notes |
|---|---|---|---|
GPT-4o | $2.50 | $10.00 | Top pick |
GPT-4o-mini | $0.15 | $0.60 | Best value |
GPT-4.1 | $2.00 | $8.00 | Latest model |
💡 In Korean, roughly 1,500 characters equal about 1,000 tokens. Even a $5 top-up covers thousands of GPT-4o-mini calls, so there's no pressure to start.
2-3. Calling the OpenAI API in Postman
Open Postman and click the "+" tab at the top to create a new request.
Change the dropdown on the left from GET to POST.
Copy and paste the address below into the URL field exactly as shown:
https://api.openai.com/v1/chat/completions
4. Click the "Headers" tab below the URL field.
5. Add the following two lines:
KEY | VALUE |
|---|---|
|
|
|
|
Note: There must be one space between Bearer and sk-.
Click the "Body" tab.
Select the "raw" radio button.
Change the dropdown on the right from **"Text" to "JSON"**.
Copy and paste the content below exactly as shown:
json
{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a B2B sales assistant. Answer concisely and practically."
},
{
"role": "user",
"content": "Write an email proposing the adoption of an IT solution. The audience is the CFO of a mid-sized company, and cost savings are the key point."
}
],
"temperature": 0.7,
"max_tokens": 1000
}
10. Click the blue "Send" button at the top right.
2-4. Checking the response
The response appears as JSON in the lower pane. In the "content" field inside "choices", you can see the email body the AI generated. The "usage" field shows how many tokens were used.
Prompt example ① — Writing a cold email:
"Write an email proposing the adoption of an IT solution. The audience is the CFO of a mid-sized company, and cost savings are the key point. Keep it under 300 characters, and make the CTA (Call to Action) a proposal for a 15-minute meeting."
Step 3. Get an Anthropic (Claude) API key and make your first call
3-1. Get an API key
In your browser, go to console.anthropic.com.
Click "Sign Up" to create an account. (It is separate from your claude.ai account.)
Complete the email verification.
After logging in, click "API Keys" in the left sidebar.
Click the "Create Key" button.
Enter "My first key" as the Name and click "Create Key".
A string starting with sk-ant- appears. Copy it into a notepad.
3-2. Add a payment method
In the left menu, click "Billing" → "Payment Methods".
Add a credit card and top up $5 in credits.
Anthropic pricing:
Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
Claude Sonnet 4 | $3.00 | $15.00 |
Claude Haiku 3.5 | $0.80 | $4.00 |
3-3. Call the Claude API in Postman
In Postman, open a new tab ("+") and set the method to POST.
URL:
https://api.anthropic.com/v1/messages
3. In the "Headers" tab, add the following three lines:
KEY | VALUE |
|---|---|
|
|
|
|
|
|
Unlike OpenAI, it uses a header called x-api-key and does not add "Bearer".
Select "Body" → "raw" → "JSON", then paste the following:
json
{
"model": "claude-sonnet-4-20250514",
"max_tokens": 1024,
"system": "You are a B2B sales coach with 10 years of experience.",
"messages": [
{
"role": "user",
"content": "Write a follow-up email after a client meeting. We discussed cloud migration, and the next step is scheduling a technical demo."
}
]
}
5. Click the "Send" button.
Prompt example ② — Follow-up email:
"Write a follow-up email after a client meeting. We discussed cloud migration, and the next step is scheduling a technical demo. Use a professional but warm tone, and propose two specific dates."
3-4. Check the response
In the response JSON, the email Claude wrote is in the "text" field inside the "content" array.
💡 Claude is strong at analyzing long documents. Raise
max_tokensto 4096 to get longer answers.
Step 4. Get a Google Gemini API key and make your first call
4-1. Get an API key
The Google Gemini API is the easiest of the three to get a key for.
In your browser, go to aistudio.google.com/apikey.
Log in with your Google account.
Click the "Create API Key" button.
If you are asked to choose a project, select "Create API key in new project".
A string starting with AIza is generated. Copy it and save it in a notepad.
Google Gemini pricing:
Model | Input (per 1M tokens) | Output (per 1M tokens) | Free tier |
|---|---|---|---|
Gemini 2.0 Flash | $0.10 | $0.40 | 15 requests per minute free |
Gemini 2.5 Pro | $1.25~$2.50 | $10.00~$15.00 | 5 requests per minute free |
💡 Gemini Flash models have a free tier, so you can test them without adding a payment method. For learning purposes, it is the lowest-commitment choice.
4-2. Call the Gemini API in Postman
In Postman, open a new tab ("+") and set the method to POST.
URL (replace
YOUR_API_KEYbelow with your own key):
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY
Google uniquely passes the API key as a URL parameter.
"Headers" tab:
KEY | VALUE |
|---|---|
|
|
Select "Body" → "raw" → "JSON", then enter:
json
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Create a competitor comparison table for a B2B SaaS product. The category is project management tools; compare Asana, Monday.com, and Jira. Include pricing, key features, and pros and cons."
}
]
}
],
"generationConfig": {
"temperature": 0.7,
"maxOutputTokens": 2048
}
}
5. Click "Send".
Prompt example ③ — Competitor analysis:
"Create a competitor comparison table for a B2B SaaS product. The category is project management tools; compare Asana, Monday.com, and Jira. Summarize pricing, key features, pros and cons, and the team size each tool suits best in a Markdown table."
4-3. Check the response
You can find the generated answer along the path "candidates" → "content" → "parts" → "text".
Step 5. Comparing the three APIs
Comparison | OpenAI | Anthropic | |
|---|---|---|---|
Key format |
|
|
|
Authentication | Header: | Header: | URL parameter: |
Body structure |
|
|
|
Free tier | None ($5 minimum top-up) | Limited free credits, when offered | Gemini Flash is free |
Best-value model | GPT-4o-mini | Claude Haiku 3.5 | Gemini 2.0 Flash |
Strengths | Versatility, ecosystem | Long-form analysis, safety | Speed, free tier, multimodal |
Step 6. Practical tips — prompt patterns you can use at work right away
6-1. Adjusting the temperature parameter
temperature: 0.1–0.3 → structured reports, data summaries (consistent results)
temperature: 0.5–0.7 → emails, everyday business documents (balanced results)
temperature: 0.8–1.0 → brainstorming, creative copy (varied results)
💡 For B2B sales emails, temperature 0.5–0.7 sounds the most natural. Too low and the tone is stiff; too high and the email can drift away from the business context.
6-2. Using a system prompt (Before/After)
Before — without a system prompt:
“Write a sales email” → produces a vague, generic email
After — with a system prompt:
System: “You are a B2B SaaS sales expert with 10 years of experience. Apply the SPIN selling methodology, and always include specific figures and ROI.”
User: “Write an email proposing the adoption of a cloud security solution”
→ produces a structured sales email with concrete ROI figures
6-3. Practical cost-management rules
During testing, always use a lightweight model such as mini, flash, or haiku. Switch to a higher-tier model only after your prompt is finalized.
Check your daily usage in the OpenAI dashboard (platform.openai.com → Usage).
Setting a **monthly usage limit (Usage Limits)** of $10 helps you avoid unexpected charges.
Set it under Settings → Limits → “Set a monthly budget”
Step 7. Common Errors and How to Fix Them
Error 401: Unauthorized
Cause: The API key was entered incorrectly
Fix: Make sure there is a space after
Bearerand that no extra spaces were copied before or after the key.
Error 429: Rate Limit Exceeded
Cause: Too many requests sent in a short time
Fix: Wait 30 seconds to a minute, then try again. The free tier has stricter limits.
Error 400: Bad Request
Cause: JSON format error (missing comma, misplaced quotation mark, etc.)
Fix: Paste the Body content into jsonlint.com to validate the syntax.
Error 403: Insufficient Balance
Cause: Not enough credit balance
Fix: Add more credits on the Billing page.
💡 When an error occurs, open the “Body” tab in Postman’s response area and read the
"error"→"message"field. In most cases, the cause is stated clearly in English.
Step 8. Next Steps — Scaling Up with No-Code Automation
Once your API call works, you can connect it to real work automation.
Tool | Level | Use Cases |
|---|---|---|
Zapier / Make | ⭐ Easy | Receive email → AI summary → Slack notification |
Google Apps Script | ⭐⭐ Moderate | Google Sheets data → AI analysis → automated report |
Power Automate | ⭐⭐ Moderate | Teams message → AI translation → automatic reply |
n8n | ⭐⭐⭐ Intermediate | CRM lead → AI scoring → automated email |
Real-World Results (Before → After)
Sales email writing time: 25 minutes on average → 3 minutes (about 88% faster)
Client meeting summary report: 40 minutes written manually → 10 minutes of editing after an API call (about 75% faster)
Competitor analysis: Half a day of research → 5 minutes to generate a draft + 30 minutes of fact-checking (about 70% faster)
Wrap-Up Checklist
Make sure you have completed all of the items below:
Installed Postman and created an account
Issued an OpenAI API key and added credits
Made a successful OpenAI API call (GPT-4o-mini)
Issued an Anthropic API key
Made a successful Claude API call
Issued a Google Gemini API key
Made a successful Gemini API call
Understand how authentication differs across the three APIs
Temperature adjustment test completed
Monthly usage limit set
💡 Save the Postman requests from this guide as a Collection. Click the "Save" button in Postman's left sidebar and create a folder called "AI API Tests," and you can pull them up again any time. It becomes your very own AI API lab.