Skip to content

Your first API request ​

Use a personal key created in API keys. The public gateway is https://api.llm.netter.io; inference protocols are under /v1.

Prepare your client ​

Provide your key in the NETTER_API_KEY environment variable through your secret manager or tool's secure configuration. Examples read from the environment and contain no real credentials.

sh
curl --fail-with-body https://api.llm.netter.io/v1/models \
  -H "Authorization: Bearer $NETTER_API_KEY"

Choose a name from the authorized catalog. Replace PUBLIC_MODEL_NAME below with its exact name. Use switchyard when it is authorized and configured.

Chat Completions ​

sh
curl --fail-with-body https://api.llm.netter.io/v1/chat/completions \
  -H "Authorization: Bearer $NETTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "PUBLIC_MODEL_NAME",
    "messages": [{"role": "user", "content": "Write a short greeting."}],
    "max_tokens": 1024
  }'

A catalog model does not necessarily have a mapping for every protocol. Use a compatible surface and check output limits: a large maximum can require more credit than is available.

Messages ​

sh
curl --fail-with-body https://api.llm.netter.io/v1/messages \
  -H "x-api-key: $NETTER_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "PUBLIC_MODEL_NAME",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Do not use portal or upstream provider credentials. For errors, first check authentication, permitted model, protocol and wallet availability.

What is charged ​

Authorized requests reserve credit before upstream dispatch. Final charges use provider counters and applicable prices. A transport error can leave a reservation awaiting review. See Credit and top-ups.

Continue with Protocols, Streaming and Endpoint reference.