{"components":{"responses":{},"schemas":{"APIKey":{"properties":{"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"key":{"nullable":true,"readOnly":true,"type":"string"},"last_used_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"revoked_at":{"format":"date-time","nullable":true,"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["id","name","prefix","scopes"],"title":"APIKey","type":"object"},"APIKeyParams":{"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["name"],"title":"APIKeyParams","type":"object"},"BillingCheckoutParams":{"additionalProperties":false,"description":"Selects the ArenAPI subscription to purchase.","properties":{"plan":{"enum":["hobby","team","scale"],"type":"string"}},"required":["plan"],"title":"BillingCheckoutParams","type":"object"},"BillingSession":{"description":"A short-lived Stripe-hosted session.","properties":{"id":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","url"],"title":"BillingSession","type":"object"},"BillingStatus":{"description":"The account subscription, entitlements, and current managed usage.","properties":{"account_id":{"format":"uuid","type":"string"},"plan":{"enum":["hobby","team","scale"],"type":"string"},"plan_details":{"additionalProperties":true,"type":"object"},"subscription":{"additionalProperties":true,"nullable":true,"type":"object"},"usage":{"additionalProperties":true,"type":"object"}},"required":["account_id","plan","plan_details","usage"],"title":"BillingStatus","type":"object"},"Error":{"properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"title":"Error","type":"object"},"ExecParams":{"properties":{"command":{"minLength":1,"type":"string"},"timeout_seconds":{"default":30,"minimum":1,"type":"integer"}},"required":["command"],"title":"ExecParams","type":"object"},"ExecResult":{"properties":{"exit_code":{"type":"integer"},"stderr":{"type":"string"},"stdout":{"type":"string"}},"required":["stdout","stderr","exit_code"],"title":"ExecResult","type":"object"},"Provider":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"config":{"additionalProperties":true,"type":"object"},"credential_names":{"description":"Names of stored credentials; values are never returned","items":{"type":"string"},"type":"array"},"enabled":{"type":"boolean"},"has_token":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"integration":{"enum":["native","driver","catalog"],"type":"string"},"kind":{"enum":["docker","local","runloop","tensorlake","e2b","daytona","modal","vercel","blaxel","sprites","instavm","beam","cloudflare","codesandbox","upstash_box","hopx","declaw","namespace","northflank","fly_machines","kubernetes_agent_sandbox","opensandbox","nvidia_openshell","microsandbox","aio_sandbox","sandbox0","zeroboot","google_cloud_run","deno_subhosting","exe_dev","morph","agent_sandbox","archil","aws_agentcore","azure_dynamic_sessions","together_code_interpreter","scrapybara","browserbase","kernel"],"type":"string"},"name":{"type":"string"},"priority":{"type":"integer"},"transport":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"verification":{"type":"string"}},"required":["id","name","kind","enabled","priority","config","has_token"],"title":"Provider","type":"object"},"ProviderCatalogEntry":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"category":{"type":"string"},"configuration_fields":{"items":{"type":"string"},"type":"array"},"credential_fields":{"items":{"type":"string"},"type":"array"},"docs_url":{"format":"uri","type":"string"},"id":{"type":"string"},"integration":{"enum":["native","driver","catalog"],"type":"string"},"name":{"type":"string"},"notes":{"type":"string"},"transport":{"type":"string"},"verification":{"enum":["live","test","contract","configuration_required"],"type":"string"}},"required":["id","name","category","integration","transport","verification","credential_fields","configuration_fields","capabilities","docs_url","notes"],"title":"ProviderCatalogEntry","type":"object"},"ProviderParams":{"properties":{"config":{"additionalProperties":true,"default":{},"type":"object"},"credentials":{"additionalProperties":{"type":"string"},"description":"Additional provider credentials, encrypted at rest and never returned","type":"object","writeOnly":true},"enabled":{"default":true,"type":"boolean"},"kind":{"enum":["docker","local","runloop","tensorlake","e2b","daytona","modal","vercel","blaxel","sprites","instavm","beam","cloudflare","codesandbox","upstash_box","hopx","declaw","namespace","northflank","fly_machines","kubernetes_agent_sandbox","opensandbox","nvidia_openshell","microsandbox","aio_sandbox","sandbox0","zeroboot","google_cloud_run","deno_subhosting","exe_dev","morph","agent_sandbox","archil","aws_agentcore","azure_dynamic_sessions","together_code_interpreter","scrapybara","browserbase","kernel"],"type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"priority":{"default":100,"minimum":0,"type":"integer"},"token":{"type":"string","writeOnly":true}},"required":["name","kind"],"title":"ProviderParams","type":"object"},"ProviderUpdateParams":{"properties":{"config":{"additionalProperties":true,"type":"object"},"credentials":{"additionalProperties":{"type":"string"},"type":"object","writeOnly":true},"enabled":{"type":"boolean"},"kind":{"enum":["docker","local","runloop","tensorlake","e2b","daytona","modal","vercel","blaxel","sprites","instavm","beam","cloudflare","codesandbox","upstash_box","hopx","declaw","namespace","northflank","fly_machines","kubernetes_agent_sandbox","opensandbox","nvidia_openshell","microsandbox","aio_sandbox","sandbox0","zeroboot","google_cloud_run","deno_subhosting","exe_dev","morph","agent_sandbox","archil","aws_agentcore","azure_dynamic_sessions","together_code_interpreter","scrapybara","browserbase","kernel"],"type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"priority":{"minimum":0,"type":"integer"},"token":{"type":"string","writeOnly":true}},"title":"ProviderUpdateParams","type":"object"},"Sandbox":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"endpoints":{"additionalProperties":true,"type":"object"},"expires_at":{"format":"date-time","type":"string"},"id":{"pattern":"^sbx_","type":"string"},"image":{"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"last_error":{"nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"provider":{"nullable":true,"type":"string"},"provider_id":{"format":"uuid","nullable":true,"type":"string"},"spec":{"additionalProperties":true,"type":"object"},"status":{"enum":["creating","running","paused","stopped","destroyed","failed"],"type":"string"},"timeout_seconds":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","status","image","timeout_seconds","expires_at","metadata"],"title":"Sandbox","type":"object"},"SandboxParams":{"properties":{"environment":{"additionalProperties":true,"type":"object"},"image":{"default":"alpine:3.22","type":"string"},"metadata":{"additionalProperties":true,"default":{},"type":"object"},"network":{"additionalProperties":true,"type":"object"},"ports":{"items":{"type":"integer"},"type":"array"},"provider":{"default":"auto","type":"string"},"region":{"nullable":true,"type":"string"},"required_capabilities":{"default":["lifecycle","commands","files"],"items":{"type":"string"},"type":"array"},"resources":{"additionalProperties":true,"type":"object"},"secrets":{"items":{"type":"string"},"type":"array"},"snapshot_id":{"nullable":true,"type":"string"},"template":{"nullable":true,"type":"string"},"timeout_seconds":{"default":300,"maximum":86400,"minimum":1,"type":"integer"}},"title":"SandboxParams","type":"object"},"WriteFileParams":{"properties":{"content":{"type":"string"},"encoding":{"default":"utf8","enum":["utf8","base64"],"type":"string"}},"required":["content"],"title":"WriteFileParams","type":"object"}},"securitySchemes":{"bearer":{"description":"An ArenAPI key or scoped agent access token","scheme":"bearer","type":"http"}}},"info":{"contact":{"name":"ArenAPI","url":"https://arenapi.com"},"description":"One interface for creating and operating sandboxes across providers.","title":"ArenAPI","version":"0.1.0"},"openapi":"3.0.0","paths":{"/api/v1/api-keys":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.APIKeyController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/APIKey"},"type":"array"}},"type":"object"}}},"description":"API keys"}},"summary":"List API keys","tags":["API keys"]},"post":{"callbacks":{},"description":"The plaintext key is returned exactly once.","operationId":"ArenAPIWeb.APIKeyController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyParams"}}},"description":"API key","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}},"description":"API key"}},"summary":"Create an API key","tags":["API keys"]}},"/api/v1/api-keys/{id}":{"delete":{"callbacks":{},"operationId":"ArenAPIWeb.APIKeyController.delete","parameters":[{"description":"API key identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"API key revoked"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Revoke an API key","tags":["API keys"]}},"/api/v1/billing":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.BillingController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatus"}}},"description":"Billing status"}},"summary":"Get billing status","tags":["Billing"]}},"/api/v1/billing/checkout":{"post":{"callbacks":{},"description":"Creates a Stripe-hosted subscription checkout for a base fee and metered usage.","operationId":"ArenAPIWeb.BillingController.checkout","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutParams"}}},"description":"Plan","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSession"}}},"description":"Checkout session"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid plan"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Stripe is not configured"}},"summary":"Create a Stripe Checkout session","tags":["Billing"]}},"/api/v1/billing/portal":{"post":{"callbacks":{},"operationId":"ArenAPIWeb.BillingController.portal","parameters":[],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSession"}}},"description":"Customer portal session"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No billing customer"}},"summary":"Create a Stripe customer portal session","tags":["Billing"]}},"/api/v1/provider-catalog":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderCatalogController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"capabilities":{"additionalProperties":true,"type":"object"},"data":{"items":{"$ref":"#/components/schemas/ProviderCatalogEntry"},"type":"array"}},"type":"object"}}},"description":"Provider catalog"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"}},"summary":"List researched sandbox providers and capabilities","tags":["Provider catalog"]}},"/api/v1/provider-catalog/{id}":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderCatalogController.show","parameters":[{"description":"Provider kind","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCatalogEntry"}}},"description":"Provider"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Get one provider catalog entry","tags":["Provider catalog"]}},"/api/v1/providers":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Provider"},"type":"array"}},"type":"object"}}},"description":"Providers"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"}},"summary":"List configured providers","tags":["Providers"]},"post":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderParams"}}},"description":"Provider","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}},"description":"Provider"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid provider"}},"summary":"Add a provider credential","tags":["Providers"]}},"/api/v1/providers/{id}":{"delete":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.delete","parameters":[{"description":"Provider identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Provider removed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Remove a configured provider","tags":["Providers"]},"get":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.show","parameters":[{"description":"Provider identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}},"description":"Provider"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Get a configured provider","tags":["Providers"]},"patch":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.update (2)","parameters":[{"description":"Provider identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderUpdateParams"}}},"description":"Provider changes","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}},"description":"Provider"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Update a provider credential","tags":["Providers"]},"put":{"callbacks":{},"operationId":"ArenAPIWeb.ProviderController.update","parameters":[{"description":"Provider identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderUpdateParams"}}},"description":"Provider changes","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}},"description":"Provider"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Update a provider credential","tags":["Providers"]}},"/api/v1/sandboxes":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Sandbox"},"type":"array"}},"type":"object"}}},"description":"Sandboxes"}},"summary":"List sandboxes","tags":["Sandboxes"]},"post":{"callbacks":{},"description":"Use provider=auto to try enabled providers in priority order with failover.","operationId":"ArenAPIWeb.SandboxController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxParams"}}},"description":"Sandbox","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}},"description":"Sandbox"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No provider"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Every provider failed"}},"summary":"Create a sandbox","tags":["Sandboxes"]}},"/api/v1/sandboxes/{id}":{"delete":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxController.delete","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}},"description":"Destroyed sandbox"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Destroy a sandbox","tags":["Sandboxes"]},"get":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxController.show","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}},"description":"Sandbox"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Get sandbox status","tags":["Sandboxes"]}},"/api/v1/sandboxes/{id}/archive":{"post":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxActionController.archive","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/gzip":{"schema":{"format":"binary","type":"string"}}},"description":"Gzip-compressed tar archive"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not running"}},"summary":"Download a compressed sandbox archive","tags":["Sandbox operations"]}},"/api/v1/sandboxes/{id}/exec":{"post":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxActionController.exec","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecParams"}}},"description":"Command","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecResult"}}},"description":"Command result"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not running"}},"summary":"Execute a command","tags":["Sandbox operations"]}},"/api/v1/sandboxes/{id}/files/*path":{"get":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxActionController.read_file","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"File path segments","in":"path","name":"path","required":true,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"File bytes"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"}},"summary":"Read a file","tags":["Sandbox operations"]},"put":{"callbacks":{},"operationId":"ArenAPIWeb.SandboxActionController.write_file","parameters":[{"description":"Sandbox identifier","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"File path segments","in":"path","name":"path","required":true,"schema":{"items":{"type":"string"},"type":"array"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteFileParams"}}},"description":"File content","required":false},"responses":{"204":{"description":"File written"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not running"}},"summary":"Write a file","tags":["Sandbox operations"]}}},"security":[{"bearer":[]}],"servers":[{"url":"https://arenapi.com","variables":{}}],"tags":[{"description":"Provider credentials and routing priority","name":"Providers"},{"description":"Provider capabilities and integration status","name":"Provider catalog"},{"description":"Provider-neutral sandbox lifecycle","name":"Sandboxes"},{"description":"Commands, files, and archives","name":"Sandbox operations"},{"description":"Long-lived account credentials","name":"API keys"},{"description":"Stripe subscriptions and managed usage","name":"Billing"}]}