{"openapi":"3.1.0","info":{"title":"INRENT API","version":"1.0.0","description":"One API for every AI model, plus Cloud VPS management. The AI endpoints are OpenAI-compatible: point any OpenAI SDK at the INRENT base URL and use your INRENT API key.","contact":{"name":"INRENT","url":"https://inrent.ai/support"}},"servers":[{"url":"https://api.inrent.ai/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Chat","description":"Text generation"},{"name":"Embeddings"},{"name":"Images"},{"name":"Models","description":"Model discovery (no key required)"},{"name":"Management","description":"Keys, usage and logs — requires keys with management permissions"},{"name":"Cloud VPS","description":"Servers, firewalls, snapshots, backups and SSH keys. Needs compute:read or compute:write. Requests act as the person who created the key. Servers belong to the organization, not the key's project, and are billed hourly to the organization wallet: a key's spend limit, model allowlist and project budget apply to AI requests only, so keys with a spend limit cannot order, resize or turn on backups."}],"paths":{"/chat/completions":{"post":{"tags":["Chat"],"operationId":"createChatCompletion","summary":"Create a chat completion","description":"OpenAI-compatible chat completions with streaming (SSE), tools and structured output.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Completion, or a text/event-stream when stream=true","headers":{"x-request-id":{"schema":{"type":"string"}},"x-inrent-provider":{"schema":{"type":"string"}},"x-inrent-fallbacks":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits or budget exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after and x-ratelimit-* headers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider error after fallbacks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No eligible provider is available for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/completions":{"post":{"tags":["Chat"],"operationId":"createCompletion","summary":"Create a text completion (legacy)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string"},"max_tokens":{"type":"integer"},"temperature":{"type":"number"},"stream":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Completion"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits or budget exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after and x-ratelimit-* headers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider error after fallbacks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No eligible provider is available for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses":{"post":{"tags":["Chat"],"operationId":"createResponse","summary":"Create a response (Responses API subset)","description":"Text and message input, non-streaming. Use chat completions for streaming.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"instructions":{"type":"string"},"max_output_tokens":{"type":"integer"}}}}}},"responses":{"200":{"description":"Response object"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits or budget exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after and x-ratelimit-* headers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider error after fallbacks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No eligible provider is available for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embeddings":{"post":{"tags":["Embeddings"],"operationId":"createEmbedding","summary":"Create embeddings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"dimensions":{"type":"integer"},"encoding_format":{"type":"string","enum":["float","base64"]}}}}}},"responses":{"200":{"description":"Embedding list"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits or budget exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after and x-ratelimit-* headers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider error after fallbacks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No eligible provider is available for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/generations":{"post":{"tags":["Images"],"operationId":"createImage","summary":"Generate images","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":10},"size":{"type":"string"},"response_format":{"type":"string","enum":["url","b64_json"]}}}}}},"responses":{"200":{"description":"Images"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credits or budget exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after and x-ratelimit-* headers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider error after fallbacks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No eligible provider is available for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models":{"get":{"tags":["Models"],"operationId":"listModels","summary":"List models","security":[],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}}}}},"/models/{model}":{"get":{"tags":["Models"],"operationId":"retrieveModel","summary":"Retrieve a model","security":[],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"},"example":"openai/gpt-4.1"}],"responses":{"200":{"description":"Model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/key":{"get":{"tags":["Management"],"operationId":"getKey","summary":"Inspect the current API key, limits and balance","responses":{"200":{"description":"Key info"},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys":{"get":{"tags":["Management"],"operationId":"listKeys","summary":"List API keys (keys:read)","responses":{"200":{"description":"Keys"},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Management"],"operationId":"createKey","summary":"Create an API key (keys:write)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"environment":{"type":"string","enum":["development","staging","production"]},"project_id":{"type":"string","format":"uuid"},"permissions":{"type":"array","items":{"type":"string","enum":["inference","keys:read","keys:write","usage:read","logs:read"]},"description":"compute:read and compute:write cannot be granted here: create Cloud VPS keys in the console"},"allowed_models":{"type":"array","items":{"type":"string"}},"spend_limit_inr":{"type":"string"},"rpm_limit":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"Created — the secret is returned once"},"403":{"description":"Permission denied or model not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/{id}":{"delete":{"tags":["Management"],"operationId":"revokeKey","summary":"Revoke an API key (keys:write)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"}}}},"/usage":{"get":{"tags":["Management"],"operationId":"getUsage","summary":"Usage summary (usage:read)","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"Usage"}}}},"/requests":{"get":{"tags":["Management"],"operationId":"listRequests","summary":"Request logs (logs:read)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["success","error","cancelled"]}}],"responses":{"200":{"description":"Requests"}}}},"/requests/{id}":{"get":{"tags":["Management"],"operationId":"getRequest","summary":"Request detail (logs:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Request"}}}},"/compute/regions":{"get":{"tags":["Cloud VPS"],"operationId":"listComputeRegions","summary":"List regions (compute:read)","description":"Enabled regions and what can be ordered there right now. available_plans is empty when the region has no free capacity or public IPv4 addresses.","responses":{"200":{"description":"Regions","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Region"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/images":{"get":{"tags":["Cloud VPS"],"operationId":"listComputeImages","summary":"List operating system images (compute:read)","responses":{"200":{"description":"Images","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Image"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/plans":{"get":{"tags":["Cloud VPS"],"operationId":"listComputePlans","summary":"List plans and prices (compute:read)","description":"Plans with on_sale=false have no price yet and cannot be ordered.","responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers":{"get":{"tags":["Cloud VPS"],"operationId":"listServers","summary":"List servers (compute:read)","responses":{"200":{"description":"Servers","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Server"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"createServer","summary":"Create a server (compute:write)","description":"Paid hourly from the organization's wallet, which must hold at least one day of use. Returns 201 while the server is still provisioning: poll GET /compute/servers/{id} until status is running. root_password is in this response only. Keys with a spend limit are refused (403 key_spend_limit_not_supported): a key's spend limit applies to AI requests only and cannot cap server charges.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerCreateRequest"}}}},"responses":{"201":{"description":"Created (provisioning), with the one-time root_password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerCreatedResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits in the wallet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:write, the key's creator is no longer allowed, or the key has a spend limit (key_spend_limit_not_supported)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No capacity or free public IPv4 address in the region","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}":{"get":{"tags":["Cloud VPS"],"operationId":"getServer","summary":"Retrieve a server (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Cloud VPS"],"operationId":"renameServer","summary":"Rename a server (compute:write)","description":"Changes the name shown in the console and the API. The hostname inside the server is not changed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Lowercase letters, digits and hyphens, 1-63 characters"}}}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Cloud VPS"],"operationId":"deleteServer","summary":"Delete a server (compute:write)","description":"Charges the hours used so far, then destroys the server, its disk and its snapshots. This cannot be undone.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Deleting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/actions":{"get":{"tags":["Cloud VPS"],"operationId":"listServerActions","summary":"Recent operations on a server (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The 20 most recent operations","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ServerOperation"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"serverAction","summary":"Power and reinstall actions (compute:write)","description":"start, stop (graceful shutdown), reboot, force_stop, or reinstall with an image. Reinstall erases the disk and its snapshots and returns a new one-time root_password. Actions are queued: 202 means accepted.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerAction"}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedActionResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No capacity or free public IPv4 address in the region","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/actions/{action_id}":{"get":{"tags":["Cloud VPS"],"operationId":"getServerAction","summary":"Status of one operation (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"queued, running, done or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerOperationStatusResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/metrics":{"get":{"tags":["Cloud VPS"],"operationId":"getServerMetrics","summary":"CPU, memory, disk and network metrics (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","schema":{"type":"string","enum":["1h","6h","24h","7d"],"default":"1h"}}],"responses":{"200":{"description":"Averaged points, at most about 180 per range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerMetricsResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/firewall":{"get":{"tags":["Cloud VPS"],"operationId":"getServerFirewall","summary":"Get the inbound firewall (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Firewall","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirewallResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Cloud VPS"],"operationId":"setServerFirewall","summary":"Replace the inbound firewall (compute:write)","description":"Replaces the whole allow-list (up to 50 rules). With enabled=true, inbound traffic that no rule allows is dropped. Outbound traffic is always allowed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirewallRequest"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirewallResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/snapshots":{"get":{"tags":["Cloud VPS"],"operationId":"listServerSnapshots","summary":"List snapshots and backups (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Snapshots and backups, newest first","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Snapshot"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"createServerSnapshot","summary":"Take a snapshot (compute:write)","description":"How many snapshots a server can keep is set by INRENT (403 when the server already has that many). Snapshots live with the server's disk, so a reinstall deletes them. 503 when snapshots are unavailable for a while.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters. A dated name is used when omitted."}}}}}},"responses":{"202":{"description":"Creating","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotAcceptedResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/snapshots/{sid}/restore":{"post":{"tags":["Cloud VPS"],"operationId":"restoreServerSnapshot","summary":"Restore a snapshot or backup (compute:write)","description":"Rolls the disk back. Data written since the snapshot was taken is lost.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Restoring","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/snapshots/{sid}":{"delete":{"tags":["Cloud VPS"],"operationId":"deleteServerSnapshot","summary":"Delete a snapshot or backup (compute:write)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Deleting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/backups":{"put":{"tags":["Cloud VPS"],"operationId":"setServerBackups","summary":"Turn daily backups on or off (compute:write)","description":"Backups add a surcharge to the server price from now on. The response shows the new monthly price. Turning backups off stops new backups; the automatic backups already kept are deleted 7 days later unless backups are turned on again (manual backups are kept). Keys with a spend limit cannot turn backups on (403 key_spend_limit_not_supported); they can turn them off.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupsResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:write, the key's creator is no longer allowed, or the key has a spend limit (key_spend_limit_not_supported)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"backupServerNow","summary":"Take a backup now (compute:write)","description":"Backups must be turned on. One manual backup per hour.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Creating","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotAcceptedResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/servers/{id}/resize":{"get":{"tags":["Cloud VPS"],"operationId":"listServerResizeOptions","summary":"Plans this server can move to (compute:read)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Plans with the same CPU type and no smaller disk","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ResizeOption"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"resizeServer","summary":"Resize a stopped server (compute:write)","description":"The server must be stopped, and stays stopped afterwards. CPU and memory change; the disk only grows. The new price applies from now. Keys with a spend limit are refused (403 key_spend_limit_not_supported).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"Plan slug from GET /compute/servers/{id}/resize"}}}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedActionResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:write, the key's creator is no longer allowed, or the key has a spend limit (key_spend_limit_not_supported)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No capacity or free public IPv4 address in the region","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/ssh-keys":{"get":{"tags":["Cloud VPS"],"operationId":"listSshKeys","summary":"List SSH keys (compute:read)","responses":{"200":{"description":"SSH keys (fingerprints, not key material)","content":{"application/json":{"schema":{"type":"object","required":["object","data"],"additionalProperties":false,"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SshKey"}}}}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Cloud VPS"],"operationId":"addSshKey","summary":"Add an SSH public key (compute:write)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["public_key"],"properties":{"name":{"type":"string"},"public_key":{"type":"string","description":"OpenSSH public key line, e.g. the contents of ~/.ssh/id_ed25519.pub"}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SshKeyCreatedResponse"}}}},"400":{"description":"Invalid request body or parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another operation is running, or the server is in the wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compute/ssh-keys/{id}":{"delete":{"tags":["Cloud VPS"],"operationId":"deleteSshKey","summary":"Delete an SSH key (compute:write)","description":"Servers that already have the key installed keep it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SshKeyDeletedResponse"}}}},"403":{"description":"Key lacks compute:read / compute:write, or the key's creator is no longer allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in your organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see retry-after)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"server.created":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_created","summary":"A server was ordered and is being built","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.ready":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_ready","summary":"A server finished building and is running","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.failed":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_failed","summary":"A server could not be built, rebuilt, resumed or deleted, and is in the error state","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.suspended":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_suspended","summary":"A server was powered off by a suspension","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.resumed":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_resumed","summary":"A suspended server was started again","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.deleted":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_deleted","summary":"A server was deleted with its disk, snapshots and backups","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"server.resized":{"post":{"tags":["Webhooks"],"operationId":"webhook_server_resized","summary":"A server moved to another plan","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"backup.completed":{"post":{"tags":["Webhooks"],"operationId":"webhook_backup_completed","summary":"A backup finished","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"backup.failed":{"post":{"tags":["Webhooks"],"operationId":"webhook_backup_failed","summary":"A backup failed","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"snapshot.completed":{"post":{"tags":["Webhooks"],"operationId":"webhook_snapshot_completed","summary":"A snapshot finished","description":"Sent to your webhook endpoint when subscribed. Respond with any 2xx within 10 seconds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupWebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"INRENT API key: sk-inrent-<env>-…"}},"schemas":{"Region":{"type":"object","required":["slug","name","city","country","simulated","available","available_plans","images"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"simulated":{"type":"boolean"},"available":{"type":"boolean","description":"False when no plan can be ordered here right now"},"available_plans":{"type":"array","items":{"type":"string"},"description":"Plan slugs that can be ordered here right now"},"images":{"type":"array","items":{"type":"string"},"description":"Image slugs available here"}}},"Image":{"type":"object","required":["slug","name","family","os","version","min_disk_gb","min_memory_mb","default_user"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"os":{"type":"string","enum":["linux","windows"]},"version":{"type":"string"},"min_disk_gb":{"type":"integer"},"min_memory_mb":{"type":"integer"},"default_user":{"type":"string"}}},"Plan":{"type":"object","required":["slug","name","category","vcpu","memory_mb","disk_gb","bandwidth_gb","description","on_sale","price"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["shared","dedicated"]},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"},"bandwidth_gb":{"type":"integer"},"description":{"type":"string","description":"Short description; may be empty"},"on_sale":{"type":"boolean","description":"False when the plan has no price yet and cannot be ordered"},"price":{"type":"object","required":["currency","monthly_inr","hourly_inr"],"additionalProperties":false,"properties":{"currency":{"const":"INR"},"monthly_inr":{"type":["string","null"],"description":"null when not on sale"},"hourly_inr":{"type":["string","null"],"description":"null when not on sale"}}}}},"Server":{"type":"object","required":["id","name","hostname","status","pending_action","category","vcpu","memory_mb","disk_gb","bandwidth_gb","ipv4","region","image","setup_pending","provisioning","plan","firewall_enabled","backups_enabled","price","suspended_reason","last_error","simulated","created_at","billed_through"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string","enum":["provisioning","running","stopped","reinstalling","suspended","error","deleting","deleted"]},"pending_action":{"type":["string","null"],"description":"Operation queued or running, e.g. instance.power; null when idle"},"category":{"type":"string","enum":["shared","dedicated"]},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"},"bandwidth_gb":{"type":"integer"},"ipv4":{"type":["string","null"]},"region":{"type":"object","required":["slug","name","city"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"}}},"image":{"type":"object","required":["slug","name","family","os","default_user"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"os":{"type":"string","enum":["linux","windows"]},"default_user":{"type":"string"}}},"setup_pending":{"type":"boolean","description":"True while the server's first-boot setup still runs (cloud-init on Linux, about 5-10 minutes on Windows); log in once it is false"},"provisioning":{"type":["object","null"],"description":"Progress of the server's last build (a new server or a reinstall). Null for servers built before progress was recorded.","required":["stage","kind","failed","started_at","stage_started_at","finished_at","steps","estimated_seconds_remaining","setup_result"],"additionalProperties":false,"properties":{"stage":{"type":"string","enum":["queued","preparing_disk","configuring","starting","first_boot","ready"],"description":"The current step. The server is running (and billed) from first_boot; ready means the first-boot setup finished, or INRENT stopped waiting for it (see setup_result)."},"kind":{"type":"string","enum":["create","reinstall"]},"failed":{"type":"boolean","description":"True when the build gave up at this stage (the server status is error)"},"started_at":{"type":"string","format":"date-time"},"stage_started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time","description":"When the build reached ready"},"steps":{"type":"array","description":"Every step in order, with the time it started (null if not reached)","items":{"type":"object","required":["stage","started_at"],"additionalProperties":false,"properties":{"stage":{"type":"string","enum":["queued","preparing_disk","configuring","starting","first_boot","ready"]},"started_at":{"type":["string","null"],"format":"date-time"}}}},"estimated_seconds_remaining":{"type":["integer","null"],"description":"Estimate from recent builds on the server's node, or from typical build times until there are enough of them; null when the build is finished or failed, or the current step is taking longer than usual."},"setup_result":{"type":["string","null"],"enum":["complete","errors","unobservable","no_agent","timeout","interrupted",null],"description":"How the first-boot setup ended: complete; errors (cloud-init reported errors); unobservable (the image cannot be checked from outside); no_agent (the guest agent did not answer); timeout (no confirmation within 15 minutes, 25 on Windows); interrupted (the server was switched off first). Null until ready, and for a build that finished while the workspace was suspended (the server was left off)."}}},"plan":{"type":["object","null"],"required":["slug","name"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"firewall_enabled":{"type":"boolean"},"backups_enabled":{"type":"boolean"},"price":{"type":"object","required":["currency","monthly_inr","hourly_inr","plan_monthly_inr"],"additionalProperties":false,"properties":{"currency":{"const":"INR"},"monthly_inr":{"type":["string","null"],"description":"Monthly price including backups"},"hourly_inr":{"type":["string","null"],"description":"Hourly rate charged to the wallet"},"plan_monthly_inr":{"type":["string","null"],"description":"Plan price fixed at order time"}}},"suspended_reason":{"type":["string","null"]},"last_error":{"type":["string","null"]},"simulated":{"type":"boolean","description":"True in simulated test regions, where no real machine exists"},"created_at":{"type":"string","format":"date-time"},"billed_through":{"type":"string","format":"date-time"}}},"ServerOperation":{"type":"object","required":["id","kind","type","status","attempts","error","created_at","finished_at"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"e.g. instance.provision, instance.power, instance.reinstall"},"type":{"type":["string","null"],"description":"The power action (start, stop, reboot, force_stop) for instance.power; null otherwise"},"status":{"type":"string","enum":["queued","running","done","failed"]},"attempts":{"type":"integer"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}}},"Snapshot":{"type":"object","required":["id","kind","name","status","size_gb","automatic","created_at"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["snapshot","backup"]},"name":{"type":"string"},"status":{"type":"string","enum":["creating","ready","restoring","deleting","error"]},"size_gb":{"type":"number","description":"0 until the copy is finished"},"automatic":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"ResizeOption":{"type":"object","required":["slug","name","vcpu","memory_mb","disk_gb","bandwidth_gb","price"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"},"bandwidth_gb":{"type":"integer"},"price":{"type":"object","required":["currency","monthly_inr","hourly_inr","plan_monthly_inr"],"additionalProperties":false,"properties":{"currency":{"const":"INR"},"monthly_inr":{"type":["string","null"],"description":"Monthly price after resizing, including backups if on"},"hourly_inr":{"type":["string","null"],"description":"Hourly rate after resizing, including backups if on"},"plan_monthly_inr":{"type":["string","null"],"description":"Plan price, without the backup surcharge"}}}}},"SshKey":{"type":"object","required":["id","name","fingerprint","type","servers","created_at"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"fingerprint":{"type":"string","description":"SHA256:…"},"type":{"type":"string","description":"e.g. ssh-ed25519"},"servers":{"type":"integer","description":"Servers the key is installed on"},"created_at":{"type":"string","format":"date-time"}}},"FirewallRule":{"type":"object","required":["id","protocol","port_range","source_cidr","note"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"]},"port_range":{"type":["string","null"]},"source_cidr":{"type":"string","description":"IPv4 address or range. Default 0.0.0.0/0"},"note":{"type":["string","null"]}}},"ServerResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Server"}}},"ServerCreatedResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","name","hostname","status","pending_action","category","vcpu","memory_mb","disk_gb","bandwidth_gb","ipv4","region","image","setup_pending","provisioning","plan","firewall_enabled","backups_enabled","price","suspended_reason","last_error","simulated","created_at","billed_through","root_password"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string","enum":["provisioning","running","stopped","reinstalling","suspended","error","deleting","deleted"]},"pending_action":{"type":["string","null"],"description":"Operation queued or running, e.g. instance.power; null when idle"},"category":{"type":"string","enum":["shared","dedicated"]},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"},"bandwidth_gb":{"type":"integer"},"ipv4":{"type":["string","null"]},"region":{"type":"object","required":["slug","name","city"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"}}},"image":{"type":"object","required":["slug","name","family","os","default_user"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"os":{"type":"string","enum":["linux","windows"]},"default_user":{"type":"string"}}},"setup_pending":{"type":"boolean","description":"True while the server's first-boot setup still runs (cloud-init on Linux, about 5-10 minutes on Windows); log in once it is false"},"provisioning":{"type":["object","null"],"description":"Progress of the server's last build (a new server or a reinstall). Null for servers built before progress was recorded.","required":["stage","kind","failed","started_at","stage_started_at","finished_at","steps","estimated_seconds_remaining","setup_result"],"additionalProperties":false,"properties":{"stage":{"type":"string","enum":["queued","preparing_disk","configuring","starting","first_boot","ready"],"description":"The current step. The server is running (and billed) from first_boot; ready means the first-boot setup finished, or INRENT stopped waiting for it (see setup_result)."},"kind":{"type":"string","enum":["create","reinstall"]},"failed":{"type":"boolean","description":"True when the build gave up at this stage (the server status is error)"},"started_at":{"type":"string","format":"date-time"},"stage_started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time","description":"When the build reached ready"},"steps":{"type":"array","description":"Every step in order, with the time it started (null if not reached)","items":{"type":"object","required":["stage","started_at"],"additionalProperties":false,"properties":{"stage":{"type":"string","enum":["queued","preparing_disk","configuring","starting","first_boot","ready"]},"started_at":{"type":["string","null"],"format":"date-time"}}}},"estimated_seconds_remaining":{"type":["integer","null"],"description":"Estimate from recent builds on the server's node, or from typical build times until there are enough of them; null when the build is finished or failed, or the current step is taking longer than usual."},"setup_result":{"type":["string","null"],"enum":["complete","errors","unobservable","no_agent","timeout","interrupted",null],"description":"How the first-boot setup ended: complete; errors (cloud-init reported errors); unobservable (the image cannot be checked from outside); no_agent (the guest agent did not answer); timeout (no confirmation within 15 minutes, 25 on Windows); interrupted (the server was switched off first). Null until ready, and for a build that finished while the workspace was suspended (the server was left off)."}}},"plan":{"type":["object","null"],"required":["slug","name"],"additionalProperties":false,"properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"firewall_enabled":{"type":"boolean"},"backups_enabled":{"type":"boolean"},"price":{"type":"object","required":["currency","monthly_inr","hourly_inr","plan_monthly_inr"],"additionalProperties":false,"properties":{"currency":{"const":"INR"},"monthly_inr":{"type":["string","null"],"description":"Monthly price including backups"},"hourly_inr":{"type":["string","null"],"description":"Hourly rate charged to the wallet"},"plan_monthly_inr":{"type":["string","null"],"description":"Plan price fixed at order time"}}},"suspended_reason":{"type":["string","null"]},"last_error":{"type":["string","null"]},"simulated":{"type":"boolean","description":"True in simulated test regions, where no real machine exists"},"created_at":{"type":"string","format":"date-time"},"billed_through":{"type":"string","format":"date-time"},"root_password":{"type":"string","description":"Shown once. Store it now."}}},"warning":{"type":"string","description":"Present when the response contains a one-time root password"}}},"QueuedActionResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["type","status","server"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["start","stop","reboot","force_stop","reinstall","resize"]},"status":{"const":"queued"},"root_password":{"type":"string","description":"reinstall only. Shown once. Store it now."},"server":{"$ref":"#/components/schemas/Server"}}},"warning":{"type":"string","description":"Present when the response contains a one-time root password"}}},"ServerOperationStatusResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","kind","status","attempts","max_attempts","error"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"attempts":{"type":"integer"},"max_attempts":{"type":"integer"},"error":{"type":["string","null"]}}}}},"ServerMetricsResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["range","simulated","units","points"],"additionalProperties":false,"properties":{"range":{"type":"string","enum":["1h","6h","24h","7d"]},"simulated":{"type":"boolean"},"units":{"type":"object","required":["cpu","memory","disk","network_in","network_out"],"additionalProperties":false,"properties":{"cpu":{"const":"percent"},"memory":{"const":"percent"},"disk":{"const":"percent"},"network_in":{"const":"kbps"},"network_out":{"const":"kbps"}}},"points":{"type":"array","items":{"type":"object","required":["t","cpu","memory","disk","network_in","network_out"],"additionalProperties":false,"properties":{"t":{"type":"string","format":"date-time"},"cpu":{"type":"number"},"memory":{"type":"number"},"disk":{"type":"number"},"network_in":{"type":"number"},"network_out":{"type":"number"}}}}}}}},"FirewallResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["enabled","outbound_smtp","rules"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"outbound_smtp":{"type":"string","enum":["blocked","allowed"],"description":"Outbound TCP port 25. Blocked on every server unless INRENT opened it for the organization (ask through a support ticket). Not changed by the rules or by turning the firewall off."},"rules":{"type":"array","items":{"$ref":"#/components/schemas/FirewallRule"}}}}}},"SnapshotAcceptedResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","kind","status"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["snapshot","backup"]},"status":{"const":"creating"}}}}},"BackupsResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["enabled","price"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"price":{"type":"object","required":["currency","monthly_inr"],"additionalProperties":false,"properties":{"currency":{"const":"INR"},"monthly_inr":{"type":["string","null"],"description":"New monthly price of the server"}}}}}}},"StatusResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","status"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["deleting","restoring"]}}}}},"SshKeyCreatedResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","name","fingerprint"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"fingerprint":{"type":"string"}}}}},"SshKeyDeletedResponse":{"type":"object","required":["data"],"additionalProperties":false,"properties":{"data":{"type":"object","required":["id","deleted"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"deleted":{"const":true}}}}},"ServerCreateRequest":{"type":"object","required":["name","region","image","plan"],"properties":{"name":{"type":"string","description":"Lowercase letters, digits and hyphens, 1-63 characters. Also used as the hostname."},"region":{"type":"string","description":"Region slug from GET /compute/regions"},"image":{"type":"string","description":"Image slug from GET /compute/images"},"plan":{"type":"string","description":"Plan slug from GET /compute/plans"},"ssh_keys":{"type":"array","items":{"type":"string"},"description":"SSH key ids or SHA256 fingerprints from GET /compute/ssh-keys"}}},"ServerAction":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["start","stop","reboot","force_stop","reinstall"]},"image":{"type":"string","description":"reinstall only (required): image slug"},"ssh_keys":{"type":"array","items":{"type":"string"},"description":"reinstall only: SSH key ids or fingerprints to install"}}},"FirewallRequest":{"type":"object","required":["enabled","rules"],"properties":{"enabled":{"type":"boolean"},"rules":{"type":"array","maxItems":50,"description":"Each rule: protocol (tcp, udp, icmp, any), port_range (tcp/udp: 22 or 8000-8100), source_cidr (IPv4 address or range, default 0.0.0.0/0), note","items":{"type":"object","required":["protocol"],"additionalProperties":false,"properties":{"protocol":{"type":"string","enum":["tcp","udp","icmp","any"]},"port_range":{"type":"string","description":"tcp/udp only: 22 or 8000-8100"},"source_cidr":{"type":"string","description":"IPv4 address or range. Default 0.0.0.0/0"},"note":{"type":"string","maxLength":60}}}}}},"WebhookServer":{"type":"object","required":["id","name","hostname","status","region","plan","image","ipv4","vcpu","memory_mb","disk_gb","backups_enabled"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string","enum":["provisioning","running","stopped","reinstalling","suspended","error","deleting","deleted"]},"region":{"type":"string","description":"Region slug"},"plan":{"type":["string","null"],"description":"Plan slug"},"image":{"type":"string","description":"Image slug"},"ipv4":{"type":["string","null"]},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"},"backups_enabled":{"type":"boolean"}}},"ServerWebhookEvent":{"type":"object","required":["id","type","created","organization_id","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Event id (evt_…), also sent as Inrent-Event-Id. Use it to deduplicate."},"type":{"type":"string","enum":["server.created","server.ready","server.failed","server.suspended","server.resumed","server.deleted","server.resized"]},"created":{"type":"integer","description":"Unix time in seconds"},"organization_id":{"type":"string","format":"uuid"},"data":{"type":"object","required":["server"],"additionalProperties":false,"properties":{"server":{"$ref":"#/components/schemas/WebhookServer"},"reason":{"type":"string","enum":["billing","org","admin","requested","staff","suspended_expired"],"description":"server.suspended: billing (wallet empty), org (workspace suspended) or admin (INRENT staff). server.deleted: requested (by you), staff, or suspended_expired (left suspended for an empty wallet until its deletion date)."},"scheduled_deletion_at":{"type":["string","null"],"format":"date-time","description":"server.suspended only: when the server is deleted if the wallet does not cover it again; null when it is not scheduled for deletion."},"operation":{"type":"string","enum":["provision","reinstall","delete","resume"],"description":"server.failed only: what could not be done."},"previous":{"type":["object","null"],"description":"server.resized only: the size before the resize (server holds the new one).","properties":{"plan":{"type":["string","null"]},"vcpu":{"type":"integer"},"memory_mb":{"type":"integer"},"disk_gb":{"type":"integer"}}}}}}},"BackupWebhookEvent":{"type":"object","required":["id","type","created","organization_id","data"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Event id (evt_…), also sent as Inrent-Event-Id. Use it to deduplicate."},"type":{"type":"string","enum":["backup.completed","backup.failed","snapshot.completed"]},"created":{"type":"integer","description":"Unix time in seconds"},"organization_id":{"type":"string","format":"uuid"},"data":{"type":"object","required":["server"],"additionalProperties":false,"properties":{"server":{"$ref":"#/components/schemas/WebhookServer"},"backup":{"type":"object","required":["id","name","size_gb","created_at","automatic"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"size_gb":{"type":"number","description":"0 for a backup that failed"},"created_at":{"type":"string","format":"date-time"},"automatic":{"type":"boolean"}},"description":"backup.completed and backup.failed"},"snapshot":{"type":"object","required":["id","name","size_gb","created_at"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"size_gb":{"type":"number","description":"0 for a backup that failed"},"created_at":{"type":"string","format":"date-time"}},"description":"snapshot.completed"}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","example":"rate_limit_error"},"code":{"type":"string","example":"rate_limit_exceeded"},"message":{"type":"string"},"param":{"type":["string","null"]},"request_id":{"type":["string","null"],"example":"req_01J9Z4Q3W6M0Y8R2T5V7X9B1C3"}}}}},"Message":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}},{"type":"null"}]},"tool_calls":{"type":"array","items":{"type":"object"}},"tool_call_id":{"type":"string"}}},"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","example":"openai/gpt-4.1"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"stream":{"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}}},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number"},"max_tokens":{"type":"integer"},"max_completion_tokens":{"type":"integer"},"stop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tools":{"type":"array","items":{"type":"object"}},"tool_choice":{},"response_format":{"type":"object"},"seed":{"type":"integer"},"user":{"type":"string"},"inrent":{"type":"object","description":"INRENT routing extension. Ignored by other OpenAI-compatible servers.","properties":{"route":{"type":"string","enum":["balanced","lowest_cost","lowest_latency","best_quality"]},"providers":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"},"description":"Providers to try first, in order."},"only":{"type":"array","items":{"type":"string"}},"ignore":{"type":"array","items":{"type":"string"}},"allow_fallbacks":{"type":"boolean","default":true}}},"fallback_models":{"type":"array","items":{"type":"string"},"maxItems":4}}}}},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"provider":{"type":"string","description":"Provider that served the request"},"choices":{"type":"array","items":{"type":"object"}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"Model":{"type":"object","properties":{"id":{"type":"string","example":"openai/gpt-4.1"},"object":{"const":"model"},"owned_by":{"type":"string"},"name":{"type":"string"},"context_length":{"type":["integer","null"]},"capabilities":{"type":"array","items":{"type":"string"}},"availability":{"type":"string","enum":["platform","byok","unavailable"]},"pricing":{"type":["object","null"],"properties":{"currency":{"type":"string"},"unit":{"type":"string"},"input":{"type":["string","null"]},"output":{"type":["string","null"]}}}}}}}}