Sonnely

Developer documentation

Connect a wallet, create a scoped key, and send your first completion.

Quickstart

  1. Open the playground to try a sample or sign in with a Solana wallet.
  2. Create a key under API keys. Save it to a secrets manager when it appears.
  3. Set SONNELY_ORIGIN to https://sonnely.com and SONNELY_API_KEY to your key. Live requests require managed inference and available credits.
curl "$SONNELY_ORIGIN/api/sonnely/v1/chat/completions" \  -H "Authorization: Bearer $SONNELY_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017",    "messages": [{"role":"user","content":"Summarize this design."}]  }'

API reference

Base URL https://sonnely.com/api/sonnely/v1

GET /models
Public model discovery. Each entry includes the exact id to pass to the completion endpoint.
POST /chat/completions
Send JSON with Authorization: Bearer $SONNELY_API_KEY. Pass model, messages, and optionally max_tokens and stream: false.

Read text from choices[0].message.content and token counts from usage. Use clients that support non-streaming Chat Completions with text messages. Streaming, tool calls, multimodal inputs and the Responses API are outside this API’s current contract.

Request limits

Body
36,000 bytes of JSON, including text and formatting.
Messages
Up to 32, each with role system, user or assistant and a text string up to 12,000 characters.
Output tokens
512 by default, configurable from 1 to 2,048.

Provider context windows in the catalog describe the models. Every request through Sonnely is subject to the gateway limits above.

Errors and recovery

Read error.message for the specific issue returned by the gateway.

StatusMeaningWhat to do
400Malformed JSON or unsupported fieldsCheck the request format and supported fields.
401Missing, expired or invalid keyCheck the Authorization header and the key in the console.
402Insufficient credits or key budgetReview available credits and the key’s daily and lifetime limits.
404Unknown model IDUse the ID returned by the model-list endpoint.
413Request body too largeReduce the amount of text or send fewer messages.
415Unsupported media typeSend Content-Type: application/json.
429Account request limitWait one minute before trying again.
502Provider failure, timeout or incomplete usageCheck the usage ledger before retrying. A reservation may still be held.
503Account service or managed inference unavailableCheck status in the console. Use a sample while inference is unavailable.

Key management

Give each app or task its own key so you can track usage separately. Set a daily budget, a lifetime budget and an expiry as needed. Daily budgets reset at midnight UTC. Create and verify a replacement before revoking the old key during a rotation.

Manage keys

Data handling

HTTPS protects requests in transit to the Sonnely gateway. The gateway reads prompts for validation and forwards them to NEAR AI Cloud. Account and usage records include the wallet identity, model, key label, token counts, request status and charges. The ledger excludes prompt and response text.

Optional chat history is stored in this browser. Manage it in Settings and clear it on shared devices.

Attestation

NEAR AI publishes hardware evidence for its Private TEE model tier. Check the provider’s evidence and assess the Sonnely gateway separately. Through this gateway, clients do not receive end-to-end encryption or per-response attestation verification.

NEAR AI verification guide

Payments and credits

Start in Billing. Eligible accounts can buy credits in any positive USDC amount with up to six decimal places. Review the network, amount and recipient before approving. Your wallet pays the SOL network fee and any token account setup.

  1. On Seeker, open Sonnely in Android Chrome and select Solana mobile wallet when you connect. Select the account you use for Sonnely.
  2. Continue to payment and choose Pay with connected wallet. Approve the transfer in your wallet. You can also use a Solana Pay link or scan the QR on another device.
  3. Credits post automatically after the transfer finalizes. To continue later, choose Resume payment in Billing. If needed, check a transaction signature manually.

Verified mainnet payments create spendable credits. NEAR Intents provides informational quotes.

Read the pricing and settlement guide