OpenAI API: what it is, which endpoints exist and why the format became a standard

An API lets your code call a model instead of a person typing in a chat. A look at requests, responses and why the OpenAI format is used far beyond the company itself.

4 min · · API keys · development

If you are asking what the OpenAI API is, the short answer is this: it is an HTTP interface through which your program sends text to a model and receives a reply. ChatGPT is a ready-made application for people, while the API is a set of addresses and rules for developers. The OpenAI request format turned out to be so convenient that many gateways, editors and libraries replicate it. Below we look inside and show working examples. Prices are as of October 18, 2026.

API versus ChatGPT

ChatGPTOpenAI API
Who it is forpeople, a chat windowprograms and developers
How you paya subscription on the serviceper token, as you use it
What you geta dialogue in an interfaceJSON with the reply and a token counter
Controlinterface settingsrequest parameters, system prompt, tools

Subscription terms and prices change, so check the current plan on the service's own site. For a developer something else matters: the API is paid only for the tokens used, so you pay for real requests, not for a month of access.

The main endpoints

The OpenAI format has several addresses, and three of them you will meet constantly. All are available under the base address https://api.zukko.pro/v1:

  • POST /v1/chat/completions is the classic chat. You send a list of messages with the roles system, user, assistant and receive a reply. Reference: Chat Completions.
  • POST /v1/responses is a newer interface where the input is set in an input field. The differences are described in the article responses or chat completions.
  • GET /v1/models is the list of models available to your key.

OpenAI itself has other groups of methods too. Which of them a given gateway supports is stated in its documentation; for text tasks the three above are usually enough.

The first request

With curl:

bash
curl https://api.zukko.pro/v1/chat/completions \
  -H "Authorization: Bearer $ZUKKO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-sol",
    "messages": [
      {"role": "system", "content": "Answer briefly."},
      {"role": "user", "content": "What is HTTP status 404?"}
    ]
  }'

The reply is JSON. What you need from it is choices[0].message.content (the text) and usage (how many tokens went to input and output, which determine the price).

With the Python openai library:

bash
from openai import OpenAI

client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")

r = client.chat.completions.create(
    model="gpt-6.1-sol",
    messages=[
        {"role": "system", "content": "Answer briefly."},
        {"role": "user", "content": "What is HTTP status 404?"},
    ],
)
print(r.choices[0].message.content)
print(r.usage.prompt_tokens, r.usage.completion_tokens)

The same request through /v1/responses:

bash
r = client.responses.create(
    model="gpt-6.1-sol",
    input="What is HTTP status 404? Answer briefly.",
)
print(r.output_text)

Listing models:

bash
for m in client.models.list():
    print(m.id)

Streaming the reply

To make text appear as it is generated, add stream=True. In a stream the server always sends a last chunk with usage data and an empty choices list, so a check is needed before reading choices[0]:

bash
stream = client.chat.completions.create(
    model="gpt-6.1-sol",
    messages=[{"role": "user", "content": "Tell me about HTTP status codes"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices:
        delta = chunk.choices[0].delta.content
        if delta:
            print(delta, end="", flush=True)

Why this format became a standard

The reason is practical, not technical. First, libraries, editors and frameworks learned to speak exactly this language. Then a network effect kicked in: it is easier for each new tool to support an already common format, and it is more profitable for each model provider to replicate it so that existing programs work without rewriting.

For you this means freedom of choice. In the client it is enough to change two values: base_url and the key. The code stays the same, and the model is chosen with a string in the model field. So one program can work with models from different companies. Cursor, Cline, Kilo Code, Codex, LangChain, LibreChat, Open WebUI and many others rely on this compatibility. More on the concept itself: OpenAI compatible API: what it is.

Any Zukko model can be called in both the OpenAI format and the Anthropic format (/v1/messages). One limitation: for Claude the cache discount comes from the Anthropic format specifically, while in the OpenAI format all Claude input is billed at the input price.

Getting access from Russia

For the terms of direct access to OpenAI services in your country and the payment methods, check the company's own site. An alternative is access from Russia through the Zukko gateway, paying by SBP (the payment page adds an 8.5% fee on top), a MasterCard, or cryptocurrency. You create a fetch_... key in the dashboard, put it in together with the base_url, and use the models listed in GET /v1/models. A step-by-step start is in the quick start.

What a request costs

Example: a request with 1000 input tokens and 500 output tokens to gpt-6.1-sol, prices as of October 18, 2026: 0.27 for input and 1.32 for output per 1M tokens:

1000 × 0.27 / 1,000,000 + 500 × 1.32 / 1,000,000 = 0.00027 + 0.00066 = $0.00093.

A thousand such requests cost about $0.93. Current prices and models are at GET /v1/models or on the "Models" page in the dashboard.

FAQ

What is the OpenAI API in simple terms?

It is a set of internet addresses where a program sends a request with text and receives a model's reply. Instead of a chat window you have code and parameters.

Do I need a ChatGPT subscription to use the API?

They are different ways of paying. The API is paid per token and does not require a subscription to the app. Check the terms of the subscription itself on the service's site.

What does "OpenAI-compatible" mean?

The service accepts requests in the same format: the same addresses, fields and the Authorization: Bearer header. So programs written for OpenAI work with it after you change base_url and the key.

Can Claude models be called through this format?

Yes. Any model in the catalog can be called in the OpenAI format, but the discounted Claude cache works in the Anthropic format. For ordinary requests without large repeated contexts you will not notice a difference.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

What is the OpenAI API and how does it work · Zukko