O

OpenAI GPT-4o / GPT-4.1 / o3

LLM

by OpenAI

OpenAI's flagship LLM family including GPT-4o for multimodal tasks, GPT-4.1 for long-context coding, and o3 for advanced reasoning. Industry-leading models with the largest developer ecosystem.

Registration & API Key Steps

1

Step 1

Visit platform.openai.com/signup and create an account with email or Google/Microsoft/Apple SSO.

Open link
2

Step 2

Verify your email address by clicking the link in the confirmation email.

3

Step 3

Complete phone number verification (each phone number can only be used once).

4

Step 4

Navigate to API Keys page and click "Create new secret key".

Open link
5

Step 5

Copy and securely store your API key (it will only be shown once).

6

Step 6

Optionally set up billing at Billing to increase rate limits.

Open link

Pricing

TierPriceFeatures
GPT-4o$2.50 / $10.00 per 1M tokensInput / Output. 128K context. Best for general multimodal tasks.
GPT-4o-mini$0.15 / $0.60 per 1M tokensInput / Output. 128K context. Budget-friendly option.
GPT-4.1$2.00 / $8.00 per 1M tokensInput / Output. 1M context. Optimized for coding and instruction following.
o3$2.00 / $8.00 per 1M tokensInput / Output. 200K context. Advanced reasoning with hidden reasoning tokens.
o4-mini$1.10 / $4.40 per 1M tokensInput / Output. 200K context. Cost-effective reasoning model.
Batch API50% off all modelsProcess non-urgent workloads within 24 hours at half price.

Application Tips

Tip 1

Use Batch API for 50% cost savings on non-time-sensitive workloads.

Tip 2

Prompt caching gives 50-90% discount on repeated prefixes depending on the model family.

Tip 3

Start with GPT-4o-mini for development/testing, switch to GPT-4o or o3 for production.

Tip 4

Tier upgrades are automatic based on cumulative spend: Tier 1 ($5), Tier 2 ($50), Tier 3 ($100), Tier 4 ($250), Tier 5 ($1,000).

Tip 5

Use structured outputs (JSON mode) for reliable parsing - saves tokens on re-tries.

Tip 6

Chinese users can register with a supported phone number or use a virtual number service.

China Access Solutions

Access Solution

Requires VPN/proxy to access API. Chinese phone numbers are not supported for registration. Consider using Azure OpenAI Service (available in China via Azure China) or third-party API relay services.

Code Example

JavaScript / TypeScript
import openai

client = openai.OpenAI(api_key="sk-xxx")

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing in simple terms."}
    ],
    temperature=0.7,
    max_tokens=1000
)

print(response.choices[0].message.content)

# --- cURL example ---
# curl https://api.openai.com/v1/chat/completions \
#   -H "Authorization: Bearer sk-xxx" \
#   -H "Content-Type: application/json" \
#   -d '{
#     "model": "gpt-4o",
#     "messages": [{"role": "user", "content": "Hello!"}]
#   }'

Rate Limits

TierLimits
DefaultTier 1 (default): GPT-4o 500 RPM, 30K TPM. Tier 5: 10,000 RPM, 30M TPM. o3: Tier 1 500 RPM, 100K TPM. Rate limits auto-increase with spend.

Recommended Use Cases

Chatbots & virtual assistantsCode generation & reviewContent creationData analysisMultimodal understanding
Last Updated: 2026-02-10

Related API Guides