Loading lesson…
Going beyond the chat window. When you'd reach for the API, how pricing actually works, and how to start building. The API is where AI becomes a building block The consumer app is the most polished version of an AI experience.
The consumer app is the most polished version of an AI experience. The API is the same model, stripped of the UI, sold by the token. If you want to embed AI into a workflow, a product, or an automation — the API is how.
| Provider | Model | Input $/1M tokens | Output $/1M tokens |
|---|---|---|---|
| Anthropic | Claude Opus 4.x | ~$15 | ~$75 |
| Anthropic | Claude Sonnet 4.x | ~$3 | ~$15 |
| Anthropic | Claude Haiku 4.x | ~$0.80 | ~$4 |
| OpenAI | GPT-5 | ~$2.50 | ~$10 |
| OpenAI | GPT-5.4 Pro | ~$15 | ~$60 |
| Gemini 3 Pro | ~$1.25-$4 | ~$5-$15 | |
| Gemini 3 Flash-Lite | ~$0.10 | ~$0.40 | |
| xAI | Grok 4 | ~$3 | ~$15 |
import anthropic client = anthropic.Anthropic() # Reads ANTHROPIC_API_KEY env var message = client.messages.create( model="claude-sonnet-4-5", max_tokens=1024, system="You are a terse, accurate research assistant.", messages=[ {"role": "user", "content": "Give me three examples of convergent evolution in plants."} ], ) print(message.content[0].text) # Cost: input ~30 tokens, output ~200 tokens # @ Sonnet pricing: ~$0.003 totalOne API call, one response, one very small bill. This is the atomic unit that subscriptions are built on top of.from openai import OpenAI client = OpenAI() # Reads OPENAI_API_KEY resp = client.responses.create( model="gpt-5", instructions="You are a terse, accurate research assistant.", input="Give me three examples of convergent evolution in plants.", ) print(resp.output_text)OpenAI's Responses API. Nearly identical shape to Anthropic's — intentional.from google import genai client = genai.Client() # Reads GEMINI_API_KEY response = client.models.generate_content( model="gemini-3-pro", contents="Give me three examples of convergent evolution in plants.", config={"system_instruction": "You are a terse, accurate research assistant."}, ) print(response.text)Gemini's SDK converged on the same basic shape. Three SDKs, three identical mental models.The API is where you stop being an AI user and start being an AI builder.
— Every dev who shipped their first LLM app
The big idea: the consumer app is where you use AI. The API is where you make things with AI. Every lab exposes the same model both ways. Learning the API side is the jump from power user to creator.
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-tools-api-vs-consumer-creators
What is the main idea of "API Access vs. Consumer Products — A Deeper Look"?
Which concept is most central to "API Access vs. Consumer Products — A Deeper Look"?
Which use of AI fits this topic best?
What should a careful learner remember about "Input vs output pricing"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about API be treated?
Name one way to verify an AI answer about API.
Which action would help you apply "API Access vs. Consumer Products — A Deeper Look" responsibly?