Content पर जाएं

AI-अनुकूल API अवलोकन ​

Session contract

एक Session (ses_*) एक सहेजे गए Agent संस्करण को चलाता है; इसे सीधे POST /v1/agents/sessions के साथ बनाएं। रनटाइम इंस्टेंस आंतरिक रहते हैं और कभी वापस नहीं किए जाते।

मनुष्यों और AI agents दोनों के लिए एक संक्षिप्त संदर्भ। LLM ingestion के लिए अनुकूलित plain-text संस्करणों के लिए, llms.txt देखें।

SandBase क्या है? ​

SandBase एक AI agent infrastructure platform है। एक API key भाषा, image, video, audio, search, और data के साथ-साथ Agent workflows में सक्षम Models और APIs तक पहुंच सकती है। निश्चित संख्या पर निर्भर रहने के बजाय वर्तमान catalog खोजें।

API Base URL ​

https://api.sandbase.ai/v1

Authentication ​

सभी requests के लिए एक Bearer token आवश्यक है:

Authorization: Bearer sk-YOUR_KEY

अपनी key Developer → API Keys पर प्राप्त करें।

त्वरित उदाहरण ​

bash
curl https://api.sandbase.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.6-luna",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Core APIs ​

MethodRouteDescription
POST/v1/chat/completionsOpenAI-compatible chat; वैकल्पिक capabilities चयनित model पर निर्भर करती हैं
POST/v1/messagesAnthropic-compatible messages API
POST/v1/runअपने model-specific schema का उपयोग करके model generation सबमिट करें
GET/v1/run/{id}async generation status poll करें और results प्राप्त करें
GET/v1/modelsसक्षम logical models की सूची; डिफ़ॉल्ट रूप से LLM type
GET/v1/models/{id_or_name}model details, schema, capabilities, और pricing प्राप्त करें
GET/v1/tasks/{task_id}/costtask cost और usage प्राप्त करें

Additional API Groups ​

Core generation APIs के अलावा, SandBase Agent lifecycle management के लिए APIs प्रदान करता है। सामान्य workflows के लिए AI API Guide और पूर्ण contract के लिए OpenAPI specification देखें।

GroupKey routesPurpose
AgentsPOST /v1/agents, GET /v1/agents, POST /v1/agents/{agent_id}सहेजे गए Agent definitions बनाएं और उनका version बनाएं
SessionsPOST /v1/agents/sessions, POST /v1/agents/sessions/{session_id}/events, GET /v1/agents/sessions/{session_id}/eventsएक Agent चलाएं, input भेजें, और live events stream करें
SkillsPOST /v1/skills, GET /v1/skillsversioned instruction bundles जिन्हें Agents mount करते हैं
MCP Connections and SecretsPOST /v1/mcp-connections, POST /v1/secretsRemote HTTPS MCP tools और उनके write-only Bearer tokens

Agents platform resources Authorization: Bearer या X-API-Key स्वीकार करते हैं और failure पर {"error":{"type","code","param","message"}} लौटाते हैं।

Pricing Model ​

Pay per use. Pricing model-specific है और इस page से स्वतंत्र रूप से बदल सकती है:

  • Model pricing: चयनित model का current formula और units model_card से पढ़ें
  • Token pricing: जब उस model द्वारा घोषित हो, तो input, output, cache, या reasoning components शामिल कर सकती है
  • Media and other operations: per-request, duration, resolution, या अन्य model-specific units का उपयोग कर सकती है
  • Data APIs (search, social, scraping, e-commerce, finance): प्रत्येक organization को UTC day के अनुसार 100 free calls मिलती हैं, जो सभी eligible data APIs में साझा होती हैं; उसके बाद calls per call बिल की जाती हैं, blocked नहीं होतीं। MCP में, eligible tools sandbase_inspect में pricing.free_quota दिखाते हैं, और sandbase_account free_api_quota (daily_limit, used_today, remaining, resets_at) लौटाता है। Daily free API calls देखें।

GET /v1/models के साथ वर्तमान model ID खोजें, फिर request भेजने से पहले GET /v1/models/{id_or_name} का निरीक्षण करें। यह न मानें कि pricing या cache discounts providers के बीच साझा हैं।

जब कोई operation task ID लौटाती है, तो उसकी recorded cost का निरीक्षण करें:

bash
curl https://api.sandbase.ai/v1/tasks/{task_id}/cost \
  -H "Authorization: Bearer sk-YOUR_KEY"

Rate Limits ​

LLM, image, और free-model requests के लिए per-minute limits, और concurrency limit, organization के account level पर निर्भर करते हैं और उसके सभी API keys द्वारा साझा किए जाते हैं। Rate limits देखें। 429 response में quota या Retry-After headers शामिल नहीं होते; jitter के साथ bounded exponential backoff का उपयोग करें। Error Guide देखें।


आगे पढ़ें ​

  • AI API Guide — core workflows, request/response shapes, और curl examples
  • Models & Pricing — live model discovery, pricing, और capability guidance
  • Error Guide — documented response shapes, HTTP handling, और retry safety
  • OpenAPI Spec — machine-readable OpenAPI 3.1

Plain-Text Versions (for AI agents) ​

FileURLContent
llms.txt/docs/llms.txtसंक्षिप्त सारांश (~60 lines)
llms-full.txt/docs/llms-full.txtविस्तारित AI-उन्मुख API guide
openapi.yaml/docs/openapi.yamlOpenAPI 3.1 machine-readable spec