Quickstart Guide
Secrooq Compute provides secure, hardware-isolated Linux MicroVMs (powered by Firecracker) designed for executing arbitrary agent computations, AI workflows, and antidetect browsing environments.
1. Generate API Keys
Log in to your Secrooq Compute Dashboard, navigate to the Settings tab, and click Create New API Key. Securely store your JWT token; it represents your root tenant credential.
2. Fire Up a Sandbox
Deploy your first isolated microVM in a single curl call. The instance initializes in less than 150ms.
curl -X POST https://api.secrooq.com/sandboxes \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "autonomous-agent-01",
"type": "ai_agent",
"instance_type": "standard-1",
"image": "ubuntu:22.04"
}'
Authentication
All Central API requests must specify your secret tenant JSON Web Token (JWT) in the standard HTTP Authorization header using the Bearer schema.
Authorization: Bearer secrooq-super-secret-jwt-key...
Central API Reference
Interact directly with the Secrooq Central API. Base URL is: https://api.secrooq.com
Creates and provisions an hardware-isolated Sandbox.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name of the sandbox. |
| type | string | No | Type of workspace. Default: ai_agent. Options: ai_agent, antidetect_browser. |
| instance_type | string | No | Hardware class. Options: lite, basic, standard-1, standard-2. |
| image | string | No | OS image. Default: ubuntu:22.04. |
Execute Command
Executes a terminal shell command securely inside the microVM environment and streams standard output/error.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| command | string | Yes | The shell command sequence to run (e.g. python3 -c "print('hello')"). |
curl -X POST https://api.secrooq.com/sandboxes/sb_a1b2c3d4/exec \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"command": "uname -a"}'
JavaScript / Node.js SDK Wrapper
Integrate Secrooq Sandbox seamlessly into Node.js applications using our standard asynchronous client wrapper.
class SecrooqCompute {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = "https://api.secrooq.com";
}
async request(path, options = {}) {
const response = await fetch(`${this.baseUrl}${path}`, {
...options,
headers: {
"Authorization": `Bearer ${this.apiKey}`,
"Content-Type": "application/json",
...options.headers
}
});
return response.json();
}
// Provision microVM
async createSandbox(name, options = {}) {
return this.request("/sandboxes", {
method: "POST",
body: JSON.stringify({ name, ...options })
});
}
// Execute terminal command
async executeCommand(sandboxId, command) {
return this.request(`/sandboxes/${sandboxId}/exec`, {
method: "POST",
body: JSON.stringify({ command })
});
}
// Destroy sandbox instance
async destroySandbox(sandboxId) {
return this.request(`/sandboxes/${sandboxId}`, {
method: "DELETE"
});
}
}
// Client usage
(async () => {
const secrooq = new SecrooqCompute("YOUR_JWT_TOKEN");
console.log("π Provisioning microVM...");
const vm = await secrooq.createSandbox("js-sdk-example");
console.log("Created!", vm);
if (vm.id) {
console.log("π Executing node scripts...");
const res = await secrooq.executeCommand(vm.id, "node -v");
console.log("Output:", res.output);
console.log("π§Ή Destroying sandbox...");
await secrooq.destroySandbox(vm.id);
console.log("VM cleaned up.");
}
})();
Python SDK Wrapper
Run autonomous agent loops with multi-sandbox environments using our optimized Python client wrapper.
import urllib.request
import json
class SecrooqCompute:
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.secrooq.com"
def _request(self, path: str, method: str = "GET", data: dict = None):
url = f"{self.base_url}{path}"
req = urllib.request.Request(url, method=method)
req.add_header("Authorization", f"Bearer {self.api_key}")
req.add_header("Content-Type", "application/json")
payload = json.dumps(data).encode("utf-8") if data else None
try:
with urllib.request.urlopen(req, data=payload) as response:
return json.loads(response.read().decode("utf-8"))
except urllib.error.HTTPError as e:
return json.loads(e.read().decode("utf-8"))
def create_sandbox(self, name: str, instance_type: str = "standard-1"):
return self._request("/sandboxes", "POST", {"name": name, "instance_type": instance_type})
def execute_command(self, sandbox_id: str, command: str):
return self._request(f"/sandboxes/{sandbox_id}/exec", "POST", {"command": command})
def destroy_sandbox(self, sandbox_id: str):
return self._request(f"/sandboxes/{sandbox_id}", "DELETE")
# Usage Example
if __name__ == "__main__":
secrooq = SecrooqCompute("YOUR_JWT_TOKEN")
print("π Spawning agent sandbox in Python...")
vm = secrooq.create_sandbox("python-agent-01")
print("Sandbox details:", vm)
if "id" in vm:
sandbox_id = vm["id"]
print(f"π Running telemetry checks on sandbox {sandbox_id}...")
res = secrooq.execute_command(sandbox_id, "python3 --version")
print("Output:", res.get("output", ""))
print("π§Ή Cleaning environment...")
secrooq.destroy_sandbox(sandbox_id)
print("Sandbox destroyed.")
π¦ How to Create & List an Agent
No file upload required. Build a Docker image of your agent, push it to a public registry like Docker Hub, and submit the image tag to Secrooq. Once approved, Pro and Business customers can rent your agent and you earn 80% of every session.
Step 1 β Build your agent locally
Create a Dockerfile that defines your agent's environment. Example for a Python agent:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY agent.py .
CMD ["python", "agent.py"]
Then build the image locally:
docker build -t yourusername/your-agent-name:v1 .
Step 2 β Push the image to a public registry
Use Docker Hub, GitHub Container Registry, or any public container registry.
docker login
docker push yourusername/your-agent-name:v1
Step 3 β Submit the image tag in Secrooq
Go to Developer Workspace β Package VM Template and fill in:
| Field | Example | Notes |
|---|---|---|
| Agent Display Name | Crypto Price Tracker | What customers will see in the Marketplace |
| Docker Image Tag | yourusername/your-agent-name:v1 | Exactly as pushed to the registry |
| Description | Monitors 500+ tokens across 10 exchanges⦠| Explain capabilities, requirements, use cases |
| Hourly Price | 0.25 | In USD β recommended $0.20β$2.00 |
Click Upload VM Listing. Your submission enters the admin approval queue.
Step 4 β Admin approval & publishing
Once an admin approves your listing, it appears in the Marketplace for all Pro and Business customers to rent. You'll see the status update in your Managed Agent Listings table.
Step 5 β How customers use your agent
Customers click Get Agent β the agent appears in their installed list β they launch a sandbox. Secrooq automatically pulls your Docker image, runs it inside a secure microVM, and tracks every second of usage.
π° How earnings work
Every hour the agent runs, you earn 80% of the hourly price (minus Stripe fees). The formula is:
earnings = price_per_hour Γ (seconds_used / 3600) Γ 0.80
Earnings are batched and transferred to your Stripe Express account hourly when your balance exceeds $0.50.
π§ͺ Test your agent before listing
Run the image locally to verify it works before submitting:
docker run -it --rm yourusername/your-agent-name:v1
For a full test inside a Secrooq sandbox, ask an admin to use the Test Drive feature from the Admin Portal.
β Marketplace FAQ
| Question | Answer |
|---|---|
| Do I need to pay for a container registry? | Docker Hub offers a free tier with unlimited public repositories. GitHub Container Registry (ghcr.io) is also free for public images. |
| Can I update my agent after it's listed? | Yes β push a new tag (e.g., v2) and edit the listing in Developer Workspace. The listing goes back into review. Customers get the latest image on their next sandbox launch. |
| What if my image is private? | Secrooq does not support private images for MVP (to keep deployment simple). Make your image public on Docker Hub or GHCR. |
| What is the minimum payout amount? | $0.50. Earnings below this threshold accumulate until the threshold is met, then are swept hourly to your Stripe Express balance. |
| Can I remove my agent later? | Yes β use the Delete button in Managed Agent Listings. Customers who already purchased it can still use their existing sandboxes (soft-delete). No new customers can install it. |
| Who can purchase my agent? | Only Pro and Business plan subscribers. Free tier users can browse the catalog but cannot install or launch agents. |
| Does the price include VM compute costs? | Yes β prices are fully all-inclusive. No separate overage charges are applied to the customer for marketplace sandboxes. |