Quickstart
Kyvalt is an inference API for frontier models. It speaks the OpenAI and Anthropic formats, so the SDK you already use works after you change two values: the base URL and the API key. Each request goes to the cheapest live seller offer for the model you name, and is charged from your prepaid balance.
1. Create an account and a key
- Create an account and sign in.
- Open API keys and create a key. It starts with
kv-and is shown once, so store it in a secret manager or an environment variable. - Open Billing and deposit USDC on Base to your account address. Requests need an available balance before they run.
shell
export KYVALT_API_KEY="kv-..."
2. Send a request
The base URL is https://api.kyvalt.com/v1. The example uses deepseek-v4-pro, the model with the largest discount right now; any ID from Models works.
curl
curl
curl https://api.kyvalt.com/v1/chat/completions \
-H "Authorization: Bearer $KYVALT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-pro",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Write a haiku about latency."}]
}'Python (OpenAI SDK)
python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["KYVALT_API_KEY"],
base_url="https://api.kyvalt.com/v1",
)
reply = client.chat.completions.create(
model="deepseek-v4-pro",
max_tokens=256,
messages=[{"role": "user", "content": "Write a haiku about latency."}],
)
print(reply.choices[0].message.content)Node.js (OpenAI SDK)
javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.KYVALT_API_KEY,
baseURL: "https://api.kyvalt.com/v1",
});
const reply = await client.chat.completions.create({
model: "deepseek-v4-pro",
max_tokens: 256,
messages: [{ role: "user", content: "Write a haiku about latency." }],
});
console.log(reply.choices[0].message.content);Python (Anthropic SDK)
The Anthropic SDK adds /v1/messages itself, so give it the host without /v1.
python
import os
import anthropic
client = anthropic.Anthropic(
api_key=os.environ["KYVALT_API_KEY"],
base_url="https://api.kyvalt.com",
)
message = client.messages.create(
model="deepseek-v4-pro",
max_tokens=256,
messages=[{"role": "user", "content": "Write a haiku about latency."}],
)
print(message.content)3. Check what you paid
Every request appears in Usage logs with its model, token counts, cost, duration, and the prompt and response. The response itself carries an x-request-id header; quote it when you contact support about a request.
Next steps
- Set a discount floor or a price cap so a request never costs more than you planned.
- Keep holds small with
max_tokensand learn when you are charged. - Handle errors by code instead of by message.