Developer Documentation
Everything you need to build with Arshan: authentication, models, agents, webhooks and SDKs for Python and Node.js.
Introduction
The Arshan API gives you programmatic access to everything in the platform: deploy and call models, run agents, manage datasets and receive events in real time. It is organised around REST, uses predictable resource URLs and returns JSON.
https://api.arshan.ai/v1Quickstart
Install an official SDK, set your API key as an environment variable and make your first request.
# Python
pip install arshan
# Node.js
npm install @arshan/sdkfrom arshan import Arshan
client = Arshan() # reads ARSHAN_API_KEY from the environment
result = client.predictions.create(
model="sentiment-v3",
input="The new dashboard saves our team hours every week.",
)
print(result.label, result.confidence) # positive 0.97test mode while you build. Test requests are free and never count towards your limits.Authentication
Authenticate every request with a secret API key in the Authorization header. Create and rotate keys in Settings → API Keys. Keys are scoped to a single workspace and can be limited to read-only access.
curl https://api.arshan.ai/v1/models \
-H "Authorization: Bearer $ARSHAN_API_KEY"Models
List the models available to your workspace, including your fine-tuned versions.
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by language, vision or forecast. |
limit | integer | Number of results, 1 to 100. Defaults to 20. |
Predictions
Send input to a deployed model and receive a prediction. Requests are synchronous for most models; long-running jobs return a job_id you can poll or receive by webhook.
Agents
Agents combine a model, tools and policies to complete multi-step tasks. Start a run, then stream steps or wait for the result.
const run = await arshan.agents.run({
agent: "support-triage",
input: { ticketId: "TCK-48213" },
maxSteps: 8,
});
console.log(run.status, run.output.summary);Webhooks
Subscribe to events such as agent.run.completed or model.deployed. Each payload is signed with your endpoint secret in the Arshan-Signature header.
{
"id": "evt_9f2c1a",
"type": "agent.run.completed",
"created": 1767225600,
"data": { "run_id": "run_51b0", "status": "succeeded" }
}SDKs
- Python:
pip install arshan(3.9+) - Node.js:
npm install @arshan/sdk(18+) - Go:
go get github.com/arshan-ai/arshan-go
Examples
Browse complete sample apps: an inbox triage agent, a RAG assistant over Google Drive, a demand forecasting notebook and a Slack bot. Each example includes a one-click deploy button.
Rate Limits
Limits depend on your plan. Responses include X-RateLimit-Remaining headers, and requests over the limit return 429. See pricing for plan limits or the changelog for recent API changes.
| Plan | Requests / minute | Concurrent agent runs |
|---|---|---|
| Starter | 60 | 2 |
| Professional | 1,200 | 50 |
| Enterprise | Custom | Custom |