OpenAI-compatible API

An OpenAI-compatible API on a node you run

Every arcade serves /v1 in the shape the OpenAI SDKs expect, with API keys you make yourself. Point it at gpt-oss or any model on your own machine, or use one another arcade shares. Your code changes one line: the base URL.

Two ways to get a model

Your own node

Share the model on your machine

Admin → LLM → Find models on this computer finds vLLM, llama.cpp, Ollama, LM Studio and other OpenAI-compatible servers. Tick gpt-oss or any other model, and your own account can use it at once.

The LLM market

Use a model another arcade shares

Exchange → LLMs lists the language and picture models other operators share, gpt-oss among them, with how fast and how busy each one is.

One API

Same endpoints either way

/v1/models, /v1/chat/completions (streaming or not, with tools), /v1/images/generations and /v1/images/edits.

OpenAI is named here only to say what works with what. ARCADE is not affiliated with OpenAI.

Make an API key

  1. Open the model's page. On your arcade, open Exchange → LLMs and tap the model's card.
  2. Make a key. Under Use it from your own apps, press Make a key, give it a name and pick which seller and coin it uses.
  3. Copy it now. The key starts with sk-arcade- and is shown once. The arcade keeps only a scrambled copy, and you can revoke the key at any time.
  4. Use your arcade as the base URL. https://your-arcade.example/v1, with the key as the bearer token.
curl https://your-arcade.example/v1/chat/completions \
  -H "Authorization: Bearer $ARCADE_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "gpt-oss-20b", "messages": [{"role": "user", "content": "Hello"}]}'

Ask /v1/models for the exact model ids your key can use.

The OpenAI SDK, with only base_url changed

Python

from openai import OpenAI

client = OpenAI(base_url="https://your-arcade.example/v1",
                api_key="sk-arcade-...")

print([m.id for m in client.models.list()])

reply = client.chat.completions.create(
    model="gpt-oss-20b",
    messages=[{"role": "user", "content": "Name three Game Boy colours."}],
)
print(reply.choices[0].message.content)

# Streaming works the same way
for chunk in client.chat.completions.create(model="gpt-oss-20b", stream=True,
        messages=[{"role": "user", "content": "Write a haiku about blocks."}]):
    print(chunk.choices[0].delta.content or "", end="")

JavaScript (Node.js)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://your-arcade.example/v1",
  apiKey: process.env.ARCADE_API_KEY,
});

const reply = await client.chat.completions.create({
  model: "gpt-oss-20b",
  messages: [{ role: "user", content: "Name three Game Boy colours." }],
});
console.log(reply.choices[0].message.content);

No code change at all

Both SDKs read the base URL and key from the environment, so many tools that use them switch over with two lines:

export OPENAI_BASE_URL=https://your-arcade.example/v1
export OPENAI_API_KEY=sk-arcade-...

Keep the key on your server or your own computer. Anyone who has it can use it until you revoke it. A web page should never carry a key: an inscribed game uses arcade.llm instead, below.

Calling a model from an inscribed game

A game on the Apps tab holds no key and runs no server. It loads /r/llm.js, and the player is asked once whether the game may use a model. The request takes the same fields as a chat completion.

<script src="/r/llm.js"></script>
<script>
arcade.llm.chat({messages: [{role: 'user', content: 'Name a dragon'}],
                 onToken: function (text) { out.textContent += text; }})
  .then(function (r) { /* r.content is the whole reply */ },
        function (e) { /* e.message: "declined", "sign in first" ... */ });
</script>

arcade.llm.image({prompt, size}) makes a picture the same way, and arcade.llm.offers() lists the models on offer. See publishing a game and the inscription API.

Questions

Is there a gpt-oss API I can run myself?

Yes. Run gpt-oss on vLLM, llama.cpp, Ollama or LM Studio, share it from your arcade's Admin → LLM, and your arcade serves it at /v1 with API keys you make.

How do I change the OpenAI base URL in Python?

Pass base_url="https://your-arcade.example/v1" to OpenAI(), or set OPENAI_BASE_URL. In the JavaScript SDK the option is baseURL.

Which model names do I use?

Whatever /v1/models lists for your key. The names come from the model server behind the arcade.

Does it support streaming, tools and images?

Yes: chat completions stream or not and take tools, and the image endpoints make and edit pictures where the seller shares a picture model.

Where do my prompts go?

With your own model, from your arcade to the model server on your machine. With a model from the market, to the arcade of the operator who shares it.

Is this OpenAI's service?

No. It is your arcade answering in the same shape as OpenAI's API, so the same SDKs and tools work with it.