Endpoints
Explore all available Sandbloc API endpoints to manage workflows, agents, and integrations seamlessly.
Sandbloc offers a variety of endpoints to interact with workflows, agents, and integrations. This guide provides an overview of all key endpoints, their usage, and example requests.
1. Base URL
All API requests start with the following base URL:
plaintextCopy codehttps://api.sandbloc.io/v1/
Make sure to include your Sandbloc API Key in the request headers:
httpCopy codeAuthorization: Bearer YOUR_SANDBLOC_API_KEY
2. Endpoints Overview
Endpoint
Method
Description
/workflows
POST
Create a new AI workflow.
/workflows/{id}
GET
Retrieve details of a specific workflow.
/agents
POST
Deploy a new AI agent.
/agents/{id}
GET
Get details of a deployed agent.
/integrations
GET
List all supported integrations.
/vector-stores
GET
Retrieve supported vector stores.
3. Endpoint Details and Examples
1. Create a Workflow
Endpoint:
httpCopy codePOST /workflows
Request Example:
jsonCopy code{
"name": "telegram-chatbot",
"input": {
"platform": "telegram",
"parameters": {
"token": "YOUR_TELEGRAM_BOT_TOKEN"
}
},
"processing": {
"provider": "openai",
"model": "gpt-4",
"api_key": "YOUR_OPENAI_KEY",
"prompt": "Summarize this text."
},
"output": {
"platform": "telegram"
}
}
Response Example:
jsonCopy code{
"id": "wf_123456",
"status": "created",
"name": "telegram-chatbot",
"created_at": "2024-06-18T12:00:00Z"
}
2. Get Workflow Details
Endpoint:
httpCopy codeGET /workflows/{id}
Request Example:
httpCopy codeGET /workflows/wf_123456
Authorization: Bearer YOUR_SANDBLOC_API_KEY
Response Example:
jsonCopy code{
"id": "wf_123456",
"name": "telegram-chatbot",
"status": "active",
"created_at": "2024-06-18T12:00:00Z",
"steps": [
{"input": "telegram"},
{"processing": "openai"},
{"output": "telegram"}
]
}
3. Deploy an AI Agent
Endpoint:
httpCopy codePOST /agents
Request Example:
jsonCopy code{
"workflow_id": "wf_123456",
"parameters": {
"auto_restart": true
}
}
Response Example:
jsonCopy code{
"id": "agent_789xyz",
"status": "running",
"workflow_id": "wf_123456",
"created_at": "2024-06-18T12:05:00Z"
}
4. Get Agent Details
Endpoint:
httpCopy codeGET /agents/{id}
Request Example:
httpCopy codeGET /agents/agent_789xyz
Authorization: Bearer YOUR_SANDBLOC_API_KEY
Response Example:
jsonCopy code{
"id": "agent_789xyz",
"status": "running",
"workflow_id": "wf_123456",
"uptime": "12 hours 45 minutes"
}
5. List All Integrations
Endpoint:
httpCopy codeGET /integrations
Request Example:
httpCopy codeGET /integrations
Authorization: Bearer YOUR_SANDBLOC_API_KEY
Response Example:
jsonCopy code{
"integrations": [
{"provider": "openai", "models": ["gpt-3.5", "gpt-4"]},
{"provider": "claude", "models": ["claude-2"]},
{"provider": "gemini", "models": ["gemini-1"]},
{"provider": "perplexity", "services": ["search"]},
{"provider": "custom-api", "support": true}
]
}
6. Retrieve Supported Vector Stores
Endpoint:
httpCopy codeGET /vector-stores
Request Example:
httpCopy codeGET /vector-stores
Authorization: Bearer YOUR_SANDBLOC_API_KEY
Response Example:
jsonCopy code{
"vector_stores": [
"Pinecone",
"MongoDB Atlas",
"LanceDB",
"Neo4j"
]
}
4. Error Responses
API responses include standardized error codes for troubleshooting:
Code
Message
Description
400
Bad Request
Invalid request data.
401
Unauthorized
Missing or invalid API key.
404
Not Found
Resource does not exist.
429
Too Many Requests
Rate limit exceeded.
500
Internal Server Error
Something went wrong on our end.
Conclusion
Sandbloc provides a robust set of endpoints to create workflows, deploy agents, and integrate with AI models and vector stores. Use these APIs to build scalable AI solutions with ease.
For additional resources and advanced examples, explore the full API Reference section.
Last updated