Rach don t-susbaint
Tha an Nymbot.

Bun-eòlais Pàirt

Thòisich e gnìomhachas

Tha an t-àireamh-fòn a tha an t-àireamh-fòn an t-àireamh-fòn an t-àireamh-fòn.

Tha an t-àireamh-fòn, tha an t-àireamh-fòn an t-àireamh-fòn. Pàirt Tha mi menu. PàirtA sireadh an ID model. Lùghdaich modelThòisich e gnìomhachas anthropic/claude-sonnet-5 Tha equilibrium àm. nymbot/auto is the cheaper choice on the standard balance for plain chat, but it can’t call tools, which Goose needs; for that, pick a catalog model with capabilities.tools.

Setup for coding agents such as Claude Code, Codex, Cline, Kilo Code and Continue is on its own page: Thòisich e gnìomhachas.

A sireadh an t-àireamh-fòn.

A bheil aon de na cùmhnantan as fheàrr as fheàrr as urrainn dhaibh fhaighinn.Atharrachadh.

Lùghdaich SDK

Tha an t-àireamh-tòrr a-tòrr a-tòrr a-tòrr. base_url Thòisich e gnìomhachas ann an t-àireamh-fòn, t-àireamh-fòn.

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "anthropic/claude-sonnet-5", "messages": [{"role": "user", "content": "Hello"}]}'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

JavaScript

// npm install openai
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);

Thòisich e gnìomhachas, as an plugins Thòisich e gnìomhachas, seo. extra_body Thòisich e gnìomhachas ann an JavaScript. nymbot Tha an t-àireamh-fòn a responses. reply.model_extra["nymbot"] Tha an Python. reply.nymbot Tha an t-àireamh-fòn a-riamh a-riamh a-riamh. OPENAI_BASE_URL agus OPENAI_API_KEY Tha an t-àireamh-fòn, tha an t-àireamh-fòn.

Sgrìobh e SDK

'S e an Anthropic Library. https://nymbot.ai/api A sireadh an urla, sin. /v1Tha an add-on /v1/messages Tha an t-àireamh-fòn, no an t-àireamh-fòn.

cURL

curl https://nymbot.ai/api/v1/messages \
  -H "x-api-key: $NYMBOT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'

Python

# pip install anthropic
import os
import anthropic

client = anthropic.Anthropic(base_url="https://nymbot.ai/api", api_key=os.environ["NYMBOT_API_KEY"])

message = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)

JavaScript

// npm install @anthropic-ai/sdk
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ baseURL: "https://nymbot.ai/api", apiKey: process.env.NYMBOT_API_KEY });

const message = await client.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content[0].text);

Pàirt

Thòisich e gnìomhachas ann an t-àireamh-fòn, eadar-dhealaichte. openai/ Tha an t-àireamh-fòn a tha seo a tha a tha seo a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha a tha.

Shell

export OPENAI_API_BASE=https://nymbot.ai/api/v1
export OPENAI_API_KEY=sk-nymbot-...
aider --model openai/anthropic/claude-sonnet-5

Tha an t-àireamh-fòn, tha an t-àireamh-fòn, tha an t-àireamh-fòn. --no-show-model-warnings Tha iad.

Pàirt Open

Thòisich e an Open Web. Pàirt PanelTha PàirtTha PàirtThòisich e gnìomhachas ann an OpenAI API:

  • Pàirt: https://nymbot.ai/api/v1
  • Thòisich e gnìomhachas.

Seo docamaideadh na Teamplaid:Dàta brataich Rìoghachd na h-Eadailte. OPENAI_API_BASE_URL agus OPENAI_API_KEY.

Tha an t-àireamh-fòn, tha an t-àireamh-fòn, tha an t-àireamh-fòn, tha an t-àireamh-fòn.

Pàirt

Tha goose configureTha Choice Sgrìobh e provider.Tha Pick PàirtTha an t-àireamh-fòn, tha an t-àireamh-fòn, tha an t-àireamh-fòn.

Shell

export GOOSE_PROVIDER=openai
export OPENAI_HOST=https://nymbot.ai/api
export OPENAI_BASE_PATH=v1/chat/completions
export OPENAI_API_KEY=sk-nymbot-...
export GOOSE_MODEL=anthropic/claude-sonnet-5
goose session

Thòisich e gnìomhachas ann an t-àite, tha an t-àite. capabilities.tools A bheil aon de na cùmhnantan? nymbot/auto Refuse an t-àireamh.

Pàirt HTTP

A bheil aon de na cùmhnantan as fheàrr as fheàrr as urrainn dhaibh fhaighinn.

  • Thòisich e gnìomhachas as Authorization: Bearer sk-nymbot-….
  • Thòisich e gnìomhachas Content-Type: application/json.
  • Tha an t-àireamh-fòn, tha an t-àireamh-fòn, tha an t-àireamh-fòn. -N Tha thu a’ dèanamh nad shuidhe an-sgeulachdan.
  • Tha an t-àireamh cost a X-Nymbot-Cost-Sats Thòisich e gnìomhachas. X-Request-Id Tha an t-àireamh-fòn a tha thu a 'dùileachadh.

cURL

curl -i https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "nymbot/auto", "messages": [{"role": "user", "content": "Hello"}]}'

Python

import os
import requests

res = requests.post(
    "https://nymbot.ai/api/v1/chat/completions",
    headers={"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]},
    json={"model": "nymbot/auto", "messages": [{"role": "user", "content": "Hello"}]},
)
print(res.headers["X-Nymbot-Cost-Sats"], res.headers["X-Request-Id"])
print(res.json()["choices"][0]["message"]["content"])

JavaScript

const res = await fetch("https://nymbot.ai/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.NYMBOT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ model: "nymbot/auto", messages: [{ role: "user", content: "Hello" }] }),
});
console.log(res.headers.get("X-Nymbot-Cost-Sats"), res.headers.get("X-Request-Id"));
console.log((await res.json()).choices[0].message.content);