From address bar to terminal: a gentle start with model APIs

APIClaudeKeyFree · Updated 2026-11-24 · 8 min read

Hands on a laptop with a notebook nearby
A first API call can be as simple as a web address.

Plenty of people meet AI through a chat app, get hooked, and then hear that the real power is in the API, the part that lets you automate tasks, process files and connect models to other tools. A common story is someone from a non-technical background buying a chat subscription for automation, then realising that what they actually needed was API access, and not knowing where to begin.

This guide is for that moment. Without installing a programming environment or creating an account, you will send real requests to a model, read the response, and understand the pieces: endpoints, parameters, JSON and keys. It uses the keyless endpoint on this site so you can practise for free, and explains how the same steps apply to paid providers later.

Frequently asked questions

What is an API?

An API, or application programming interface, is a way for one program to talk to another using agreed rules. A model API lets your program send text to a model and get text back, without using the provider's chat app.

What is an endpoint?

An endpoint is a specific address that accepts a specific kind of request. For example, one address answers chat requests and another lists available models. Each endpoint expects data in a particular format.

What is an API key, and why do most providers need one?

A key is a secret string that identifies your account so the provider can bill you and apply your limits. Paid providers, Anthropic among them, require one. The endpoint on this site is keyless and limits usage by IP address instead.

How does a chat subscription differ from API access?

A subscription pays for using the provider's own apps. API access pays for requests from your own programs and is usually billed separately by usage. With most providers one does not include the other.

What is JSON?

JSON is a simple text format for structured data, made of keys and values in curly braces. Most model APIs send and receive JSON. You will recognise it quickly once you have seen a few examples.

Is it safe to put a paid API key in a spreadsheet or browser?

Generally no. Anyone who can see the file or the page can copy the key and spend your money. Paid keys belong on servers or in secure secret stores. Keyless endpoints avoid this problem for experiments.

Which is better for a beginner: no-code tools or learning the basics?

No-code automation tools are faster for common tasks. Learning the basics of requests and JSON takes an afternoon and makes those tools far easier to use and debug. Doing both works well.

Is the model on this site Claude?

No. The endpoint serves free-ai, an independent open-weight model of about 35B parameters. The site is not affiliated with Anthropic and does not provide Claude keys or access.

Step by step

  1. Open a question URL — Paste an /ask address with your question into the browser and read the plain-text answer.
  2. Request JSON — Add format=json to the same address and look at the structure of the response.
  3. Send a chat request with curl — Use the terminal to post a JSON body with model, messages and max_tokens to the chat completions endpoint.
  4. Continue a conversation — Add the previous assistant reply and a new user message to the messages list and send again.
  5. Try a spreadsheet formula — Build an /ask URL from a cell with ENCODEURL and fetch it, then paste results as values.

The simplest possible request

The quickest way to see an API work is a plain web address. The endpoint on this site has a simple question URL, /ask, that takes your question in the q parameter and returns the answer as plain text. You can paste it into a browser's address bar. Spaces become %20 or plus signs, which the browser usually handles for you.

Try opening the address below. A moment later, the page shows the model's answer. That is a complete API call: your browser sent a request to an endpoint, and the server sent back a response.

Plain text or JSON

By default the answer comes back as plain text. Adding &format=json returns the same answer wrapped in JSON, which is what programs usually expect.

Why this is useful

A single URL can be called from almost anything: a browser bookmark, a shortcut on a phone, a spreadsheet formula or a no-code tool.

https://api.apiclaudekeyfree.com/ask?q=Give%20me%20three%20names%20for%20a%20bakery

https://api.apiclaudekeyfree.com/ask?q=Translate%20good%20morning%20into%20Spanish&format=json

Reading the response

With format=json, the response is a small JSON object. Learning to read it is a key skill, because every API returns structured data. Look for the field that holds the answer text, and notice any extra information such as token counts. Browsers like Firefox display JSON neatly with collapsible sections.

Other endpoints give other useful information. /v1/models lists the models available, and /health reports whether the service is up. Open both in your browser to see what they return.

Status codes

Every response has a status code. 200 means success. 429 means you sent requests too quickly, and 503 means the server is busy; in both cases wait a few seconds and try again.

Limits are per IP

On this endpoint you can make one request per second with short bursts of three, two at a time, and up to 10,000 per day. That is far more than you need for learning.

An envelope passing through a brass letter slot
A request goes in through an endpoint, and a response comes back out.

Moving to the terminal with curl

The question URL is convenient but limited. To control things like the system prompt, the length of the answer or the creativity setting, you send a proper chat request. The standard tool for this is curl, which is preinstalled on macOS, Linux and recent versions of Windows.

