API Reference

NPC Fin Inference API

OpenAI-compatible API for the NPC Fin 32B model. A fine-tuned finance specialist, quantized for fast inference.

Try PlaygroundBase URL: https://bottensor.xyz/api/v1
Quick Start

Make your first request

Send a chat completion request using curl:

curl https://bottensor.xyz/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-bt-your-key-here" \
  -d '{
    "model": "npc-fin-32b",
    "messages": [
      {"role": "system", "content": "You are NPC Fin, a financial analysis AI."},
      {"role": "user", "content": "Analyze the current BTC market structure."}
    ],
    "temperature": 0.7,
    "max_tokens": 1024
  }'
Authentication

API Keys

All requests require an API key passed in the Authorization header:

Authorization: Bearer sk-bt-your-key-here

Keys follow the format sk-bt-<32 hex chars>. Contact us to obtain a key.

Endpoints

Chat Completions

POST/api/v1/chat/completions
ParameterTypeDefaultDescription
modelstring"npc-fin-32b"Model ID
messagesarrayrequiredArray of {role, content} objects
temperaturenumber0.7Sampling temperature (0-1)
max_tokensnumber1024Max tokens to generate (1-4096)
streambooleanfalseEnable SSE streaming
top_pnumber1.0Nucleus sampling
GET/api/v1/models

Returns a list of available models in OpenAI-compatible format.

Rate Limits

Usage Limits

TierRequests/minRequests/day
Free10100
Pro605,000

When rate limited, the API returns 429 with a Retry-After header.

Streaming

Server-Sent Events

Set "stream": true to receive tokens as they are generated via SSE.

curl
curl https://bottensor.xyz/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-bt-your-key" \
  -d '{"model":"npc-fin-32b","messages":[{"role":"user","content":"Explain DCF valuation."}],"stream":true}'
Python
from openai import OpenAI

client = OpenAI(
    base_url="https://bottensor.xyz/api/v1",
    api_key="sk-bt-your-key-here"
)

stream = client.chat.completions.create(
    model="npc-fin-32b",
    messages=[
        {"role": "system", "content": "You are NPC Fin, a financial analysis AI."},
        {"role": "user", "content": "Walk me through a DCF for a SaaS company."}
    ],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
print()
Node.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://bottensor.xyz/api/v1",
  apiKey: "sk-bt-your-key-here",
});

const stream = await client.chat.completions.create({
  model: "npc-fin-32b",
  messages: [
    { role: "system", content: "You are NPC Fin, a financial analysis AI." },
    { role: "user", content: "What is the difference between EBITDA and FCF?" }
  ],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
console.log();
Errors

Error Codes

CodeTypeDescription
400invalid_request_errorMalformed request body or missing required fields
401authentication_errorInvalid or missing API key
404invalid_request_errorModel not found
429rate_limit_errorRate limit exceeded — check Retry-After header
500server_errorInternal server error
502server_errorUpstream vLLM error

All errors return JSON with {"error": {"message": "...", "type": "...", "code": N}}

Bottensor NPC Fin API · A Falcon Hash company