Quickstart

From a new account to curl, Python, and TypeScript.

You need an account, credits, and a model with an available offer. These examples use claude-sonnet-5-5; copy a currently available ID from Marketplace if it is not listed for your key.

Create your account and key

Sign up

Open unused.market, create your account, and sign in to the dashboard.

Account form with the fields needed to enter the dashboard

Add credits

Open Credits → Add credits. Choose Card and complete the checkout shown, or use USDC on Base when it is available. Wait until the payment is confirmed and your credit balance updates.

Credits panel with the Add credits action and payment methods

Create an API key

Open API Keys → Create new key. Enter a name such as local development, then select Create key. Copy the full value now: the dashboard shows it only once.

API Keys page showing where to create and name a key, with key values hidden

Set your environment

Replace sk-unused-... with the complete key copied from the dashboard. This string is an illustrative placeholder, not a valid key.

Terminal
export UNUSED_API_KEY='sk-unused-...'
export UNUSED_BASE_URL='https://unused.market/v1'

The Use a key section of API Keys shows the exact base URL for your account. Examples here use https://unused.market/v1.

Send your first curl request

Save this file in your working directory:

request.json
{
  "model": "claude-sonnet-5-5",
  "messages": [{ "role": "user", "content": "Reply with one short greeting." }],
  "max_tokens": 64
}
Send Chat Completions
curl --fail-with-body -i "$UNUSED_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $UNUSED_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json

A successful response is HTTP 200, with text under choices[0].message.content and token counts under usage. Keep the x-request-id response header. Open Analytics → Requests and search for that ID to confirm the model, cost, and status.

Use a key panel showing the account's base URL, authentication header, and curl request

Make your first SDK call

Run either example in the same terminal so it can read your environment variables.

Install
python -m pip install openai
hello.py
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["UNUSED_API_KEY"],
    base_url=os.environ["UNUSED_BASE_URL"],
)
response = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Reply with one short greeting."}],
    max_tokens=64,
)
print(response.choices[0].message.content)
Run
python hello.py

Both examples use the same unused.market key and model. The OpenAI SDK calls /v1/chat/completions; the Anthropic SDK appends /v1/messages to the host. Confirm your second request in Analytics → Requests, then choose your coding agent guide.

Requests history where you can verify the SDK call after running the example

If the request fails

ResultNext action
401Replace the placeholder with your full unused.market key.
402Add credits, check the key's monthly limit, or reduce the requested output budget.
403Check both the key's allowed models and Routing model lists.
404Copy the exact model ID from Marketplace.
503Check available offers and the price cap, then respect Retry-After.

See Troubleshooting for stream errors and request history.

On this page