Open a terminal, paste the command below and press Enter. It sends a JSON body to the chat completions endpoint, with a system message that sets the assistant's behaviour and a user message with your question.

Messages and roles

The messages list is the conversation. system sets standing instructions, user is you, and assistant holds previous model replies if you want to continue a conversation.

Useful parameters

max_tokens caps the answer length, and temperature controls creativity: lower is more predictable, higher is more varied.

curl https://api.apiclaudekeyfree.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "free-ai",
    "max_tokens": 200,
    "messages": [
      {"role": "system", "content": "You answer in one short paragraph."},
      {"role": "user", "content": "What is an API, in plain words?"}
    ]
  }'

The conversation is yours to remember

One surprise for newcomers is that the API does not remember anything. Each request is independent. In a chat app, the app quietly sends the whole conversation every time; with the API, you do it yourself by including earlier messages in the list.

To continue a conversation in curl, add the previous assistant reply to the messages, followed by your next question. This is also why long conversations cost more with paid providers: every request includes all the earlier text.

Stateless by design

Statelessness makes APIs simple and predictable. The server needs no memory of you, and you control exactly what the model sees.

A vintage telephone switchboard with patch cables
Each request carries its own conversation; the server keeps no memory.

Calling the API from a spreadsheet

Spreadsheets are a natural place for simple automation: a column of product names, a column of generated descriptions. Google Sheets has an IMPORTDATA function that fetches a URL, and Apps Script can make full requests. Microsoft Excel offers WEBSERVICE on Windows desktop versions and Power Query elsewhere.

With the question URL, a basic formula is enough for short prompts. Build the URL from a cell's contents with ENCODEURL so special characters are handled correctly. Note that IMPORTDATA treats commas as column separators, so answers containing commas may spill across several cells; for longer text, a short Apps Script function using UrlFetchApp is more robust.

Mind the rate

A sheet with hundreds of rows will fire many requests at once and hit the per-second limit. Process rows in small batches, or use a script with a pause between calls.

Results may refresh

Spreadsheet functions can recalculate and call the API again. Copy results and paste them as values once you are happy with them.

=IMPORTDATA("https://api.apiclaudekeyfree.com/ask?q=" & ENCODEURL("Write a one-line description for: " & A2))

Understanding API keys properly

When you move to a paid provider, you will create an API key in their console. Treat it like a password linked to your credit card. Never paste it into public places, shared documents, browser extensions you do not trust or client-side code on a website. If it leaks, revoke it in the console immediately.

You will also see offers of free or cheap keys for popular commercial models. These are almost always someone else's credentials or accounts used against the provider's terms, and they can stop working at any moment while exposing your data. Get keys only from the provider's own console.

Why keyless works here

The free endpoint identifies callers by IP address and applies per-IP limits instead of billing. That makes it safe to call from browsers and spreadsheets, at the cost of lower limits and no SLA.

  • Store keys in environment variables or a secrets manager, not in files you share.
  • Use separate keys for separate projects so you can revoke one without breaking others.
  • Set spending limits and alerts in the provider's console.
  • Never use keys from lists, generators or resellers.
A key inside a small open safe
A paid API key is a secret tied to your billing, so store it like one.

Your first tiny automation

Once you are comfortable with requests and responses, combine them into something useful. A good first project is a single-file web page with a text box and a button that sends the text to the API and shows the result, for example a tone rewriter for emails. Because the endpoint has open CORS and needs no key, such a page can call it straight from the browser.

If you would like a model to write that page for you, the approach in building artifact-style mini apps walks through generating and previewing it safely.

Start with one task

Pick one repetitive task you actually do, such as summarising meeting notes or drafting replies. Automating something real teaches more than abstract exercises.

Keep a log of prompts

Save the prompts that work well. They become the reusable core of later automations.

Moving to a paid provider later

Everything you learned transfers. Many providers accept the same OpenAI-style chat format, so switching means changing the base address, the model name and adding a key header. Anthropic's native API uses a slightly different format with its own field names; the differences are explained in OpenAI format vs the Messages API.

Expect a quality jump on hard tasks when you move to a top commercial model, and new costs that scale with usage. The free endpoint remains handy for experiments, testing and as a fallback when your main provider is unavailable.

Check current pricing

Prices and limits change. Before committing, read your chosen provider's current pricing and rate-limit pages rather than relying on old blog posts.

Keep a free sandbox

A keyless endpoint is a good place to test prompts and scripts before spending paid credits on them.

A finished handmade birdhouse on a workbench
A first small automation turns practice into something useful.
Try the free API

Send a test request to the keyless, OpenAI-compatible endpoint on the home page and see how it fits your project.

Read also