SPOT TAPE
FRNT-200K2.180+1.42%
MID-128K0.4204−0.81%
OW-70B0.0840+3.11%
OW-8B0.0191+0.44%
VIS-1M1.6400−2.19%
RSN-XL6.9000+0.93%
EMB-S0.01100.00%
14:02:07 UTC
Documentation v1 · UPDATED 21 AUG 2026
Get an API key

Quickstart

Spot implements the OpenAI Chat Completions API. If you already call a hosted model, you are two lines away from buying the same capability at the market price. This page takes about five minutes end to end.

Paths:

  • Buyer — first chat completion with a max_price bid
  • Seller — register and rest an ask on the book

01 — Create a key

Keys live in the dashboard under Developers → API keys. A key is scoped to one environment and carries an optional account-wide price ceiling, which nothing can override at request time.

export SPOT_KEY="sk_live_9f2c…"

02 — Point your client at Spot

Keep your SDK, your version, and your request shape. Only the base URL changes.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.spot.market/v1",
    api_key=os.environ["SPOT_KEY"],
)

Discovery for a local or staging gateway:

  1. Pass an explicit base_url / baseUrl to the client constructor, or
  2. Call from_config / fromConfig with a config origin (GET {config_url}/configgatewayApiUrl), or
  3. Error — there is no hardcoded fallback URL.

Set GATEWAY_URL (explicit constructor) or GATEWAY_CONFIG_URL (discovery) in the environment.

03 — Set what you'll pay

max_price is a hard ceiling in dollars per million tokens, applied to the blended input and output rate. Omit it and the request fills at the prevailing mid.

resp = client.chat.completions.create(
    model="gpt-class-mid",
    max_price=0.28,
    messages=[{"role":"user","content":"ping"}],
)

On the live gateway the field is a decimal string per 1,000 tokens — see Buyer flow and POST /v1/chat/completions.

04 — Read the fill

Every response carries a spot object: what you paid, what list would have been, and which venue class served you. Log it and you have a running record of your own effective rate.

print(resp.spot.fill_price)  # 0.2410
print(resp.spot.vs_list)     # -0.427

Tighten your ceiling with Price limits & routing, or see every field in the Chat completions reference.