Documentation v1 · UPDATED 21 AUG 2026
Get an API key

Clients

Spot has three persona APIs and four official clients. Inference and tickets use https://aispotmarket.com/buy/api; simple seller capacity uses https://aispotmarket.com/sell/api; advanced market operations use https://aispotmarket.com/market/api.

What Spot is for · OpenAPI

Available today

You have…Use
An existing OpenAI Chat Completions clientChange base_url / baseURL to https://aispotmarket.com/buy/api/v1, keep your SDK, add max_price. Nothing to install.
A script, health check, or one-shot callThe aispot CLIcurl -fsSL https://aispotmarket.com/install.sh | sh
Any other language, or you want the wire contractPOST https://aispotmarket.com/buy/api/v1/chat/completions, against the Buyer OpenAPI

For most buyers the first row is the whole integration. Spot implements the OpenAI Chat Completions API, so an existing client keeps working — you change where it points and add a price ceiling.

Do not install an unrelated package named spot. Homebrew, npm, and PyPI already ship other projects under that name; none of them are this.

Official SDKs — not yet released

Typed SDKs for TypeScript, Python, and Rust exist and are documented here, but they are not published to npm, PyPI, or crates.io, so there is currently no way to install them from outside. Until they ship, use an OpenAI-compatible client, the CLI, or plain HTTP.

LanguagePackage name (reserved)Entry pointsReference
TypeScript@ai-token-gateway/sdkBuyerClient, SellerClientTypeScript SDK
Pythontoken-gatewayBuyerTokenGateway, SellerTokenGatewayPython SDK
Rusttoken-gateway-sdkBuyerClient, SellerClientRust SDK

The SDK pages describe the API those packages present, so you can see what an integration will look like and tell whether it fits. The aispot CLI is a thin front end over the same Rust client and is available now.

Shared rules

Every client, including a raw curl, follows the same contract.

TopicRule
Buyer authAuthorization: Bearer <key>SPOT_API_KEY or BUYER_API_KEY
Seller authX-Seller-API-KeySPOT_SELLER_KEY (register is public)
HostBuyer default https://aispotmarket.com/buy/api. Seller default https://aispotmarket.com/sell/api. Override with the client-specific environment variable or --base-url.
Discoveryfrom_config / fromConfig / --from-config calls GET {url}/v1/config and uses gatewayApiUrl. There is no hardcoded fallback. Local: GATEWAY_CONFIG_URL or GATEWAY_URL.
PricesDecimal strings, per 1,000 tokens ("0.05"). The SDK does not parse or rescale max_price.
VersionPath /v1. See versioning.
LimitsHonor RateLimit, RateLimit-Policy, and Retry-After. See rate limits.
Not on v1Embeddings, images, audio, fine-tuning, webhooks, MCP

Buyer surface

Same job on every official client. Streaming and capacity tickets are extras — chat completions is the path that fills.

JobTypeScriptPythonRustCLI
Constructnew BuyerClient({ baseUrl, apiKey })BuyerTokenGateway(url, buyer=BuyerAuth(key))BuyerClient::new(url, BuyerKey(key))--base-url / SPOT_API_URL
DiscoverBuyerClient.fromConfig(configUrl, key)BuyerTokenGateway.from_config(url, buyer=…)BuyerClient::from_config(url, key).await--from-config
ChatchatCompletions({ model, messages, max_price })chat_completions(model=, messages=, max_price=)chat_completions(&ChatCompletionsRequest { … })aispot chat --message … --max-price …
StreamchatCompletionsStreamchat_completions_streamchat_completions_stream
Ticketsbuy / wait / spend / replenishhelpers in token_gateway.ticketsbuy / wait / spend / replenish

Seller surface

JobTypeScriptPythonRustCLI
Constructnew SellerClient({ baseUrl })SellerTokenGateway(url)SellerClient::new(url, None)--base-url
Registerregister({ name, endpoint_url, supported_models, regions, api_key })register_seller(name=, endpoint_url=, regions=, …)register(&RegisterSellerRequest { … })aispot seller register
Set keysetApiKey(key)pass SellerAuth / key on later callsset_key(SellerKey(key))--seller-key / SPOT_SELLER_KEY
List capacitycreateOffer({ model, price_per_million_tokens, quantity_tokens })create_offer(model=, price_per_million_tokens=, quantity_tokens=)create_offer(&CreateSellerOfferRequest { … })aispot seller ask
Stop sellingcancelOffer(offerId)cancel_offer(offer_id)cancel_offer(offer_id)aispot seller cancel
CapacityreportCapacity({ … })report_capacity(…)report_capacity(&…)aispot seller capacity
TradeslistTrades()list_trades()list_trades()aispot seller trades

Language pages have install commands and a first-fill example: TypeScript, Python, Rust. CLI mapping: aispot CLI. Wire shapes: chat completions, submit ask.

Prompt an agent

Paste the block on What Spot is for → Prompt your agent. It tells the agent to read this page, pick one row from the table above, and implement against the named package.

Also here