Edition 2026 · For students
What can the OpenAI API actually do?
Nine small experiments, one for each capability. Pick one, change the settings, and look at the request that goes to the API. Every demo is plain HTML and JavaScript, so you can read the source too.
Step 0
Your API key
How do I get started?
- Create an account on the OpenAI platform.
- Add a payment method or prepaid credits to your account.
- Create an API key under API keys.
- Paste the key above. We check it by listing your models, which is free.
Is my API key stored safely?
The key is stored in your browser's local storage and is only sent
to api.openai.com. Anyone with access to this device
and browser could read it, so remove it when you use a shared
computer. In a real app you would never put an API key in
front-end code. Instead, a server would make the calls.
Is this free?
No. OpenAI charges per use. Text is billed per token, images per
image and quality level, and audio per minute or per character.
Small models like gpt-6-luna cost fractions of a cent
per request.
Text & reasoning
Chat
Talk to GPT-6 and control how long it thinks before it answers.
/v1/responses
02
Web search
Let the model search the internet and answer with cited sources.
tools: web_search
03
Structured outputs
Turn messy text into clean JSON that follows your schema exactly.
text.format: json_schema
04
Vision
Upload a photo, screenshot or chart and ask questions about it.
input_image