{"_vendored":{"source":"infrai-spec/discovery/manifest.json","generator":"web/console/scripts/gen-openapi.mjs","note":"Static mirror of the SSOT discovery manifest. Re-sync via `npm run gen:openapi`. Do not hand-edit."},"version":"v1","generated_from":"infrai-spec","generated_note":"GENERATED by codegen/emit_discovery.py from infrai-spec SSOT — do not hand-edit. Capabilities/method/path/idempotent derive from gateway/routes.yaml; params from schemas/<module>/<Type>.json (request-schema mapping reused from the MCP server's inputSchemaFrom wiring; $refs stripped to permissive {} like _spec.ts). errors are a DERIVED over-set (common envelope + retryable + module-tagged + module name-prefixed) because registry.yaml has no per-capability error map. availability defaults to 'ga' and regions to ['western','china'] for every capability because routes.yaml/enums do not yet encode per-capability gating (dual-SKU code is 100% portable, SDK_API §13.7).","regions":["western","china"],"capabilities":[{"id":"account.autorecharge.configure","module":"account-billing","namespace":"account","action":"autorecharge.configure","method":"PUT","path":"/v1/account/autorecharge/configure","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Configure automatic balance top-up when funds fall below a trigger threshold, with anti-abuse caps.","request_schema_ref":"account-billing/AutorechargeConfigureRequest.json","params":{"title":"AutorechargeConfigureRequest","description":"Request shape for account.autorecharge.configure. max_per_day/max_per_month are anti-abuse caps the trigger engine MUST enforce. Returns an AutorechargeConfig. See REVIEW Account §3.D.","type":"object","required":["trigger_balance","recharge_amount"],"additionalProperties":false,"properties":{"trigger_balance":{"type":"number","minimum":0,"description":"Auto-charge fires when wallet balance drops below this."},"recharge_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount in USD to add each time auto-charge fires."},"payment_method_id":{"type":["string","null"],"description":"null uses the account default payment method."},"max_per_day":{"type":"integer","minimum":1,"default":3,"description":"Maximum recharge amount per day in USD"},"max_per_month":{"type":"integer","minimum":1,"default":30,"description":"Maximum recharge amount per month in USD"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/AutorechargeConfig.json","response":{"title":"AutorechargeConfig","description":"Returned by account.autorecharge.enable / .status. See docs/Infrai_SDK_Account_Billing.md §3.3 and enums/autorecharge_status.yaml.","type":"object","required":["enabled","trigger_balance","recharge_amount","payment_method_id","payment_method_summary","max_per_day","max_per_month","triggered_today","triggered_this_month","consecutive_failures"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether this feature or configuration is enabled"},"trigger_balance":{"type":"number","minimum":0,"description":"Balance threshold that triggers automatic recharge, in USD"},"recharge_amount":{"type":"number","minimum":0,"description":"Amount to recharge when triggered, in USD"},"payment_method_id":{"type":"string","description":"Identifier of the payment method used"},"payment_method_summary":{"type":"string","description":"e.g. 'Visa ****4242'."},"max_per_day":{"type":"integer","minimum":1,"description":"Maximum recharge amount per day in USD"},"max_per_month":{"type":"integer","minimum":1,"description":"Maximum recharge amount per month in USD"},"triggered_today":{"type":"integer","minimum":0,"description":"Amount recharged today in USD"},"triggered_this_month":{"type":"integer","minimum":0,"description":"Amount recharged this month in USD"},"next_check_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the next balance check will occur"},"last_succeeded_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful payment"},"last_failed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last payment failure"},"consecutive_failures":{"type":"integer","minimum":0,"description":"Number of consecutive payment failures"},"configured":{"type":"boolean","description":"Whether a config row exists for this account (false = never set up; the numeric fields are then zero defaults)."},"disabled_reason":{"type":["string","null"],"description":"Why auto-recharge is currently disabled (e.g. 'user', 'max_failures', 'admin'); null when enabled or never disabled."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/account/autorecharge/configure \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/account/autorecharge/configure\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'trigger_balance': 1.0, 'recharge_amount': 1.0},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/autorecharge/configure\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/autorecharge/configure\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/account/autorecharge/configure\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/autorecharge/configure\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"trigger_balance\\\": 1.0, \\\"recharge_amount\\\": 1.0}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/account/autorecharge/configure\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"trigger_balance\\\": 1.0, \\\"recharge_amount\\\": 1.0}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/autorecharge/configure\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"trigger_balance\\\": 1.0, \\\"recharge_amount\\\": 1.0}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/autorecharge/configure\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/account/autorecharge/configure\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"trigger_balance\": 1.0, \"recharge_amount\": 1.0}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"trigger_balance":1,"recharge_amount":1}}},{"id":"account.autorecharge.get","module":"account-billing","namespace":"account","action":"autorecharge.get","method":"GET","path":"/v1/account/autorecharge/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the current auto-recharge configuration.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/AutorechargeConfig.json","response":{"title":"AutorechargeConfig","description":"Returned by account.autorecharge.enable / .status. See docs/Infrai_SDK_Account_Billing.md §3.3 and enums/autorecharge_status.yaml.","type":"object","required":["enabled","trigger_balance","recharge_amount","payment_method_id","payment_method_summary","max_per_day","max_per_month","triggered_today","triggered_this_month","consecutive_failures"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether this feature or configuration is enabled"},"trigger_balance":{"type":"number","minimum":0,"description":"Balance threshold that triggers automatic recharge, in USD"},"recharge_amount":{"type":"number","minimum":0,"description":"Amount to recharge when triggered, in USD"},"payment_method_id":{"type":"string","description":"Identifier of the payment method used"},"payment_method_summary":{"type":"string","description":"e.g. 'Visa ****4242'."},"max_per_day":{"type":"integer","minimum":1,"description":"Maximum recharge amount per day in USD"},"max_per_month":{"type":"integer","minimum":1,"description":"Maximum recharge amount per month in USD"},"triggered_today":{"type":"integer","minimum":0,"description":"Amount recharged today in USD"},"triggered_this_month":{"type":"integer","minimum":0,"description":"Amount recharged this month in USD"},"next_check_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the next balance check will occur"},"last_succeeded_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful payment"},"last_failed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last payment failure"},"consecutive_failures":{"type":"integer","minimum":0,"description":"Number of consecutive payment failures"},"configured":{"type":"boolean","description":"Whether a config row exists for this account (false = never set up; the numeric fields are then zero defaults)."},"disabled_reason":{"type":["string","null"],"description":"Why auto-recharge is currently disabled (e.g. 'user', 'max_failures', 'admin'); null when enabled or never disabled."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/autorecharge/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/autorecharge/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/autorecharge/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/autorecharge/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/autorecharge/get\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/autorecharge/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/autorecharge/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/autorecharge/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/autorecharge/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/autorecharge/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.balance","module":"account-billing","namespace":"account","action":"balance","method":"GET","path":"/v1/account/balance","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the account wallet balance and trial status.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/BalanceInfo.json","response":{"title":"BalanceInfo","description":"Wallet balance + runway snapshot returned by account.balance(). See docs/Infrai_SDK_Account_Billing.md §4.1.","type":"object","required":["balance","cap","available_room","runway_days","daily_avg_spend","tier","expires_at","expires_in_days","activity_required_by","is_refundable","is_transferable","is_in_grace_period"],"additionalProperties":false,"properties":{"balance":{"type":"number","minimum":0,"description":"Current wallet balance in USD"},"cap":{"type":["number","null"],"minimum":0,"description":"Wallet upper bound for current tier; null for Enterprise (no cap)."},"available_room":{"type":["number","null"],"minimum":0,"description":"= cap - balance; null when cap is null (uncapped)."},"runway_days":{"type":["number","null"],"minimum":0,"description":"Estimated days at current daily_avg_spend; null when spend rate is ~0."},"daily_avg_spend":{"type":"number","minimum":0,"description":"Average daily spend in USD"},"tier":{"enum":["standard","pro","enterprise"],"description":"Current subscription tier (standard / pro / enterprise)"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Trial-credit expiry (last activity + grace window); null when there is no expiring trial credit."},"expires_in_days":{"type":["integer","null"],"description":"Days until the current balance or subscription expires"},"activity_required_by":{"type":["string","null"],"format":"date-time","description":"Date by which account activity is required to maintain status"},"is_refundable":{"type":"boolean","const":false,"description":"Whether the current balance is eligible for refund"},"is_transferable":{"type":"boolean","const":false,"description":"Whether the current balance can be transferred to another account"},"is_in_grace_period":{"type":"boolean","description":"Whether the account is in the grace period after balance expiry"},"grace_period_ends_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the grace period ends"},"forfeited_amount":{"type":["number","null"],"minimum":0,"description":"Amount forfeited during account operations, in USD"},"pending_topups":{"type":["array","null"],"items":{"type":"string"},"description":"List of pending top-up sessions"},"account_id":{"type":["string","null"],"description":"The account the balance belongs to."},"balance_usd":{"type":"number","minimum":0,"description":"Alias of `balance` for the documented SDK/CLI status surface."},"currency":{"type":"string","examples":["USD"],"description":"ISO 4217 currency code (e.g. USD, CNY)"},"affordable_uses_hint":{"type":["object","null"],"description":"Per-capability hint: how many more flat-priced calls the current balance covers (best-effort, omitted for token-metered caps).","additionalProperties":{"type":"object"}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/balance \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/balance\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/balance\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/balance\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/balance\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/balance\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/balance\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/balance\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/balance\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/balance\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.budget.get","module":"account-billing","namespace":"account","action":"budget.get","method":"GET","path":"/v1/account/budget/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the budget configuration (period, hard cap, alert thresholds).","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/BudgetConfig.json","response":{"title":"BudgetConfig","description":"Canonical budget configuration returned identically by account.budget.get and account.budget.set.","type":"object","required":["hard_cap_usd","period","alert_threshold_usd","spent_this_period_usd","configured","updated_at"],"additionalProperties":false,"properties":{"hard_cap_usd":{"type":["number","null"],"minimum":0,"description":"Spend in the period is blocked past this amount; null means no cap."},"period":{"enum":["daily","monthly"],"description":"Billing or retention period (e.g. monthly, daily)"},"alert_threshold_usd":{"type":["number","null"],"minimum":0,"description":"Fire a budget-near alert at this USD amount; null means no alert."},"spent_this_period_usd":{"type":"number","minimum":0,"description":"Amount spent in the current billing period in USD."},"period_resets_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the current period resets"},"configured":{"type":"boolean","description":"Whether a budget row has been set (false = no cap configured; the *_usd fields are then null/0)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/budget/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/budget/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/budget/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/budget/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/budget/get\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/budget/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/budget/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/budget/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/budget/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/budget/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.budget.set","module":"account-billing","namespace":"account","action":"budget.set","method":"PUT","path":"/v1/account/budget/set","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Set a hard budget cap and alert thresholds, blocking billable calls when exceeded.","request_schema_ref":"account-billing/BudgetSetRequest.json","params":{"title":"BudgetSetRequest","description":"Set the canonical budget configuration. Returns the same BudgetConfig shape as account.budget.get.","type":"object","required":["hard_cap_usd","period"],"additionalProperties":false,"properties":{"hard_cap_usd":{"type":["number","null"],"minimum":0,"description":"Spending hard cap in USD for the selected period; null removes the cap."},"period":{"enum":["daily","monthly"],"description":"Billing or retention period (e.g. monthly, daily)"},"alert_threshold_usd":{"type":["number","null"],"minimum":0,"description":"Budget-near alert threshold in USD; null disables the alert."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/BudgetConfig.json","response":{"title":"BudgetConfig","description":"Canonical budget configuration returned identically by account.budget.get and account.budget.set.","type":"object","required":["hard_cap_usd","period","alert_threshold_usd","spent_this_period_usd","configured","updated_at"],"additionalProperties":false,"properties":{"hard_cap_usd":{"type":["number","null"],"minimum":0,"description":"Spend in the period is blocked past this amount; null means no cap."},"period":{"enum":["daily","monthly"],"description":"Billing or retention period (e.g. monthly, daily)"},"alert_threshold_usd":{"type":["number","null"],"minimum":0,"description":"Fire a budget-near alert at this USD amount; null means no alert."},"spent_this_period_usd":{"type":"number","minimum":0,"description":"Amount spent in the current billing period in USD."},"period_resets_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the current period resets"},"configured":{"type":"boolean","description":"Whether a budget row has been set (false = no cap configured; the *_usd fields are then null/0)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/account/budget/set \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/account/budget/set\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'hard_cap_usd': 'sample', 'period': 'daily'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/budget/set\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/budget/set\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/account/budget/set\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/budget/set\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"hard_cap_usd\\\": \\\"sample\\\", \\\"period\\\": \\\"daily\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/account/budget/set\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"hard_cap_usd\\\": \\\"sample\\\", \\\"period\\\": \\\"daily\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/budget/set\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"hard_cap_usd\\\": \\\"sample\\\", \\\"period\\\": \\\"daily\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/budget/set\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/account/budget/set\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"hard_cap_usd\": \"sample\", \"period\": \"daily\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"hard_cap_usd":"sample","period":"daily"}}},{"id":"account.keys.create","module":"account-billing","namespace":"account","action":"keys.create","method":"POST","path":"/v1/account/keys/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create an API key; the secret is returned only once.","request_schema_ref":"account-billing/KeyCreateRequest.json","params":{"title":"KeyCreateRequest","description":"Request shape for account.keys.create. Returns an ApiKey whose key_secret is populated exactly once. See REVIEW Account §3.B.","type":"object","additionalProperties":false,"properties":{"project_id":{"type":["string","null"],"description":"null = caller's current project."},"name":{"type":["string","null"],"maxLength":128,"description":"Human-readable name for this resource"},"scopes":{"type":["array","null"],"items":{"type":"string"},"description":"Empty/null = all-modules; explicit scopes per enums/key_scope.yaml."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/ApiKey.json","response":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/keys/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/keys/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/keys/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/keys/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/keys/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.keys.list","module":"account-billing","namespace":"account","action":"keys.list","method":"GET","path":"/v1/account/keys/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List all API keys on the account and their status.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/ApiKeyList.json","response":{"title":"ApiKeyList","description":"Paginated result for account.keys.list — array of ApiKey rows (masked, key_secret null on list) with cursor pagination. Replaces the legacy bare-list return. See REVIEW Account §3.B.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/keys/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/keys/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/keys/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/keys/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/keys/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.keys.revoke","module":"account-billing","namespace":"account","action":"keys.revoke","method":"DELETE","path":"/v1/account/keys/revoke/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Revoke an API key, taking effect immediately.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/ApiKey.json","response":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/account/keys/revoke/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/account/keys/revoke/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/revoke/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/revoke/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/account/keys/revoke/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/revoke/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/account/keys/revoke/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/revoke/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/revoke/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/account/keys/revoke/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.keys.rotate","module":"account-billing","namespace":"account","action":"keys.rotate","method":"POST","path":"/v1/account/keys/rotate/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Rotate an API key; the old secret stays valid during a grace period.","request_schema_ref":"account-billing/KeyRotateRequest.json","params":{"title":"KeyRotateRequest","description":"Request shape for account.keys.rotate — mint a new secret while the old key stays valid for grace_hours (status=rotating). Returns an ApiKey with the new key_secret (returned once). See REVIEW Account §3.B.","type":"object","additionalProperties":false,"properties":{"grace_hours":{"type":"integer","minimum":0,"maximum":168,"default":24,"description":"Hours the old key remains valid after rotation"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/ApiKey.json","response":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/keys/rotate/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/keys/rotate/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/rotate/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/rotate/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/keys/rotate/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/rotate/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/keys/rotate/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/rotate/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/rotate/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/keys/rotate/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.keys.suspected_compromise","module":"account-billing","namespace":"account","action":"keys.suspected_compromise","method":"POST","path":"/v1/account/keys/suspected_compromise/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Report an API key as suspected compromised to immediately revoke and auto-reissue it.","request_schema_ref":"account-billing/KeySuspectedCompromiseRequest.json","params":{"title":"KeySuspectedCompromiseRequest","description":"Request shape for account.keys.suspected_compromise — report a key as possibly leaked. confirmed_leak=true revokes immediately; auto_rotate mints a replacement. Returns an ApiKey. See REVIEW Account §3.B.","type":"object","additionalProperties":false,"properties":{"confirmed_leak":{"type":"boolean","default":false,"description":"Whether the key leak has been confirmed"},"auto_rotate":{"type":"boolean","default":true,"description":"Whether to automatically rotate the compromised key"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/ApiKey.json","response":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/keys/suspected_compromise/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/keys/suspected_compromise/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.keys.update","module":"account-billing","namespace":"account","action":"keys.update","method":"PATCH","path":"/v1/account/keys/update/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Update an API key's name or scopes; scope tightening takes effect immediately.","request_schema_ref":"account-billing/KeyUpdateRequest.json","params":{"title":"KeyUpdateRequest","description":"Request shape for account.keys.update — rename and/or re-scope an existing key. Scope tightening takes effect immediately. Returns the updated ApiKey. Net-new (no prior SDK signature). See REVIEW Account §3.B.","type":"object","additionalProperties":false,"properties":{"name":{"type":["string","null"],"maxLength":128,"description":"Human-readable name for this resource"},"scopes":{"type":["array","null"],"items":{"type":"string"},"description":"Permission scopes granted to this API key"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/ApiKey.json","response":{"title":"ApiKey","type":"object","required":["key_id"],"additionalProperties":false,"properties":{"key_id":{"type":"string","pattern":"^ifr_[A-Za-z0-9_]*(\\.\\.\\.|\\u2026)?[A-Za-z0-9]{4,}$","description":"Key id. On list it is MASKED (optional prefix + separator + last 4) — the separator is ASCII '...' (path-safe) or the legacy unicode ellipsis, e.g. ifr_...52fb / ifr_pk_proj_…9180 / ifr_…ab74. The full ifr_ value is only ever returned at create time."},"key_secret":{"type":["string","null"],"description":"Full plaintext value; returned only on create."},"key":{"type":["string","null"],"description":"account.keys.rotate only. Full plaintext value of the newly-minted secret, shown exactly once (same purpose as key_secret on create, different field name on this endpoint)."},"old_key_id":{"type":["string","null"],"description":"account.keys.rotate only. Masked id of the key that was superseded by this rotation."},"rotated":{"type":"boolean","description":"account.keys.rotate only. Whether a new secret was actually minted (false when the referenced key was not found)."},"revoked":{"type":"boolean","description":"account.keys.revoke / .suspected_compromise only. Whether the key was actually revoked (false when the referenced key was not found)."},"action":{"type":["string","null"],"description":"account.keys.suspected_compromise only. Fixed action label, e.g. 'revoked_on_compromise_report'."},"updated":{"type":"boolean","description":"account.keys.update only. Whether the key record was actually updated (false when the referenced key was not found)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"tier":{"type":["string","null"],"description":"Billing tier the key inherits from its account (standard/pro/enterprise)."},"scopes":{"type":"array","items":{"type":"string"},"description":"Granted scopes. OMITTED from list output (internal; session keys filtered) — present only where the surface exposes it."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was last used"},"last_used_ip":{"type":["string","null"],"description":"IP of the most recent request authenticated with this key; null if never used."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this key was revoked"},"status":{"enum":["active","rotating","revoked","not_found"],"description":"Current status of this resource. 'not_found' is returned by keys.update/.rotate/.suspected_compromise when the referenced key_id doesn't resolve to a key on this account."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/account/keys/update/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/account/keys/update/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/keys/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/account/keys/update/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/keys/update/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/account/keys/update/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/keys/update/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/keys/update/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/account/keys/update/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.payment_method.set_default","module":"account-billing","namespace":"account","action":"payment_method.set_default","method":"POST","path":"/v1/account/payment_method/set_default","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Set a payment method as the account default.","request_schema_ref":"account-billing/PaymentMethodSetDefaultRequest.json","params":{"title":"PaymentMethodSetDefaultRequest","description":"Request shape for account.payment_method.set_default. Returns the updated AccountPaymentMethod. See REVIEW Account §3.D.","type":"object","required":["payment_method_id"],"additionalProperties":false,"properties":{"payment_method_id":{"type":"string","description":"Identifier of the payment method used"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/AccountPaymentMethod.json","response":{"title":"AccountPaymentMethod","description":"A wallet-funding payment method on the caller's own account (distinct from billing.PaymentMethod which is a merchant customer's method). Returned by account.payment_method.list / .set_default. set_default's shape diverges from list (adds set_default/status/message, omits is_default when the payment_method_id isn't a known saved method), so is_default is optional here. See REVIEW Account §3.D.","type":"object","required":["payment_method_id"],"additionalProperties":false,"properties":{"payment_method_id":{"type":"string","description":"Identifier of the payment method used"},"set_default":{"type":"boolean","description":"account.payment_method.set_default only. Whether the default was actually changed (false when payment_method_id isn't a known saved method)."},"status":{"type":["string","null"],"enum":["not_found",null],"description":"account.payment_method.set_default only. Present ('not_found') when payment_method_id doesn't match a saved method."},"message":{"type":["string","null"],"description":"account.payment_method.set_default only. Human-readable detail when set_default is false."},"kind":{"anyOf":[{"type":"string","enum":["card","sepa","ach","alipay","wechat","applepay","googlepay"],"description":"Kind of payment instrument attached to a customer."},{"type":"null"}],"description":"Optional. Structured instrument kind; absent for cards saved via the setup-intent flow (only the provider summary is retained) — see `summary`."},"summary":{"type":["string","null"],"description":"Human-readable description of the instrument, e.g. 'Visa ****4242'."},"stripe_customer_id":{"type":["string","null"],"description":"Stripe customer id the method is attached to; null in mock/dev."},"is_default":{"type":"boolean","description":"Whether this is the default payment method"},"last4":{"type":["string","null"],"pattern":"^[0-9]{4}$","description":"Last 4 digits of the card number"},"brand":{"type":["string","null"],"description":"Card brand (e.g. visa, mastercard)"},"expires":{"type":["string","null"],"description":"MM/YY for card kind."},"added_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was added"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/payment_method/set_default \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"payment_method_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/payment_method/set_default\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'payment_method_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/payment_method/set_default\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"payment_method_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/payment_method/set_default\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"payment_method_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"payment_method_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/payment_method/set_default\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/payment_method/set_default\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"payment_method_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/payment_method/set_default\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"payment_method_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/payment_method/set_default\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"payment_method_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/payment_method/set_default\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"payment_method_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/payment_method/set_default\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"payment_method_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"payment_method_id":"sample"}}},{"id":"account.routing.get","module":"account-billing","namespace":"account","action":"routing.get","method":"GET","path":"/v1/account/routing/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the account's AI routing preference: per-capability vendor chains (model-annotated) + excluded vendors.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/RoutingConfig.json","response":{"title":"RoutingConfig","type":"object","description":"Returned by account.routing.get / .set. The two handlers — and .set's two independent sub-actions (no_china_route toggle vs per-capability vendor exclude) — return DIVERGENT shapes, so this schema is a permissive superset: get returns {preferences, effective_chains, no_china_route}; set(no_china_route=...) returns {no_china_route, ok}; set(capability=..., exclude=...) returns {capability, exclude, ok}. No field is common to all three, so nothing is required.","required":[],"additionalProperties":false,"properties":{"preferences":{"type":"object","description":"account.routing.get only. Per-capability vendor exclude list the account has configured, keyed by capability id.","additionalProperties":{"type":"object","additionalProperties":false,"properties":{"exclude":{"type":"array","items":{"type":"string"}}}}},"effective_chains":{"type":"object","description":"account.routing.get only. Per-capability failover chain after applying the account's exclude and filtering to currently-usable vendors, keyed by capability id. Each entry is model-first: the vendor plus the model it serves.","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"vendor":{"type":"string"},"model":{"type":["string","null"]}}}}},"no_china_route":{"type":"boolean","description":"account.routing.get (current value) / account.routing.set (echoed new value, only when the no_china_route toggle was set). Data-sovereignty flag: when true the gateway routes only to non-China vendors."},"capability":{"type":"string","description":"account.routing.set only (per-capability exclude sub-action). The capability the exclude list was set for."},"exclude":{"type":"array","items":{"type":"string"},"description":"account.routing.set only (per-capability exclude sub-action). Echo of the vendor ids excluded from that capability's chain."},"ok":{"type":"boolean","description":"account.routing.set only. Always true — confirms the write was applied."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/routing/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/routing/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/routing/get\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/routing/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/routing/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/routing/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/routing/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/routing/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.routing.set","module":"account-billing","namespace":"account","action":"routing.set","method":"PUT","path":"/v1/account/routing/set","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Exclude vendors from an AI capability's routing (cost / reliability / data sovereignty).","request_schema_ref":"account-billing/RoutingSetRequest.json","params":{"title":"RoutingSetRequest","description":"Request shape for account.routing.set — set a per-account vendor routing preference for one AI-inference capability (only ai.* stateless capabilities are customizable). The only lever is `exclude` (never route my AI traffic to these vendors); failover ORDER is platform-managed by health/price, and WHICH model runs is the `model` pin / task+mode axes, not a vendor list.","type":"object","required":["capability"],"additionalProperties":false,"properties":{"capability":{"type":"string","description":"AI-inference capability id (ai.*) whose vendor exclude is being set.","example":"ai.chat"},"exclude":{"type":"array","items":{"type":"string"},"default":[],"description":"Vendors to never route this capability to (cost / reliability / data sovereignty).","example":["openai"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/RoutingConfig.json","response":{"title":"RoutingConfig","type":"object","description":"Returned by account.routing.get / .set. The two handlers — and .set's two independent sub-actions (no_china_route toggle vs per-capability vendor exclude) — return DIVERGENT shapes, so this schema is a permissive superset: get returns {preferences, effective_chains, no_china_route}; set(no_china_route=...) returns {no_china_route, ok}; set(capability=..., exclude=...) returns {capability, exclude, ok}. No field is common to all three, so nothing is required.","required":[],"additionalProperties":false,"properties":{"preferences":{"type":"object","description":"account.routing.get only. Per-capability vendor exclude list the account has configured, keyed by capability id.","additionalProperties":{"type":"object","additionalProperties":false,"properties":{"exclude":{"type":"array","items":{"type":"string"}}}}},"effective_chains":{"type":"object","description":"account.routing.get only. Per-capability failover chain after applying the account's exclude and filtering to currently-usable vendors, keyed by capability id. Each entry is model-first: the vendor plus the model it serves.","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"vendor":{"type":"string"},"model":{"type":["string","null"]}}}}},"no_china_route":{"type":"boolean","description":"account.routing.get (current value) / account.routing.set (echoed new value, only when the no_china_route toggle was set). Data-sovereignty flag: when true the gateway routes only to non-China vendors."},"capability":{"type":"string","description":"account.routing.set only (per-capability exclude sub-action). The capability the exclude list was set for."},"exclude":{"type":"array","items":{"type":"string"},"description":"account.routing.set only (per-capability exclude sub-action). Echo of the vendor ids excluded from that capability's chain."},"ok":{"type":"boolean","description":"account.routing.set only. Always true — confirms the write was applied."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/account/routing/set \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"capability\": \"ai.chat\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/account/routing/set\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'capability': 'ai.chat'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/set\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"capability\": \"ai.chat\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/set\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"capability\": \"ai.chat\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"capability\": \"ai.chat\"}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/account/routing/set\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/routing/set\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"capability\\\": \\\"ai.chat\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/account/routing/set\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"capability\\\": \\\"ai.chat\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/routing/set\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"capability\\\": \\\"ai.chat\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/routing/set\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"capability\": \"ai.chat\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/account/routing/set\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"capability\": \"ai.chat\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"capability":"ai.chat"}}},{"id":"account.routing.test","module":"account-billing","namespace":"account","action":"routing.test","method":"POST","path":"/v1/account/routing/test","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Test routing resolution for an AI capability: the vendor chain and the model each serves.","request_schema_ref":"account-billing/RoutingTestRequest.json","params":{"title":"RoutingTestRequest","description":"Request for account.routing.test — dry-run the account's effective vendor fallback chain for one capability. Read-only reachability probe: returns the resolved chain (each entry's vendor + model + whether it is currently up) with NO vendor call and NO spend.","type":"object","additionalProperties":false,"properties":{"capability":{"type":["string","null"],"default":"ai.chat","example":"ai.chat","description":"Capability id whose routing chain to test (defaults to ai.chat)."}}},"response_schema_ref":"account-billing/RoutingTestResult.json","response":{"title":"RoutingTestResult","type":"object","description":"Result of account.routing.test — a read-only, side-effect-free reachability check (no vendor call, no spend) of the effective failover chain for a capability.","required":["capability","customizable","chain","results","ok"],"additionalProperties":false,"properties":{"capability":{"type":"string","description":"The capability that was tested (defaults to ai.chat if not given)."},"customizable":{"type":"boolean","description":"Whether this capability accepts a per-account vendor exclude (AI-inference/stateless only)."},"chain":{"type":"array","items":{"type":"string"},"description":"The effective vendor id chain after applying the account's exclude and filtering to currently-usable vendors."},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"vendor":{"type":"string"},"model":{"type":["string","null"],"description":"The model this vendor would serve for the capability, best-effort."},"up":{"type":"boolean","description":"Whether the vendor is currently marked up in the live registry."}}},"description":"Per-vendor reachability, one entry per vendor in `chain`."},"ok":{"type":"boolean","description":"True when at least one vendor in the chain is currently up."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/routing/test \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/routing/test\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/test\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/routing/test\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/routing/test\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/routing/test\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/routing/test\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/routing/test\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/routing/test\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/routing/test\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.subscription.get","module":"account-billing","namespace":"account","action":"subscription.get","method":"GET","path":"/v1/account/subscription/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the subscription status and billing period.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/SubscriptionInfo.json","response":{"title":"SubscriptionInfo","description":"Recurring-billing state returned by account.subscription.get(). Infrai's recurring model is USAGE-BASED (pay-as-you-go wallet) with optional auto-recharge as the recurring funding policy — there is no fixed monthly plan. The shape reports the real model + tier + the active auto-recharge policy; `fixed_subscription` is null unless a future fixed plan exists. See docs/Infrai_SDK_Account_Billing.md §5.1.","type":"object","required":["model","tier","fixed_subscription","autorecharge"],"additionalProperties":false,"properties":{"model":{"enum":["usage_based"],"description":"Always usage_based; pay-as-you-go wallet with optional auto-recharge."},"tier":{"enum":["standard","pro","enterprise"],"description":"Current subscription tier (standard / pro / enterprise)"},"fixed_subscription":{"type":["object","null"],"description":"Reserved for a future fixed recurring plan; null today (no fixed subscription)."},"autorecharge":{"type":"object","description":"The recurring funding policy: auto top-up of the wallet when it drops below trigger_balance_usd.","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean"},"recharge_amount_usd":{"type":["number","null"],"minimum":0},"trigger_balance_usd":{"type":["number","null"],"minimum":0},"payment_method":{"type":["string","null"],"description":"Masked card summary, e.g. 'Visa ****4242'."}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/subscription/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/subscription/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/subscription/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/subscription/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/subscription/get\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/subscription/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/subscription/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/subscription/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/subscription/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/subscription/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.tier","module":"account-billing","namespace":"account","action":"tier","method":"GET","path":"/v1/account/tier","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the current tier and its quota limits.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/TierInfo.json","response":{"title":"TierInfo","description":"Returned by account.tier(). See docs/Infrai_SDK_Account_Billing.md §5.1.","type":"object","required":["tier","since","rate_limit_multiplier","features"],"additionalProperties":false,"properties":{"tier":{"enum":["standard","pro","enterprise"],"description":"Current subscription tier (standard / pro / enterprise)"},"since":{"type":"string","format":"date-time","description":"ISO 8601 date when the current tier or state became effective"},"wallet_cap":{"type":["number","null"],"minimum":0,"description":"null for Enterprise (no cap)."},"rate_limit_multiplier":{"type":"number","minimum":1,"description":"Rate limit multiplier applied at this tier"},"features":{"type":"array","items":{"type":"string"},"description":"List of features available at this tier"},"pro_subscription":{"type":["object","null"],"description":"Details of the active Pro subscription, if any"},"enterprise_contract":{"type":["object","null"],"description":"Details of the enterprise contract, if any"},"account_id":{"type":["string","null"],"description":"The account whose tier this is."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/tier \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/tier\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/tier\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/tier\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/tier\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/tier\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/tier\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/tier\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/tier\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/tier\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.tier.upgrade","module":"account-billing","namespace":"account","action":"tier.upgrade","method":"POST","path":"/v1/account/tier/upgrade","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Upgrade the account tier (pro/team/enterprise), returning a checkout URL when payment is required.","request_schema_ref":"account-billing/UpgradeRequest.json","params":{"title":"UpgradeRequest","description":"Request shape for account.tier.upgrade. `target` upgrade set is {pro,team,enterprise}; note `team` is a checkout/subscription label only — the persisted TierInfo.tier is always one of standard/pro/enterprise. See REVIEW Account §3.A / §4.","type":"object","required":["target"],"additionalProperties":false,"properties":{"target":{"enum":["pro","team","enterprise"],"description":"Target URL or resource for webhook or notification"},"return_url":{"type":["string","null"],"format":"uri","description":"Where checkout redirects after success/cancel; echoed into the hosted checkout session."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/UpgradeResult.json","response":{"title":"UpgradeResult","description":"Returned by account.tier.upgrade. pro/team targets require hosted checkout (requires_checkout=true + checkout_url); enterprise routes to sales (requires_sales_contact=true + contact_sales_url). The remaining fields are operational status returned by the edge: current_tier (effective tier before the change), status (subscription lifecycle: pending/active), immediate_effect (true only when a dev/non-prod posture confirmed the subscription without real payment), price_usd/period (the resolved plan), subscription/subscription_id (the created subscription), account_id. See REVIEW Account §1(a).","type":"object","required":["target","requires_checkout","requires_sales_contact"],"additionalProperties":false,"properties":{"target":{"enum":["pro","team","enterprise"],"description":"Target URL or resource for webhook or notification"},"requires_checkout":{"type":"boolean","description":"Whether a Stripe checkout session is required to complete the change"},"checkout_url":{"type":["string","null"],"format":"uri","description":"URL for the Stripe checkout session"},"requires_sales_contact":{"type":"boolean","description":"Whether contacting sales is required to complete the change"},"contact_sales_url":{"type":["string","null"],"format":"uri","description":"URL to contact the sales team"},"current_tier":{"type":["string","null"],"description":"Effective tier before this upgrade."},"status":{"type":["string","null"],"enum":["pending","active",null],"description":"Subscription lifecycle after the call. pending = awaiting checkout webhook; active = confirmed (dev/non-prod posture)."},"immediate_effect":{"type":["boolean","null"],"description":"True only when the tier flipped immediately (dev/non-prod posture, no real payment)."},"price_usd":{"type":["number","null"],"description":"Resolved plan price in USD."},"period":{"type":["string","null"],"description":"Billing period of the resolved plan (e.g. monthly/annual)."},"subscription":{"type":["object","null"],"description":"Public view of the created subscription (present when confirmed)."},"subscription_id":{"type":["string","null"],"description":"Created subscription id (present when pending checkout)."},"payment_source":{"type":["string","null"],"enum":["wallet","dev_mock","stripe_subscription",null],"description":"How the upgrade was (or will be) funded: wallet balance, dev/non-prod auto-confirm, or a real Stripe subscription checkout. Absent for the enterprise (sales-contact) branch."},"checkout_mode":{"type":["string","null"],"description":"Mode of the created checkout session (e.g. 'stripe'/'mock'). Present only alongside checkout_url (payment_source=stripe_subscription)."},"account_id":{"type":["string","null"],"description":"Account the upgrade applies to."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/tier/upgrade \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"target\": \"pro\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/tier/upgrade\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'target': 'pro'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/tier/upgrade\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"target\": \"pro\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/tier/upgrade\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"target\": \"pro\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"target\": \"pro\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/tier/upgrade\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/tier/upgrade\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"target\\\": \\\"pro\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/tier/upgrade\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"target\\\": \\\"pro\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/tier/upgrade\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"target\\\": \\\"pro\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/tier/upgrade\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"target\": \"pro\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/tier/upgrade\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"target\": \"pro\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"target":"pro"}}},{"id":"account.topup","module":"account-billing","namespace":"account","action":"topup","method":"POST","path":"/v1/account/topup","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create a Stripe top-up session and return the hosted payment page URL.","request_schema_ref":"account-billing/TopupRequest.json","params":{"title":"TopupRequest","description":"Request shape for account.topup — start a wallet top-up. The top-up stays PENDING until the caller completes browser checkout; the wallet is never fake-credited. Returns topup_id + checkout_url. See Strategy §5.6 (email-bind gate).","type":"object","additionalProperties":false,"properties":{"amount_usd":{"type":["number","null"],"minimum":0,"description":"Top-up amount in USD."},"amount":{"type":["number","null"],"minimum":0,"description":"Legacy alias for amount_usd."},"currency":{"type":"string","default":"USD","description":"ISO 4217 currency code (e.g. USD, CNY)"},"return_url":{"type":["string","null"],"description":"URL the checkout redirects back to; defaults to the configured return URL.","format":"uri"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/TopupSession.json","response":{"title":"TopupSession","description":"Returned by account.topup — a REAL (Stripe-hosted or dev-mock) checkout session. The top-up stays PENDING until the caller opens checkout_url and completes payment; the wallet is credited by the Stripe webhook, never fake-credited inline. Poll account.topup.status with topup_id.","type":"object","required":["topup_id","status","checkout_url","amount_usd","currency","checkout_mode"],"additionalProperties":false,"properties":{"topup_id":{"type":"string","description":"Provider checkout-session id (Stripe cs_... / dev cs_mock_...). Pass to account.topup.status to poll the outcome."},"status":{"enum":["pending","paid","failed","unknown"],"description":"pending until the user completes browser checkout; the Stripe webhook flips it to paid/failed."},"checkout_url":{"type":"string","format":"uri","description":"Open this to pay; on success the wallet is credited."},"checkout_mode":{"enum":["stripe","mock"],"description":"stripe = real Stripe Checkout; mock = local dev session."},"amount_usd":{"type":"number","minimum":0.5,"description":"Top-up amount in USD."},"amount":{"type":"number","minimum":0.5,"description":"Back-compat alias of amount_usd."},"currency":{"type":"string","examples":["USD","CNY"],"description":"ISO 4217 currency code (e.g. USD, CNY)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/topup \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/topup\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/topup\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/topup\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/topup\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/topup\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/topup\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/topup\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/topup\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/topup\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.topup.status","module":"account-billing","namespace":"account","action":"topup.status","method":"GET","path":"/v1/account/topup/status","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the pending, paid, failed, or unknown status of a top-up session.","request_schema_ref":"account-billing/TopupStatusRequest.json","params":{"title":"TopupStatusRequest","description":"Query parameters for account.topup.status. Omit topup_id to read the caller account's latest top-up session.","type":"object","additionalProperties":false,"properties":{"topup_id":{"type":"string","description":"Top-up session id returned by account.topup."}}},"response_schema_ref":"account-billing/TopupStatus.json","response":{"title":"TopupStatus","description":"Current state of a top-up checkout session.","type":"object","required":["topup_id","status"],"additionalProperties":false,"properties":{"topup_id":{"type":"string","description":"Top-up session id."},"status":{"enum":["pending","paid","failed","unknown"],"description":"pending until checkout completes; paid after wallet credit; unknown when no matching session exists."},"amount_usd":{"type":"number","minimum":0.5,"description":"Top-up amount in USD."},"currency":{"type":"string","description":"ISO 4217 currency code."},"paid_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of wallet credit, or null while unpaid."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/topup/status \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/topup/status\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/topup/status\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/topup/status\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/topup/status\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/topup/status\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/topup/status\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/topup/status\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/topup/status\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/topup/status\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.usage","module":"account-billing","namespace":"account","action":"usage","method":"GET","path":"/v1/account/usage","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Summarize usage for the current billing period: spend, request count, and a per-capability breakdown.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/UsageInfo.json","response":{"title":"UsageInfo","description":"Usage report returned by account.usage(period). See docs/Infrai_SDK_Account_Billing.md §4.2.","type":"object","required":["period","period_start","period_end","total_cost","total_calls","total_failed_calls","cache_hits","cache_savings","breakdown"],"additionalProperties":false,"properties":{"period":{"enum":["1d","7d","30d","mtd","ytd"],"description":"Billing or retention period (e.g. monthly, daily)"},"period_start":{"type":"string","format":"date-time","description":"Start of the current billing period"},"period_end":{"type":"string","format":"date-time","description":"End of the current billing period"},"total_cost":{"type":"number","minimum":0,"description":"Total cost in USD for the queried period"},"total_calls":{"type":"integer","minimum":0,"description":"Total number of API calls in the queried period"},"total_failed_calls":{"type":"integer","minimum":0,"description":"Total number of failed API calls in the queried period"},"cache_hits":{"type":"integer","minimum":0,"description":"Number of cache hits in the queried period"},"cache_savings":{"type":"number","minimum":0,"description":"Estimated cost savings from cache hits in USD"},"breakdown":{"type":"array","items":{"type":"object","required":["key","label","cost","calls","failed_calls"],"additionalProperties":false,"properties":{"key":{"type":"string"},"label":{"type":"string"},"cost":{"type":"number","minimum":0},"calls":{"type":"integer","minimum":0},"failed_calls":{"type":"integer","minimum":0},"avg_latency_ms":{"type":["number","null"],"minimum":0},"p95_latency_ms":{"type":["number","null"],"minimum":0},"error_rate":{"type":["number","null"],"minimum":0,"maximum":1},"top_errors":{"type":["array","null"],"items":{"type":"object"}}}},"description":"Cost breakdown by component"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/usage \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/usage\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/usage\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/usage\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/usage\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/usage\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/usage\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/usage\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/usage\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/usage\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.usage.timeseries","module":"account-billing","namespace":"account","action":"usage.timeseries","method":"GET","path":"/v1/account/usage/timeseries","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Return a usage time series at hour, day, or month granularity.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/UsageTimeseries.json","response":{"title":"UsageTimeseries","description":"Returned by account.usage.timeseries — per-day usage buckets with cursor pagination for charting. See REVIEW Account §3.C.","type":"object","required":["period","buckets"],"additionalProperties":false,"properties":{"period":{"enum":["1d","7d","30d","mtd","ytd"],"description":"Billing or retention period (e.g. monthly, daily)"},"buckets":{"type":"array","items":{"type":"object","required":["date","cost","calls","failed_calls"],"additionalProperties":false,"properties":{"date":{"type":"string","format":"date"},"cost":{"type":"number","minimum":0},"calls":{"type":"integer","minimum":0},"failed_calls":{"type":"integer","minimum":0},"cache_hits":{"type":["integer","null"],"minimum":0}}},"description":"Time-bucketed data points"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/usage/timeseries \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/usage/timeseries\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/usage/timeseries\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/usage/timeseries\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/usage/timeseries\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/usage/timeseries\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/usage/timeseries\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/usage/timeseries\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/usage/timeseries\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/usage/timeseries\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.webhooks.delete","module":"account-billing","namespace":"account","action":"webhooks.delete","method":"DELETE","path":"/v1/account/webhooks/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a webhook registration; no further event deliveries are sent to its URL. Idempotent.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/DeleteResult.json","response":{"title":"DeleteResult","description":"Returned by account.webhooks.delete. Deletion is immediate (soft-delete of the account_resource row); `deleted` is false when the referenced webhook_id was not found on this account.","type":"object","required":["webhook_id","deleted"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","description":"The webhook id that was targeted for deletion."},"deleted":{"type":"boolean","description":"Whether a webhook was actually deleted (false when webhook_id didn't resolve to a row on this account)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/account/webhooks/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/account/webhooks/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/account/webhooks/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/account/webhooks/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/account/webhooks/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.webhooks.deliveries","module":"account-billing","namespace":"account","action":"webhooks.deliveries","method":"GET","path":"/v1/account/webhooks/deliveries/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List a webhook's delivery records with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/WebhookDeliveryList.json","response":{"title":"WebhookDeliveryList","description":"Paginated result for account.webhooks.deliveries — delivery attempts for one webhook. See REVIEW Account §3.E.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"WebhookDelivery","description":"One account-webhook delivery attempt record. Returned (as items) by account.webhooks.deliveries and (as delivery_id) by account.webhooks.test/retry/replay. See REVIEW Account §3.E.","type":"object","required":["delivery_id","webhook_id","event","status","attempt","created_at"],"additionalProperties":false,"properties":{"delivery_id":{"type":"string","pattern":"^dlv_[A-Za-z0-9]{20,}$","description":"Unique identifier for this delivery attempt"},"webhook_id":{"type":"string","pattern":"^whk_[A-Za-z0-9]{20,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"event":{"type":"string","description":"Event name per enums/webhook_event.yaml."},"status":{"description":"Current status of this resource","type":"string","enum":["pending","success","retry","failed","dlq"]},"attempt":{"type":"integer","minimum":1,"description":"Current attempt number (for retries)"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"latency_ms":{"type":["integer","null"],"minimum":0,"description":"Latency of the operation in milliseconds"},"response_body_truncated":{"type":["string","null"],"maxLength":4096,"description":"Truncated response body from the webhook delivery attempt"},"error":{"type":["string","null"],"description":"Error message if the operation failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"completed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution completed"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/webhooks/deliveries/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/webhooks/deliveries/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.webhooks.get","module":"account-billing","namespace":"account","action":"webhooks.get","method":"GET","path":"/v1/account/webhooks/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get details for a single webhook.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/Webhook.json","response":{"title":"Webhook","description":"Account-level webhook subscription. Returned by account.webhooks.register / .list / .get / .update. get/update return only {webhook_id, status:'not_found'} when the referenced webhook_id doesn't resolve on this account, and update never returns created_at — so only webhook_id is universally required.","type":"object","required":["webhook_id"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","pattern":"^whk?_[A-Za-z0-9]{16,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"url":{"type":"string","format":"uri","description":"URL for this resource or endpoint"},"events":{"type":"array","items":{"type":"string"},"description":"Event names per enums/webhook_event.yaml."},"description":{"type":["string","null"],"description":"Free-text description of this resource"},"secret":{"type":["string","null"],"description":"Plaintext secret — returned only on initial create."},"secret_hash":{"type":["string","null"],"description":"SHA-256 hex of secret; returned on list/get."},"active":{"type":"boolean","description":"Whether deliveries are sent. Canonical state field."},"enabled":{"type":["boolean","null"],"description":"Back-compat alias of `active` (console reads this)."},"status":{"type":["string","null"],"description":"account_resource lifecycle status (e.g. 'active')."},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers added to every delivery."},"last_delivery_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last delivery attempt"},"last_delivery_status":{"type":["string","null"],"enum":["success","failed",null],"description":"Status of the last delivery attempt"},"failure_count_24h":{"type":"integer","minimum":0,"description":"Number of failed deliveries in the last 24 hours"},"auto_disabled_at":{"type":["string","null"],"format":"date-time","description":"Set when 100 consecutive failures triggered auto-disable."},"created_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was created. Absent on account.webhooks.update (patch response echoes updated_at only)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated. Returned by .get/.update; absent on .register/.list."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/webhooks/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/webhooks/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/webhooks/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/webhooks/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/webhooks/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.webhooks.list","module":"account-billing","namespace":"account","action":"webhooks.list","method":"GET","path":"/v1/account/webhooks/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List registered webhooks with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/WebhookList.json","response":{"title":"WebhookList","description":"Paginated result for account.webhooks.list. See REVIEW Account §3.E.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"Webhook","description":"Account-level webhook subscription. Returned by account.webhooks.register / .list / .get / .update. get/update return only {webhook_id, status:'not_found'} when the referenced webhook_id doesn't resolve on this account, and update never returns created_at — so only webhook_id is universally required.","type":"object","required":["webhook_id"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","pattern":"^whk?_[A-Za-z0-9]{16,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"url":{"type":"string","format":"uri","description":"URL for this resource or endpoint"},"events":{"type":"array","items":{"type":"string"},"description":"Event names per enums/webhook_event.yaml."},"description":{"type":["string","null"],"description":"Free-text description of this resource"},"secret":{"type":["string","null"],"description":"Plaintext secret — returned only on initial create."},"secret_hash":{"type":["string","null"],"description":"SHA-256 hex of secret; returned on list/get."},"active":{"type":"boolean","description":"Whether deliveries are sent. Canonical state field."},"enabled":{"type":["boolean","null"],"description":"Back-compat alias of `active` (console reads this)."},"status":{"type":["string","null"],"description":"account_resource lifecycle status (e.g. 'active')."},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers added to every delivery."},"last_delivery_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last delivery attempt"},"last_delivery_status":{"type":["string","null"],"enum":["success","failed",null],"description":"Status of the last delivery attempt"},"failure_count_24h":{"type":"integer","minimum":0,"description":"Number of failed deliveries in the last 24 hours"},"auto_disabled_at":{"type":["string","null"],"format":"date-time","description":"Set when 100 consecutive failures triggered auto-disable."},"created_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was created. Absent on account.webhooks.update (patch response echoes updated_at only)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated. Returned by .get/.update; absent on .register/.list."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/webhooks/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/webhooks/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/webhooks/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/webhooks/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/webhooks/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"account.webhooks.register","module":"account-billing","namespace":"account","action":"webhooks.register","method":"POST","path":"/v1/account/webhooks/register","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Register a webhook (public HTTPS, SSRF-validated); the signing secret is returned only once.","request_schema_ref":"account-billing/WebhookRegisterRequest.json","params":{"title":"WebhookRegisterRequest","description":"Request shape for account.webhooks.register. url MUST be a public https endpoint — the server runs an SSRF check and rejects private/loopback ranges. Returns a Webhook (secret returned once). See REVIEW Account §3.E.","type":"object","required":["url","events"],"additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","description":"URL for this resource or endpoint"},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["account.created","account.updated","account.absorbed","account.device_linked","account.deleted","topup.succeeded","topup.failed","topup.review_started","autorecharge.charged","autorecharge.failed","subscription.activated","subscription.renewed","subscription.cancelled","kyc.status_changed","tier.upgraded","tier.downgraded","wallet.low_balance","wallet.expiring_soon","wallet.expired","email.queued","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.complained","email.deferred","email.cancelled","email.unsubscribed","email.auto_suppressed","sms.queued","sms.sent","sms.delivered","sms.failed","sms.inbound","image.job.completed","image.job.failed","video.job.completed","video.job.failed","ai.batch.completed","ai.batch.failed","captcha.verified","captcha.failed","realtime.channel.occupied","realtime.channel.vacated","realtime.member.added","realtime.member.removed","cron.executed","cron.failed","cron.missed","queue.dlq","observability.alert.fired","error.captured","error.rate_anomaly","system.vendor.down","system.maintenance.scheduled"],"description":"THE single global catalog of webhook events. Per SDK Conventions §10, Infrai"},"description":"Event types to subscribe this webhook to; the closed set is the global event catalog."},"description":{"type":["string","null"],"maxLength":256,"description":"Free-text description of this resource"},"secret":{"type":["string","null"],"description":"Optional caller-provided signing secret; auto-generated when null."},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers added to every delivery."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/Webhook.json","response":{"title":"Webhook","description":"Account-level webhook subscription. Returned by account.webhooks.register / .list / .get / .update. get/update return only {webhook_id, status:'not_found'} when the referenced webhook_id doesn't resolve on this account, and update never returns created_at — so only webhook_id is universally required.","type":"object","required":["webhook_id"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","pattern":"^whk?_[A-Za-z0-9]{16,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"url":{"type":"string","format":"uri","description":"URL for this resource or endpoint"},"events":{"type":"array","items":{"type":"string"},"description":"Event names per enums/webhook_event.yaml."},"description":{"type":["string","null"],"description":"Free-text description of this resource"},"secret":{"type":["string","null"],"description":"Plaintext secret — returned only on initial create."},"secret_hash":{"type":["string","null"],"description":"SHA-256 hex of secret; returned on list/get."},"active":{"type":"boolean","description":"Whether deliveries are sent. Canonical state field."},"enabled":{"type":["boolean","null"],"description":"Back-compat alias of `active` (console reads this)."},"status":{"type":["string","null"],"description":"account_resource lifecycle status (e.g. 'active')."},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers added to every delivery."},"last_delivery_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last delivery attempt"},"last_delivery_status":{"type":["string","null"],"enum":["success","failed",null],"description":"Status of the last delivery attempt"},"failure_count_24h":{"type":"integer","minimum":0,"description":"Number of failed deliveries in the last 24 hours"},"auto_disabled_at":{"type":["string","null"],"format":"date-time","description":"Set when 100 consecutive failures triggered auto-disable."},"created_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was created. Absent on account.webhooks.update (patch response echoes updated_at only)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated. Returned by .get/.update; absent on .register/.list."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/webhooks/register \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/webhooks/register\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'url': 'https://example.com/callback', 'events': ['account.created']},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/register\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/register\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/webhooks/register\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/register\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"url\\\": \\\"https://example.com/callback\\\", \\\"events\\\": [\\\"account.created\\\"]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/webhooks/register\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"url\\\": \\\"https://example.com/callback\\\", \\\"events\\\": [\\\"account.created\\\"]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/register\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"url\\\": \\\"https://example.com/callback\\\", \\\"events\\\": [\\\"account.created\\\"]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/register\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/webhooks/register\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"url\": \"https://example.com/callback\", \"events\": [\"account.created\"]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"url":"https://example.com/callback","events":["account.created"]}}},{"id":"account.webhooks.test","module":"account-billing","namespace":"account","action":"webhooks.test","method":"POST","path":"/v1/account/webhooks/test/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Send a test event to a webhook to verify connectivity.","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/WebhookTestResult.json","response":{"title":"WebhookTestResult","description":"Returned by account.webhook.test(webhook_id, event) — fires a synthetic event to verify endpoint connectivity + signature handling. See docs/Infrai_SDK_Account_Billing.md §9.1.","type":"object","required":["webhook_id","event","delivered","tested_at"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","pattern":"^whk_[A-Za-z0-9]{20,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"event":{"type":"string","description":"Event name fired in the test (e.g. 'topup.succeeded')."},"delivered":{"type":"boolean","description":"Whether the webhook delivery succeeded"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"latency_ms":{"type":["integer","null"],"minimum":0,"description":"Latency of the operation in milliseconds"},"error":{"type":["string","null"],"description":"Error message if the operation failed"},"delivery_id":{"type":["string","null"],"pattern":"^dlv_[A-Za-z0-9]{20,}$","description":"Unique identifier for this delivery attempt"},"tested_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the test was executed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/account/webhooks/test/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/account/webhooks/test/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/test/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/test/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/account/webhooks/test/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/test/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/account/webhooks/test/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/test/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/test/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/account/webhooks/test/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.webhooks.update","module":"account-billing","namespace":"account","action":"webhooks.update","method":"PATCH","path":"/v1/account/webhooks/update/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Partially update a webhook; changing the URL re-runs SSRF validation.","request_schema_ref":"account-billing/WebhookUpdateRequest.json","params":{"title":"WebhookUpdateRequest","description":"Request shape for account.webhooks.update — partial update of an existing Webhook. url change re-runs the SSRF check. Returns the updated Webhook. See REVIEW Account §3.E.","type":"object","additionalProperties":false,"properties":{"url":{"type":["string","null"],"format":"uri","description":"URL for this resource or endpoint"},"events":{"type":["array","null"],"minItems":1,"items":{"type":"string","enum":["account.created","account.updated","account.absorbed","account.device_linked","account.deleted","topup.succeeded","topup.failed","topup.review_started","autorecharge.charged","autorecharge.failed","subscription.activated","subscription.renewed","subscription.cancelled","kyc.status_changed","tier.upgraded","tier.downgraded","wallet.low_balance","wallet.expiring_soon","wallet.expired","email.queued","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.complained","email.deferred","email.cancelled","email.unsubscribed","email.auto_suppressed","sms.queued","sms.sent","sms.delivered","sms.failed","sms.inbound","image.job.completed","image.job.failed","video.job.completed","video.job.failed","ai.batch.completed","ai.batch.failed","captcha.verified","captcha.failed","realtime.channel.occupied","realtime.channel.vacated","realtime.member.added","realtime.member.removed","cron.executed","cron.failed","cron.missed","queue.dlq","observability.alert.fired","error.captured","error.rate_anomaly","system.vendor.down","system.maintenance.scheduled"],"description":"THE single global catalog of webhook events. Per SDK Conventions §10, Infrai"},"description":"List of event types this subscription listens to"},"description":{"type":["string","null"],"maxLength":256,"description":"Free-text description of this resource"},"active":{"type":["boolean","null"],"description":"Whether this resource is currently active"},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"account-billing/Webhook.json","response":{"title":"Webhook","description":"Account-level webhook subscription. Returned by account.webhooks.register / .list / .get / .update. get/update return only {webhook_id, status:'not_found'} when the referenced webhook_id doesn't resolve on this account, and update never returns created_at — so only webhook_id is universally required.","type":"object","required":["webhook_id"],"additionalProperties":false,"properties":{"webhook_id":{"type":"string","pattern":"^whk?_[A-Za-z0-9]{16,}$","description":"Webhook subscription id (whk_… in the account_resource store)."},"url":{"type":"string","format":"uri","description":"URL for this resource or endpoint"},"events":{"type":"array","items":{"type":"string"},"description":"Event names per enums/webhook_event.yaml."},"description":{"type":["string","null"],"description":"Free-text description of this resource"},"secret":{"type":["string","null"],"description":"Plaintext secret — returned only on initial create."},"secret_hash":{"type":["string","null"],"description":"SHA-256 hex of secret; returned on list/get."},"active":{"type":"boolean","description":"Whether deliveries are sent. Canonical state field."},"enabled":{"type":["boolean","null"],"description":"Back-compat alias of `active` (console reads this)."},"status":{"type":["string","null"],"description":"account_resource lifecycle status (e.g. 'active')."},"retry_policy":{"type":["string","null"],"enum":["default","aggressive",null],"description":"Retry policy configuration"},"headers":{"type":["object","null"],"description":"Custom HTTP headers added to every delivery."},"last_delivery_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last delivery attempt"},"last_delivery_status":{"type":["string","null"],"enum":["success","failed",null],"description":"Status of the last delivery attempt"},"failure_count_24h":{"type":"integer","minimum":0,"description":"Number of failed deliveries in the last 24 hours"},"auto_disabled_at":{"type":["string","null"],"format":"date-time","description":"Set when 100 consecutive failures triggered auto-disable."},"created_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was created. Absent on account.webhooks.update (patch response echoes updated_at only)."},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated. Returned by .get/.update; absent on .register/.list."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/account/webhooks/update/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/account/webhooks/update/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/webhooks/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/account/webhooks/update/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/webhooks/update/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/account/webhooks/update/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/webhooks/update/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/webhooks/update/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/account/webhooks/update/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"account.whoami","module":"account-billing","namespace":"account","action":"whoami","method":"GET","path":"/v1/account/whoami","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get an account summary (ID, type, status, tier, balance).","request_schema_ref":null,"params":{},"response_schema_ref":"account-billing/WhoamiInfo.json","response":{"title":"WhoamiInfo","description":"Returned by account.whoami(). See docs/Infrai_SDK_Account_Billing.md §1.5.","type":"object","required":["account_id","account_kind","email_verified","region","tier","kyc_status","totp_enabled","device_fingerprint","current_project_key_id","project_count","absorbed_anon_account_ids","linked_devices_count"],"additionalProperties":false,"properties":{"account_id":{"type":"string","pattern":"^acct_(anon|email|unbound)_[A-Za-z0-9]{12,}$","description":"Real ids use a 16-hex device/email suffix (e.g. acct_anon_9424f4c4b31d4908); pattern relaxed to minimum 12 to match the live id format."},"account_kind":{"enum":["anonymous","email","unbound"],"description":"Identity state of the key holder. `unbound` = key minted by infra.activate() not yet linked to an email; `email` = bound via OTP/Google/GitHub. `anonymous` is a legacy alias for `unbound` (will be retired)."},"email":{"type":["string","null"],"format":"email","description":"Email address"},"email_verified":{"type":"boolean","description":"Whether the email address has been verified"},"linked_providers":{"type":"array","items":{"enum":["email_otp","google","github","oauth"]},"description":"Identity providers that have verified this email. The same email can be linked via multiple methods (Google + GitHub + OTP) and all resolve to one account. Empty for unbound keys."},"display_name":{"type":["string","null"],"description":"Human-readable display name"},"region":{"enum":["global","cn"],"description":"Geographic region where this resource is located or processed"},"created_at":{"type":["string","null"],"format":"date-time","description":"User-row creation time. Null for unbound keys (no User row yet)."},"last_active_at":{"type":["string","null"],"format":"date-time","description":"Latest of last_login_at / updated_at on the User row. Null for unbound keys."},"tier":{"enum":["standard","pro","enterprise"],"description":"Current subscription tier (standard / pro / enterprise)"},"kyc_status":{"enum":["none","pending","approved","rejected"],"description":"Current KYC verification status"},"totp_enabled":{"type":"boolean","description":"Whether TOTP-based 2FA is enabled for this account"},"pro_subscription":{"type":["object","null"],"description":"Details of the active Pro subscription, if any"},"enterprise_contract":{"type":["object","null"],"description":"Details of the enterprise contract, if any"},"device_fingerprint":{"type":"string","description":"Device fingerprint hash for identity tracking"},"current_project_key_id":{"type":"string","description":"Current project key identifier"},"project_count":{"type":"integer","minimum":0,"description":"Number of projects in this account"},"absorbed_anon_account_ids":{"type":"array","items":{"type":"string"},"description":"List of anonymous account IDs absorbed during linking"},"linked_devices_count":{"type":"integer","minimum":0,"description":"Number of linked device accounts"},"project_id":{"type":["string","null"],"description":"The project_id the caller's bearer key is bound to. Mirrors api_key.project_id (e.g. `proj_anon_xxx` for an unbound key). Null when the bearer has no project."},"key_id":{"type":["string","null"],"description":"Masked (non-secret) form of the caller's bearer key — same value as `current_project_key_id`. Kept for compatibility with the original `account.whoami` shape; new callers should read `current_project_key_id`."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ACCOUNT_TOPUP_TOO_FREQUENT","ANON_ACCOUNT_NOT_FOUND","ANON_HAS_PAID_CREDIT","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DEVICE_ALREADY_LINKED","DEVICE_TOKEN_INVALID","DEVICE_TOKEN_REUSED","EMAIL_ALREADY_HAS_ACCOUNT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","KYC_REQUIRED","MAINTENANCE","MANUAL_REVIEW_REQUIRED","NETWORK_ERROR","PAYMENT_METHOD_EXPIRED","PAYMENT_METHOD_INVALID","PROJECT_KEY_LIMIT_REACHED","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","TAKEOVER_RACE","TOPUP_2FA_REQUIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_TIMEOUT","WALLET_CAP_EXCEEDED","WALLET_CREDIT_FAILED","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/account/whoami \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/account/whoami\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/whoami\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/account/whoami\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/account/whoami\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/account/whoami\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/account/whoami\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/account/whoami\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/account/whoami\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/account/whoami\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"ai.batch.cancel","module":"ai-runtime","namespace":"ai","action":"batch.cancel","method":"POST","path":"/v1/ai/batch/cancel/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Cancel an in-progress batch job (idempotent).","request_schema_ref":"ai-runtime/BatchCancelRequest.json","params":{"title":"BatchCancelRequest","description":"Request shape for ai.batch.cancel — cancel a batch job. Returns batch_id + state.","type":"object","required":["batch_id"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","description":"Id of the batch job to cancel."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"ai-runtime/BatchStatus.json","response":{"title":"BatchStatus","description":"Returned by ai.chat.batch_status / ai.embed.batch_status. See docs/Infrai_SDK_AI_Runtime.md §2.2.2.","type":"object","required":["batch_id","state","progress","total_count","completed_count","failed_count","created_at"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Unique identifier for this batch job"},"state":{"enum":["connecting","queued","in_progress","partial","completed","failed","expired","cancelled"],"description":"Current lifecycle state of this resource"},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress of the async operation (0.0 to 1.0)"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"completed_count":{"type":"integer","minimum":0,"description":"Number of completed items in the batch"},"failed_count":{"type":"integer","minimum":0,"description":"Number of failed items in the batch"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"estimated_completion_at":{"type":["string","null"],"format":"date-time","description":"Estimated ISO 8601 timestamp when the batch will complete"},"actual_completion_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the batch actually completed"},"total_cost_usd":{"type":["number","null"],"minimum":0,"description":"Total cost of the batch in USD"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/batch/cancel/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"batch_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/batch/cancel/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'batch_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"batch_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"batch_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"batch_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/batch/cancel/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/cancel/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"batch_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/batch/cancel/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"batch_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/cancel/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"batch_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/cancel/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"batch_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/batch/cancel/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"batch_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"batch_id":"sample"}}},{"id":"ai.batch.export","module":"ai-runtime","namespace":"ai","action":"batch.export","method":"POST","path":"/v1/ai/batch/export/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Export batch results to a JSONL or CSV file and return a download job.","request_schema_ref":"ai-runtime/ExportRequest.json","params":{"title":"ExportRequest","description":"Request shape for ai.batch.export / ai.chat.history.export. Kicks off an async export of the addressed resource. See docs/Infrai_SDK_AI_Runtime.md §2.3.","type":"object","additionalProperties":false,"properties":{"batch_id":{"type":["string","null"],"pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Target batch for ai.batch.export."},"conversation_id":{"type":["string","null"],"description":"Target conversation for ai.chat.history.export; null = all history."},"format":{"enum":["jsonl","csv"],"default":"jsonl","description":"Output or input format (e.g. json, csv, png)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"ai-runtime/ExportJob.json","response":{"title":"ExportJob","description":"Async export job descriptor returned by ai.batch.export / ai.chat.history.export. Poll status with the matching export_status capability. See docs/Infrai_SDK_AI_Runtime.md §2.3.","type":"object","required":["export_id","state","created_at"],"additionalProperties":false,"properties":{"export_id":{"type":"string","pattern":"^exp_[A-Za-z0-9]{20,}$","description":"Unique identifier for this export job"},"state":{"enum":["queued","in_progress","completed","failed","expired"],"description":"Current lifecycle state of this resource"},"format":{"enum":["jsonl","csv"],"default":"jsonl","description":"Output or input format (e.g. json, csv, png)"},"download_url":{"type":["string","null"],"format":"uri","description":"Populated when state=completed."},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"error":{"oneOf":[{"title":"ErrorInfo","description":"Machine + human readable error. `code` MUST come from errors/registry.yaml.","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},{"type":"null"}],"description":"Error message if the operation failed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/batch/export/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/batch/export/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/export/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/export/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/batch/export/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/export/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/batch/export/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/export/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/export/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/batch/export/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"ai.batch.list","module":"ai-runtime","namespace":"ai","action":"batch.list","method":"GET","path":"/v1/ai/batch/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"List all batch jobs on the account with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/BatchListResult.json","response":{"title":"BatchListResult","description":"Cursor-paginated result for ai.batch.list (the account's batch jobs). See docs/Infrai_SDK_AI_Runtime.md §2.2.5.","type":"object","required":["batches","total_count"],"additionalProperties":false,"properties":{"batches":{"type":"array","items":{"title":"BatchStatus","description":"Returned by ai.chat.batch_status / ai.embed.batch_status. See docs/Infrai_SDK_AI_Runtime.md §2.2.2.","type":"object","required":["batch_id","state","progress","total_count","completed_count","failed_count","created_at"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Unique identifier for this batch job"},"state":{"enum":["connecting","queued","in_progress","partial","completed","failed","expired","cancelled"],"description":"Current lifecycle state of this resource"},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress of the async operation (0.0 to 1.0)"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"completed_count":{"type":"integer","minimum":0,"description":"Number of completed items in the batch"},"failed_count":{"type":"integer","minimum":0,"description":"Number of failed items in the batch"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"estimated_completion_at":{"type":["string","null"],"format":"date-time","description":"Estimated ISO 8601 timestamp when the batch will complete"},"actual_completion_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the batch actually completed"},"total_cost_usd":{"type":["number","null"],"minimum":0,"description":"Total cost of the batch in USD"}}},"description":"List of batch summary objects"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"next_cursor":{"type":["string","null"],"description":"Pass back into list() to fetch the next page. null = end."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/ai/batch/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/ai/batch/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/ai/batch/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/ai/batch/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/ai/batch/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"ai.batch.results","module":"ai-runtime","namespace":"ai","action":"batch.results","method":"GET","path":"/v1/ai/batch/results/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Fetch per-item results of a batch job with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/BatchResultsPage.json","response":{"title":"BatchResultsPage","description":"Cursor-paginated page of batch result rows for ai.batch.results. For very large batches, download_url carries a bulk reference instead of inlining every item. See docs/Infrai_SDK_AI_Runtime.md §2.2.3.","type":"object","required":["items","total_count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"BatchResultItem","description":"One result row within a completed batch. See docs/Infrai_SDK_AI_Runtime.md §2.2.3.","type":"object","required":["request_index","ok"],"additionalProperties":false,"properties":{"request_index":{"type":"integer","minimum":0,"description":"Index in the original requests array."},"ok":{"type":"boolean","description":"Whether the operation succeeded"},"result":{"description":"Capability result (ChatResult / EmbeddingResult) when ok=true."},"error":{"oneOf":[{"title":"ErrorInfo","description":"Machine + human readable error. `code` MUST come from errors/registry.yaml.","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},{"type":"null"}],"description":"Error message if the operation failed"}}},"description":"Array of result items in this page"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"next_cursor":{"type":["string","null"],"description":"Pass back into results() to fetch the next page. null = end."},"download_url":{"type":["string","null"],"format":"uri","description":"Bulk download reference for large result sets (JSONL); null when results are inlined."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/ai/batch/results/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/ai/batch/results/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/results/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/results/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/ai/batch/results/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/results/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/ai/batch/results/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/results/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/results/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/ai/batch/results/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"ai.batch.status","module":"ai-runtime","namespace":"ai","action":"batch.status","method":"GET","path":"/v1/ai/batch/status/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Get a batch job's status, progress, and completed/failed counts.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/BatchStatus.json","response":{"title":"BatchStatus","description":"Returned by ai.chat.batch_status / ai.embed.batch_status. See docs/Infrai_SDK_AI_Runtime.md §2.2.2.","type":"object","required":["batch_id","state","progress","total_count","completed_count","failed_count","created_at"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Unique identifier for this batch job"},"state":{"enum":["connecting","queued","in_progress","partial","completed","failed","expired","cancelled"],"description":"Current lifecycle state of this resource"},"progress":{"type":"number","minimum":0,"maximum":1,"description":"Progress of the async operation (0.0 to 1.0)"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"completed_count":{"type":"integer","minimum":0,"description":"Number of completed items in the batch"},"failed_count":{"type":"integer","minimum":0,"description":"Number of failed items in the batch"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"estimated_completion_at":{"type":["string","null"],"format":"date-time","description":"Estimated ISO 8601 timestamp when the batch will complete"},"actual_completion_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the batch actually completed"},"total_cost_usd":{"type":["number","null"],"minimum":0,"description":"Total cost of the batch in USD"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/ai/batch/status/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/ai/batch/status/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/ai/batch/status/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/status/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/ai/batch/status/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/status/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/status/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/ai/batch/status/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"ai.batch.submit","module":"ai-runtime","namespace":"ai","action":"batch.submit","method":"POST","path":"/v1/ai/batch/submit","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Submit a batch of AI requests as one async batch job (billed at cost pass-through with no markup).","request_schema_ref":"ai-runtime/BatchSubmitRequest.json","params":{"title":"BatchSubmitRequest","description":"Request shape for ai.chat.batch_submit / ai.embed.batch_submit. requests is an array of individual capability requests. See docs/Infrai_SDK_AI_Runtime.md §2.2.1.","type":"object","required":["requests"],"additionalProperties":false,"properties":{"requests":{"type":"array","minItems":1,"items":{"type":"object"},"description":"Each item is a ChatRequest / EmbeddingRequest payload."},"batch_timeout":{"type":"string","default":"24h","examples":["1h","24h"],"description":"Maximum wall-clock the batch may run before expiring."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"ai-runtime/BatchSubmitResult.json","response":{"title":"BatchSubmitResult","description":"Returned by batch_submit; non-blocking ack with estimated ETA + cost. See docs/Infrai_SDK_AI_Runtime.md §2.2.1.","type":"object","required":["batch_id","state","total_count"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Unique identifier for this batch job"},"state":{"enum":["connecting","queued","in_progress","completed","failed","expired","cancelled"],"description":"Current lifecycle state of this resource"},"total_count":{"type":"integer","minimum":1,"description":"Total number of items across all pages"},"estimated_eta":{"type":["string","null"],"format":"date-time","description":"Estimated time remaining for batch completion"},"estimated_cost_usd":{"type":["number","null"],"minimum":0,"description":"Estimated total cost for the batch in USD"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/batch/submit \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"requests\": [{}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/batch/submit\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'requests': [{}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/submit\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"requests\": [{}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/batch/submit\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"requests\": [{}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"requests\": [{}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/batch/submit\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/batch/submit\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"requests\\\": [{}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/batch/submit\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"requests\\\": [{}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/batch/submit\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"requests\\\": [{}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/batch/submit\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"requests\": [{}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/batch/submit\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"requests\": [{}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"requests":[{}]}}},{"id":"ai.cost.compare","module":"ai-runtime","namespace":"ai","action":"cost.compare","method":"POST","path":"/v1/ai/cost/compare","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Estimate and compare the cost of the same request across multiple models.","request_schema_ref":"ai-runtime/CostEstimateRequest.json","params":{"title":"CostEstimateRequest","description":"Request shape for ai.cost.estimate (single model) and ai.cost.compare (models[] for multi-model comparison). Unknown model_id MUST raise MODEL_NOT_FOUND (no silent fallback). See docs/Infrai_SDK_AI_Runtime.md §1.6.","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"items":{"title":"ChatMessage","type":"object","required":["role"],"additionalProperties":false,"properties":{"role":{"enum":["system","user","assistant","tool"],"description":"Role of the message author (system, user, assistant, tool)"},"content":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"null"}],"description":"DNS record value/content"},"name":{"type":"string","description":"Human-readable name for this resource"},"tool_calls":{"type":"array","items":{"title":"ToolCall","type":"object","required":["id","type","function"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for this resource"},"type":{"const":"function","description":"Type discriminator for this resource"},"function":{"type":"object","required":["name","arguments"],"additionalProperties":false,"properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded string."}},"description":"Function definition for tool calling"}}},"description":"Tool/function calls requested by the model"},"tool_call_id":{"type":"string","description":"Present when role='tool'."}}},"description":"Chat messages to price (same shape as ai.chat); cost is estimated from their token count."},"model":{"type":["string","null"],"default":"openai/gpt-4o","description":"Single model to estimate. Used by ai.cost.estimate. Explicit model_id is allowed here (selection semantics)."},"models":{"type":["array","null"],"items":{"type":"string"},"description":"Models to compare. Used by ai.cost.compare; result is sorted ascending by final cost."},"expected_output_tokens":{"type":"integer","minimum":0,"default":500,"description":"Assumed completion length for the estimate."},"cache_strategy":{"enum":["vendor","infrai","none"],"default":"vendor","description":"Cache strategy hint (none, exact, semantic)"},"batch_mode":{"type":"boolean","default":false,"description":"When true, applies the 50% batch discount to the estimate."},"tools":{"type":["array","null"],"items":{"type":"object"},"description":"Tool/function definitions for the model to call"}}},"response_schema_ref":"ai-runtime/CostEstimateList.json","response":{"title":"CostEstimateList","description":"Result payload for ai.cost.compare: an array of per-model CostEstimate objects, sorted ascending by breakdown.final. (ai.cost.estimate returns a single CostEstimate; ai.cost.compare returns this array.) See docs/Infrai_SDK_AI_Runtime.md §1.6.","type":"array","items":{"title":"CostEstimate","description":"Pre-send cost estimate for one model. ai.cost.estimate returns one; ai.cost.compare returns an array sorted ascending by breakdown.final. See docs/Infrai_SDK_AI_Runtime.md §1.6.","type":"object","required":["model","vendor","prompt_tokens","expected_output_tokens","breakdown"],"additionalProperties":false,"properties":{"model":{"type":"string","description":"Resolved model_id this estimate is for."},"vendor":{"type":"string","description":"Vendor that would serve the request."},"vendor_region":{"enum":["china","western"],"description":"Region of the serving vendor (drives markup)."},"prompt_tokens":{"type":"integer","minimum":0,"description":"Number of tokens in the prompt"},"expected_output_tokens":{"type":"integer","minimum":0,"description":"Estimated number of output tokens"},"breakdown":{"description":"Cost breakdown by component","title":"CostBreakdown","type":"object","required":["final","currency"],"additionalProperties":false,"properties":{"currency":{"enum":["USD","CNY"],"description":"ISO 4217 currency code (e.g. USD, CNY)"},"input_cost":{"type":"number","minimum":0,"description":"Input token cost in USD"},"output_cost":{"type":"number","minimum":0,"description":"Output token cost in USD"},"markup":{"type":"number","minimum":0,"description":"Markup applied on top of vendor cost"},"cache_discount":{"type":"number","minimum":0,"description":"Discount from cache hits in USD"},"batch_discount":{"type":"number","minimum":0,"description":"Discount for batch processing in USD"},"failover_adjustment":{"type":"number","description":"Cost adjustment due to vendor failover"},"final":{"type":"number","minimum":0,"description":"Final cost after all adjustments in USD"}}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/cost/compare \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"role\": \"system\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/cost/compare\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'role': 'system'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/cost/compare\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/cost/compare\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"role\": \"system\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/cost/compare\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/cost/compare\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/cost/compare\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/cost/compare\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/cost/compare\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"role\": \"system\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/cost/compare\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"role\": \"system\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"role":"system"}]}}},{"id":"ai.cost.estimate","module":"ai-runtime","namespace":"ai","action":"cost.estimate","method":"POST","path":"/v1/ai/cost/estimate","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Estimate token counts and itemized cost for an AI request before calling it.","request_schema_ref":"ai-runtime/CostEstimateRequest.json","params":{"title":"CostEstimateRequest","description":"Request shape for ai.cost.estimate (single model) and ai.cost.compare (models[] for multi-model comparison). Unknown model_id MUST raise MODEL_NOT_FOUND (no silent fallback). See docs/Infrai_SDK_AI_Runtime.md §1.6.","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"items":{"title":"ChatMessage","type":"object","required":["role"],"additionalProperties":false,"properties":{"role":{"enum":["system","user","assistant","tool"],"description":"Role of the message author (system, user, assistant, tool)"},"content":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"null"}],"description":"DNS record value/content"},"name":{"type":"string","description":"Human-readable name for this resource"},"tool_calls":{"type":"array","items":{"title":"ToolCall","type":"object","required":["id","type","function"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for this resource"},"type":{"const":"function","description":"Type discriminator for this resource"},"function":{"type":"object","required":["name","arguments"],"additionalProperties":false,"properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded string."}},"description":"Function definition for tool calling"}}},"description":"Tool/function calls requested by the model"},"tool_call_id":{"type":"string","description":"Present when role='tool'."}}},"description":"Chat messages to price (same shape as ai.chat); cost is estimated from their token count."},"model":{"type":["string","null"],"default":"openai/gpt-4o","description":"Single model to estimate. Used by ai.cost.estimate. Explicit model_id is allowed here (selection semantics)."},"models":{"type":["array","null"],"items":{"type":"string"},"description":"Models to compare. Used by ai.cost.compare; result is sorted ascending by final cost."},"expected_output_tokens":{"type":"integer","minimum":0,"default":500,"description":"Assumed completion length for the estimate."},"cache_strategy":{"enum":["vendor","infrai","none"],"default":"vendor","description":"Cache strategy hint (none, exact, semantic)"},"batch_mode":{"type":"boolean","default":false,"description":"When true, applies the 50% batch discount to the estimate."},"tools":{"type":["array","null"],"items":{"type":"object"},"description":"Tool/function definitions for the model to call"}}},"response_schema_ref":"ai-runtime/CostEstimate.json","response":{"title":"CostEstimate","description":"Pre-send cost estimate for one model. ai.cost.estimate returns one; ai.cost.compare returns an array sorted ascending by breakdown.final. See docs/Infrai_SDK_AI_Runtime.md §1.6.","type":"object","required":["model","vendor","prompt_tokens","expected_output_tokens","breakdown"],"additionalProperties":false,"properties":{"model":{"type":"string","description":"Resolved model_id this estimate is for."},"vendor":{"type":"string","description":"Vendor that would serve the request."},"vendor_region":{"enum":["china","western"],"description":"Region of the serving vendor (drives markup)."},"prompt_tokens":{"type":"integer","minimum":0,"description":"Number of tokens in the prompt"},"expected_output_tokens":{"type":"integer","minimum":0,"description":"Estimated number of output tokens"},"breakdown":{"description":"Cost breakdown by component","title":"CostBreakdown","type":"object","required":["final","currency"],"additionalProperties":false,"properties":{"currency":{"enum":["USD","CNY"],"description":"ISO 4217 currency code (e.g. USD, CNY)"},"input_cost":{"type":"number","minimum":0,"description":"Input token cost in USD"},"output_cost":{"type":"number","minimum":0,"description":"Output token cost in USD"},"markup":{"type":"number","minimum":0,"description":"Markup applied on top of vendor cost"},"cache_discount":{"type":"number","minimum":0,"description":"Discount from cache hits in USD"},"batch_discount":{"type":"number","minimum":0,"description":"Discount for batch processing in USD"},"failover_adjustment":{"type":"number","description":"Cost adjustment due to vendor failover"},"final":{"type":"number","minimum":0,"description":"Final cost after all adjustments in USD"}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/cost/estimate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"role\": \"system\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/cost/estimate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'role': 'system'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/cost/estimate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/cost/estimate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"role\": \"system\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/cost/estimate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/cost/estimate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/cost/estimate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/cost/estimate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/cost/estimate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"role\": \"system\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/cost/estimate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"role\": \"system\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"role":"system"}]}}},{"id":"ai.image.upscale","module":"ai-runtime","namespace":"ai","action":"image.upscale","method":"POST","path":"/v1/ai/image/upscale","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Upscale an image losslessly by 2x or 4x with an AI model (idempotent). To transform an EXISTING image otherwise use the image.* module.","request_schema_ref":"ai-runtime/ImageUpscaleRequest.json","params":{"title":"ImageUpscaleRequest","description":"Request shape for ai.image.upscale. See docs/Infrai_SDK_AI_Runtime.md §3.4.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"type":"string","description":"URL / file path / base64 of the source image.","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="},"factor":{"enum":[2,4],"default":2,"description":"Upscale factor (e.g. 2 or 4)"},"model":{"type":["string","null"],"description":"Model identifier to use for generation"},"vendor":{"type":["string","null"],"description":"Vendor that handled or will handle this request"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":600,"default":120,"description":"Maximum execution time in seconds"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"ai-runtime/ImageUpscaleResult.json","response":{"title":"ImageUpscaleResult","description":"Result payload for ai.image.upscale. The upscale is a STATELESS self-hosted (Lanczos) transform: the enlarged image is returned inline as base64 and retained NOTHING by default, so `image` carries the real bytes + true dimensions/mime rather than a stored-asset ImageItem (image_id/url are null unless store:true). See docs/Infrai_SDK_AI_Runtime.md §3.4.","type":"object","required":["image","original_size","new_size"],"additionalProperties":false,"properties":{"image":{"type":"object","title":"UpscaledImage","required":["b64_json","width","height","mime_type"],"additionalProperties":false,"properties":{"b64_json":{"type":"string","description":"Base64-encoded bytes of the upscaled image (inline; stateless passthrough)."},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1},"mime_type":{"type":"string","examples":["image/png","image/webp","image/jpeg"]},"image_id":{"type":["string","null"],"description":"Set only when the caller passed store:true; null for the default stateless transform."},"url":{"type":["string","null"],"format":"uri","description":"Infrai CDN URL when stored; null by default."}},"description":"Image data or reference for processing"},"original_size":{"type":"string","examples":["1024x1024"],"description":"Original image dimensions before transformation"},"new_size":{"type":"string","examples":["2048x2048","4096x4096"],"description":"New image dimensions after transformation"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/image/upscale \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/image/upscale\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/image/upscale\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/image/upscale\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/image/upscale\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/image/upscale\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/image/upscale\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/image/upscale\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/image/upscale\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/image/upscale\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="}}},{"id":"ai.rerank","module":"ai-runtime","namespace":"ai","action":"rerank","method":"POST","path":"/v1/ai/rerank","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Reorder a list of candidate documents by relevance to a query, returning each candidate's original index and a vendor relevance score. Real vendor dispatch: Cohere rerank, Qwen/DashScope gte-rerank. Replaces the previous original-order mock.","request_schema_ref":"ai-runtime/RerankRequest.json","params":{"title":"RerankRequest","description":"Request payload for ai.rerank — order candidate documents by relevance to a query.","type":"object","required":["query","candidates"],"additionalProperties":false,"properties":{"query":{"type":"string","minLength":1,"description":"Search query string for reranking"},"candidates":{"type":"array","minItems":1,"items":{"type":"string"},"description":"Documents to score against the query; the response returns them reordered by relevance."},"top_k":{"type":"integer","minimum":1,"default":10,"description":"Number of top results to return"},"model":{"type":"string","description":"Optional model pin (e.g. rerank-english-v3.0, gte-rerank)."},"vendor":{"enum":["cohere","jina","qwen"],"description":"Optional vendor pin."}}},"response_schema_ref":"ai-runtime/RerankResult.json","response":{"title":"RerankResult","description":"Result payload for ai.rerank. Ranked indices + relevance scores are exactly what the vendor produced (no synthetic ordering).","type":"object","required":["ranked"],"additionalProperties":false,"properties":{"ranked":{"type":"array","items":{"type":"object","required":["index","score"],"additionalProperties":false,"properties":{"index":{"type":"integer","minimum":0,"description":"Index into the original candidates list."},"score":{"type":"number","description":"Vendor relevance score (higher = more relevant)."}}},"description":"Ranked list of candidates after reranking"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/rerank \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"hello\", \"candidates\": [\"sample\"]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/rerank\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'query': 'hello', 'candidates': ['sample']},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/rerank\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"query\": \"hello\", \"candidates\": [\"sample\"]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/rerank\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"query\": \"hello\", \"candidates\": [\"sample\"]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"query\": \"hello\", \"candidates\": [\"sample\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/rerank\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/rerank\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"query\\\": \\\"hello\\\", \\\"candidates\\\": [\\\"sample\\\"]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/rerank\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"query\\\": \\\"hello\\\", \\\"candidates\\\": [\\\"sample\\\"]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/rerank\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"query\\\": \\\"hello\\\", \\\"candidates\\\": [\\\"sample\\\"]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/rerank\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"query\": \"hello\", \"candidates\": [\"sample\"]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/rerank\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"query\": \"hello\", \"candidates\": [\"sample\"]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"query":"hello","candidates":["sample"]}}},{"id":"ai.tokens.count","module":"ai-runtime","namespace":"ai","action":"tokens.count","method":"POST","path":"/v1/ai/tokens/count","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Count input tokens for a set of messages under a given model.","request_schema_ref":"ai-runtime/TokenCountRequest.json","params":{"title":"TokenCountRequest","description":"Request shape for ai.tokens.count. Counts prompt tokens (incl. tool-definition overhead) before sending. Read-only / no network. See docs/Infrai_SDK_AI_Runtime.md §1.5.","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"items":{"title":"ChatMessage","type":"object","required":["role"],"additionalProperties":false,"properties":{"role":{"enum":["system","user","assistant","tool"],"description":"Role of the message author (system, user, assistant, tool)"},"content":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"null"}],"description":"DNS record value/content"},"name":{"type":"string","description":"Human-readable name for this resource"},"tool_calls":{"type":"array","items":{"title":"ToolCall","type":"object","required":["id","type","function"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Unique identifier for this resource"},"type":{"const":"function","description":"Type discriminator for this resource"},"function":{"type":"object","required":["name","arguments"],"additionalProperties":false,"properties":{"name":{"type":"string"},"arguments":{"type":"string","description":"JSON-encoded string."}},"description":"Function definition for tool calling"}}},"description":"Tool/function calls requested by the model"},"tool_call_id":{"type":"string","description":"Present when role='tool'."}}},"description":"Chat messages to tokenize (same shape as ai.chat), including tool-definition overhead."},"model":{"type":["string","null"],"description":"Tokenizer model; null = default. Determines which encoding is used."},"tools":{"type":["array","null"],"items":{"type":"object"},"description":"Tool definitions; their serialized overhead is included in the count."}}},"response_schema_ref":"ai-runtime/TokenCountResult.json","response":{"title":"TokenCountResult","description":"Result payload for ai.tokens.count. See docs/Infrai_SDK_AI_Runtime.md §1.5.","type":"object","required":["prompt_tokens","model"],"additionalProperties":false,"properties":{"prompt_tokens":{"type":"integer","minimum":0,"description":"Total prompt tokens incl. tool-definition overhead."},"model":{"type":"string","description":"Tokenizer model the count was computed for."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/ai/tokens/count \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"role\": \"system\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/ai/tokens/count\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'role': 'system'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/tokens/count\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/tokens/count\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"role\": \"system\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"role\": \"system\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/ai/tokens/count\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/tokens/count\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/ai/tokens/count\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/tokens/count\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"role\\\": \\\"system\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/tokens/count\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"role\": \"system\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/ai/tokens/count\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"role\": \"system\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"role":"system"}]}}},{"id":"ai.tts.voices","module":"ai-runtime","namespace":"ai","action":"tts.voices","method":"GET","path":"/v1/ai/tts/voices","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"List available text-to-speech voices with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VoiceListResult.json","response":{"title":"VoiceListResult","description":"Uniform list envelope for ai.tts.voices (available TTS voices) from the currently keyed/servable TTS vendors on this deployment. Default = full cross-vendor catalog; use ?vendor= to narrow to one vendor.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object","required":["voice_id","vendor"],"additionalProperties":false,"properties":{"voice_id":{"type":"string"},"vendor":{"type":"string"},"name":{"type":["string","null"]},"model":{"type":["string","null"],"description":"The vendor model this voice should be paired with for synthesis."},"language":{"type":["string","null"],"description":"BCP-47 language tag."},"languages":{"type":["array","null"],"items":{"type":"string"},"description":"Supported languages or locales published by the vendor for this voice."},"gender":{"type":["string","null"]},"preview_url":{"type":["string","null"],"format":"uri"},"is_default":{"type":"boolean","description":"True if this is the vendor's default voice used by synthesize() when none is pinned."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Pass back into voices() to fetch the next page. null = end."},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","BATCH_REJECTED","CAPABILITY_DEGRADED_NOT_ALLOWED","CONTENT_FILTERED","CONTEXT_WINDOW_EXCEEDED","FAILOVER_COST_EXCEEDED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_MESSAGE_SCHEMA","INVALID_RESPONSE_FORMAT","INVALID_TOOL_SCHEMA","KEY_REVOKED","MAINTENANCE","MODEL_DEPRECATED","MODEL_NOT_AVAILABLE","MODEL_NOT_FOUND","MODEL_NO_IMAGE_INPUT","MODEL_QUOTA_EXCEEDED","NETWORK_ERROR","NO_HEALTHY_KEY","NO_HEALTHY_VENDOR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STREAM_INTERRUPTED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_KEY_DUPLICATE","VENDOR_KEY_INVALID","VENDOR_KEY_NOT_FOUND","VENDOR_NOT_CONFIGURED","VENDOR_REQUEST_FAILED","VENDOR_REQUEST_INVALID","VENDOR_RESPONSE_INVALID","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/ai/tts/voices \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/ai/tts/voices\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/tts/voices\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/ai/tts/voices\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/ai/tts/voices\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/ai/tts/voices\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/ai/tts/voices\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/ai/tts/voices\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/ai/tts/voices\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/ai/tts/voices\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"analytics.alias","module":"analytics","namespace":"analytics","action":"alias","method":"POST","path":"/v1/analytics/alias","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Rename or merge an anonymous distinct_id (old_id) into a known identity (new_id).","request_schema_ref":"analytics/AliasRequest.json","params":{"title":"AnalyticsAliasRequest","description":"Request for analytics.alias: rename / merge an anonymous distinct_id (old_id) into a known one (new_id). Carried through ingest_event(kind=alias). `merged` is a RESULT field (see AliasResult), not an input.","type":"object","required":["old_id","new_id"],"additionalProperties":false,"properties":{"old_id":{"type":"string","description":"The distinct_id to rename from (e.g. anonymous id)."},"new_id":{"type":"string","description":"The canonical distinct_id to merge into."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"analytics/AliasResult.json","response":{"title":"AliasResult","description":"Result of analytics.alias.","type":"object","required":["old_id","new_id","merged"],"additionalProperties":false,"properties":{"old_id":{"type":"string","description":"Previous identifier before aliasing"},"new_id":{"type":"string","description":"New identifier after aliasing"},"merged":{"type":"boolean","description":"Whether the identities were merged"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/alias \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"old_id\": \"sample\", \"new_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/alias\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'old_id': 'sample', 'new_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/alias\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"old_id\": \"sample\", \"new_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/alias\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"old_id\": \"sample\", \"new_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"old_id\": \"sample\", \"new_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/alias\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/alias\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"old_id\\\": \\\"sample\\\", \\\"new_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/alias\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"old_id\\\": \\\"sample\\\", \\\"new_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/alias\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"old_id\\\": \\\"sample\\\", \\\"new_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/alias\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"old_id\": \"sample\", \"new_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/alias\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"old_id\": \"sample\", \"new_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"old_id":"sample","new_id":"sample"}}},{"id":"analytics.batch","module":"analytics","namespace":"analytics","action":"batch","method":"POST","path":"/v1/analytics/batch","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Ingest up to 1000 TrackEvent events in a single call (idempotency is per-event).","request_schema_ref":"analytics/BatchRequest.json","params":{"title":"AnalyticsBatchRequest","description":"Request for analytics.batch. Up to 1000 TrackEvent items written in one call (direct to ingest_batch). Idempotency is per-event (each TrackEvent carries its own idempotency_key) — there is NO batch-level idempotency_key. Over 1000 events raises ANALYTICS_BATCH_TOO_LARGE.","type":"object","required":["events"],"additionalProperties":false,"properties":{"events":{"type":"array","minItems":1,"maxItems":1000,"items":{"title":"TrackEvent","description":"Single ingestion event for analytics.track. See docs/phase2/P2_03_New_Modules.md §12.2.","type":"object","required":["event","distinct_id"],"additionalProperties":false,"properties":{"event":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Event name you are recording (e.g. 'signup', 'purchase') — the verb of the action."},"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"properties":{"type":["object","null"],"description":"Additional properties for risk assessment"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Unix timestamp of the data point"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"context":{"type":["object","null"],"description":"{ip, ua, session_id}"}}},"description":"Up to 1000 TrackEvent items."}}},"response_schema_ref":"analytics/BatchResult.json","response":{"title":"AnalyticsBatchResult","description":"Result of analytics.batch.","type":"object","required":["accepted","rejected"],"additionalProperties":false,"properties":{"accepted":{"type":"integer","minimum":0,"description":"Number of items accepted for processing"},"rejected":{"type":"integer","minimum":0,"description":"Number of items rejected due to validation errors"},"errors":{"type":"array","items":{"type":"object","required":["index","reason"],"properties":{"index":{"type":"integer","minimum":0},"reason":{"type":"string"}}},"description":"Array of per-item errors (for batch operations)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/batch \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/batch\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'events': [{'event': 'sample', 'distinct_id': 'sample'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/batch\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/batch\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"events\\\": [{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/batch\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"events\\\": [{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/batch\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"events\\\": [{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/batch\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/batch\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"events\": [{\"event\": \"sample\", \"distinct_id\": \"sample\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"events":[{"event":"sample","distinct_id":"sample"}]}}},{"id":"analytics.group","module":"analytics","namespace":"analytics","action":"group","method":"POST","path":"/v1/analytics/group","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Associate a distinct_id with a group (organization/team/account) for B2B account-level aggregation.","request_schema_ref":"analytics/GroupRequest.json","params":{"title":"AnalyticsGroupRequest","description":"Request for analytics.group: associate a distinct_id with a group (org/team/account) for B2B account-level aggregation. Carried through ingest_event(kind=group).","type":"object","required":["distinct_id","group_type","group_key"],"additionalProperties":false,"properties":{"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"group_type":{"type":"string","description":"Group dimension, e.g. \"company\" / \"team\"."},"group_key":{"type":"string","description":"Group identifier within group_type."},"traits":{"type":["object","null"],"description":"Optional group profile traits."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"analytics/GroupResult.json","response":{"title":"GroupResult","description":"Result of analytics.group.","type":"object","required":["distinct_id","group_type","group_key"],"additionalProperties":false,"properties":{"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"group_type":{"type":"string","description":"Type of the analytics group"},"group_key":{"type":"string","description":"Key of the analytics group"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/group \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/group\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'distinct_id': 'sample', 'group_type': 'sample', 'group_key': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/group\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/group\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/group\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/group\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"distinct_id\\\": \\\"sample\\\", \\\"group_type\\\": \\\"sample\\\", \\\"group_key\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/group\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"distinct_id\\\": \\\"sample\\\", \\\"group_type\\\": \\\"sample\\\", \\\"group_key\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/group\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"distinct_id\\\": \\\"sample\\\", \\\"group_type\\\": \\\"sample\\\", \\\"group_key\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/group\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/group\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"distinct_id\": \"sample\", \"group_type\": \"sample\", \"group_key\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"distinct_id":"sample","group_type":"sample","group_key":"sample"}}},{"id":"analytics.identify","module":"analytics","namespace":"analytics","action":"identify","method":"POST","path":"/v1/analytics/identify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Set profile traits on a distinct_id, optionally merging a prior id via alias_for.","request_schema_ref":"analytics/IdentifyRequest.json","params":{"title":"AnalyticsIdentifyRequest","description":"Request for analytics.identify: set profile traits on a distinct_id and, optionally, merge a prior id via alias_for (second identity-merge path). Returns IdentifyResult (which does NOT echo traits).","type":"object","required":["distinct_id"],"additionalProperties":false,"properties":{"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"traits":{"type":["object","null"],"description":"Profile traits to merge onto the user."},"alias_for":{"type":["string","null"],"description":"Optional prior distinct_id to merge into this one at identify time."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"analytics/IdentifyResult.json","response":{"title":"IdentifyResult","description":"Result of analytics.identify.","type":"object","required":["distinct_id"],"additionalProperties":false,"properties":{"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"traits_merged_count":{"type":["integer","null"],"minimum":0,"description":"Number of traits merged during identification"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/identify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"distinct_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/identify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'distinct_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/identify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"distinct_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/identify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"distinct_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"distinct_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/identify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/identify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"distinct_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/identify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"distinct_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/identify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"distinct_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/identify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"distinct_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/identify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"distinct_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"distinct_id":"sample"}}},{"id":"analytics.query.events","module":"analytics","namespace":"analytics","action":"query.events","method":"POST","path":"/v1/analytics/query/events","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Query raw events within a time window, with attribute filters and cursor pagination.","request_schema_ref":"analytics/QueryEventsRequest.json","params":{"title":"AnalyticsQueryEventsRequest","description":"Request for analytics.query.events: retrieve raw events in a time window with optional property filter, cursor-paginated (native cursor from query_events). Returns EventQueryResult.","type":"object","required":["since","until"],"additionalProperties":false,"properties":{"since":{"type":"string","format":"date-time","description":"Window start (inclusive)."},"until":{"type":"string","format":"date-time","description":"Window end (exclusive)."},"filter":{"type":["object","null"],"description":"Optional property filter (key/value match)."},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Maximum number of items to return per page"},"cursor":{"type":["string","null"],"description":"Opaque cursor from a prior page's next_cursor."}}},"response_schema_ref":"analytics/EventQueryResult.json","response":{"title":"EventQueryResult","description":"Result of analytics.query.events.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"allOf":[{"title":"TrackEvent","description":"Single ingestion event for analytics.track. See docs/phase2/P2_03_New_Modules.md §12.2.","type":"object","required":["event","distinct_id"],"additionalProperties":false,"properties":{"event":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Event name you are recording (e.g. 'signup', 'purchase') — the verb of the action."},"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"properties":{"type":["object","null"],"description":"Additional properties for risk assessment"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Unix timestamp of the data point"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"context":{"type":["object","null"],"description":"{ip, ua, session_id}"}}}]},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"total_estimate":{"type":["integer","null"],"minimum":0,"description":"Estimated total number of matching events"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/query/events \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"since\": \"sample\", \"until\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/query/events\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'since': 'sample', 'until': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/events\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/events\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"since\": \"sample\", \"until\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/query/events\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/query/events\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/query/events\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/query/events\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/query/events\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"since\": \"sample\", \"until\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/query/events\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"since\": \"sample\", \"until\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"since":"sample","until":"sample"}}},{"id":"analytics.query.path","module":"analytics","namespace":"analytics","action":"query.path","method":"POST","path":"/v1/analytics/query/path","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Build behavioral path/sequence trees rooted at a start event within a time window.","request_schema_ref":"analytics/QueryPathRequest.json","params":{"title":"AnalyticsQueryPathRequest","description":"Request for analytics.query.path: behavior path/sequence tree rooted at start_event over a time window, up to max_depth. Returns PathResult (root: str, recursive children tree).","type":"object","required":["start_event","since","until"],"additionalProperties":false,"properties":{"start_event":{"type":"string","description":"Root event the path tree branches from."},"since":{"type":"string","format":"date-time","description":"ISO 8601 date when the current tier or state became effective"},"until":{"type":"string","format":"date-time","description":"ISO 8601 date/time for the end of the query range"},"max_depth":{"type":"integer","minimum":1,"maximum":20,"default":5,"description":"Maximum depth of the path tree to return"}}},"response_schema_ref":"analytics/PathResult.json","response":{"title":"PathResult","description":"Result of analytics.query.path (sequence / sankey).","type":"object","required":["root"],"additionalProperties":false,"properties":{"root":{"type":"string","description":"Root node of the path tree"},"children":{"type":"array","items":{"type":"object","required":["event","users"],"properties":{"event":{"type":"string"},"users":{"type":"integer","minimum":0},"children":{"type":"array","items":{"type":"object"}}}},"description":"Child nodes in the path tree"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/query/path \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/query/path\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'start_event': 'sample', 'since': 'sample', 'until': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/path\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/path\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/query/path\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/query/path\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"start_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/query/path\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"start_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/query/path\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"start_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/query/path\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/query/path\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"start_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"start_event":"sample","since":"sample","until":"sample"}}},{"id":"analytics.query.retention","module":"analytics","namespace":"analytics","action":"query.retention","method":"POST","path":"/v1/analytics/query/retention","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Compute a retention matrix bucketed by period from a born event to a return event.","request_schema_ref":"analytics/QueryRetentionRequest.json","params":{"title":"AnalyticsQueryRetentionRequest","description":"Request for analytics.query.retention: retention matrix from a born_event to a return_event over a time window, bucketed by interval. Returns RetentionResult.","type":"object","required":["born_event","return_event","since","until"],"additionalProperties":false,"properties":{"born_event":{"type":"string","description":"Event that defines cohort membership (day 0)."},"return_event":{"type":"string","description":"Event whose recurrence defines retention."},"since":{"type":"string","format":"date-time","description":"ISO 8601 date when the current tier or state became effective"},"until":{"type":"string","format":"date-time","description":"ISO 8601 date/time for the end of the query range"},"interval":{"default":"day","description":"Time interval for retention buckets (e.g. day, week)","type":"string","enum":["day","week","month"]}}},"response_schema_ref":"analytics/RetentionResult.json","response":{"title":"RetentionResult","description":"Result of analytics.query.retention (cohort retention curve).","type":"object","required":["cohorts"],"additionalProperties":false,"properties":{"cohorts":{"type":"array","items":{"type":"object","required":["date","total","returning"],"properties":{"date":{"type":"string","format":"date"},"total":{"type":"integer","minimum":0},"returning":{"type":"array","items":{"type":"object","required":["interval","n"],"properties":{"interval":{"type":"integer","minimum":0},"n":{"type":"integer","minimum":0}}}}}},"description":"Retention cohort data points"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/query/retention \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/query/retention\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'born_event': 'sample', 'return_event': 'sample', 'since': 'sample', 'until': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/retention\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/query/retention\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/query/retention\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/query/retention\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"born_event\\\": \\\"sample\\\", \\\"return_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/query/retention\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"born_event\\\": \\\"sample\\\", \\\"return_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/query/retention\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"born_event\\\": \\\"sample\\\", \\\"return_event\\\": \\\"sample\\\", \\\"since\\\": \\\"sample\\\", \\\"until\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/query/retention\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/query/retention\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"born_event\": \"sample\", \"return_event\": \"sample\", \"since\": \"sample\", \"until\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"born_event":"sample","return_event":"sample","since":"sample","until":"sample"}}},{"id":"analytics.track","module":"analytics","namespace":"analytics","action":"track","method":"POST","path":"/v1/analytics/track","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Ingest a single product analytics event with properties for a distinct user; idempotent.","request_schema_ref":"analytics/TrackEvent.json","params":{"title":"TrackEvent","description":"Single ingestion event for analytics.track. See docs/phase2/P2_03_New_Modules.md §12.2.","type":"object","required":["event","distinct_id"],"additionalProperties":false,"properties":{"event":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Event name you are recording (e.g. 'signup', 'purchase') — the verb of the action."},"distinct_id":{"type":"string","description":"Distinct identifier for the user or entity"},"properties":{"type":["object","null"],"description":"Additional properties for risk assessment"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Unix timestamp of the data point"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"context":{"type":["object","null"],"description":"{ip, ua, session_id}"}}},"response_schema_ref":"analytics/TrackResult.json","response":{"title":"TrackResult","description":"Result of analytics.track.","type":"object","required":["accepted"],"additionalProperties":false,"properties":{"accepted":{"type":"boolean","description":"Number of items accepted for processing"},"event_id":{"type":["string","null"],"description":"Unique identifier for this event"},"reason":{"type":["string","null"],"description":"Reason for the current state or action"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","ANALYTICS_BATCH_TOO_LARGE","ANALYTICS_DASHBOARD_NOT_FOUND","ANALYTICS_DISTINCT_ID_REQUIRED","ANALYTICS_EVENT_NAME_INVALID","ANALYTICS_FUNNEL_STEP_INVALID","ANALYTICS_PROPERTY_HIGH_CARDINALITY","ANALYTICS_QUERY_TIMEOUT","ANALYTICS_QUERY_TOO_EXPENSIVE","ANALYTICS_QUOTA_EXCEEDED","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","EVENT_TOO_LARGE","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/analytics/track \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"event\": \"sample\", \"distinct_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/analytics/track\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'event': 'sample', 'distinct_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/track\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"event\": \"sample\", \"distinct_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/analytics/track\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"event\": \"sample\", \"distinct_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"event\": \"sample\", \"distinct_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/analytics/track\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/analytics/track\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/analytics/track\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/analytics/track\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"event\\\": \\\"sample\\\", \\\"distinct_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/analytics/track\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"event\": \"sample\", \"distinct_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/analytics/track\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"event\": \"sample\", \"distinct_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"event":"sample","distinct_id":"sample"}}},{"id":"auth.consent.check","module":"auth","namespace":"auth","action":"consent.check","method":"GET","path":"/v1/auth/consent/check/{user_id}/{category}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Check whether a user currently holds consent for a given category (boolean).","request_schema_ref":null,"params":{},"response_schema_ref":"auth/ConsentCheckResult.json","response":{"title":"ConsentCheckResult","type":"object","description":"Result of checking a user's consent status. The handler (infrai_auth.consent.check) returns a bare bool, normalized by the edge's generic auth/db orchestration to result= bool — user_id/category are the request's path params, never echoed in the body.","required":["result"],"additionalProperties":false,"properties":{"result":{"type":"boolean","description":"Whether consent is currently granted for this user/category"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/consent/check/USER_ID/CATEGORY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.consent.grant","module":"auth","namespace":"auth","action":"consent.grant","method":"POST","path":"/v1/auth/consent/grant/{user_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Record a GDPR/CCPA consent grant for a user/category. Accepts idempotency_key.","request_schema_ref":"auth/ConsentGrantRequest.json","params":{"title":"ConsentGrantRequest","description":"Request for auth.consent.grant — record a user's consent for a category (path user_id).","type":"object","required":["user_id","category"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"Path param."},"category":{"type":"string","enum":["marketing","analytics","essential","third_party"],"description":"Consent category (e.g. marketing, analytics)"},"source":{"type":"string","default":"explicit","description":"How consent was captured."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/ConsentResult.json","response":{"title":"ConsentResult","type":"object","description":"Result shared by auth.consent.grant (returns the full Consent record) and auth.consent.revoke (returns bare ok= true, since infrai_auth.consent.revoke() returns None) — the two caps have genuinely different wire shapes, so both property sets are optional here.","required":[],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the operation succeeded (auth.consent.revoke only)"},"consent_id":{"type":"string","description":"Identifier of the consent record (auth.consent.grant only)"},"user_id":{"type":"string","description":"User identifier (auth.consent.grant only)"},"category":{"type":"string","description":"Consent category affected (auth.consent.grant only)"},"granted":{"type":"boolean","description":"Whether consent is granted (auth.consent.grant only)"},"granted_at":{"type":["string","null"],"description":"ISO 8601 timestamp when consent was granted (auth.consent.grant only)"},"revoked_at":{"type":["string","null"],"description":"ISO 8601 timestamp when consent was revoked, if any (auth.consent.grant only)"},"source":{"type":"string","description":"How consent was captured, e.g. 'explicit' (auth.consent.grant only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/consent/grant/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\", \"category\": \"marketing\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample', 'category': 'marketing'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"category\": \"marketing\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"category\": \"marketing\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\", \"category\": \"marketing\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\", \"category\": \"marketing\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/consent/grant/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\", \"category\": \"marketing\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample","category":"marketing"}}},{"id":"auth.consent.list_for_user","module":"auth","namespace":"auth","action":"consent.list_for_user","method":"GET","path":"/v1/auth/consent/list_for_user/{user_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List all consent records for a user across GDPR categories.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/ConsentListResult.json","response":{"title":"ConsentListResult","type":"object","description":"List of consent records for a user.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of consent records"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/consent/list_for_user/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.consent.revoke","module":"auth","namespace":"auth","action":"consent.revoke","method":"POST","path":"/v1/auth/consent/revoke/{user_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Revoke a previously granted consent for a user/category. Accepts idempotency_key.","request_schema_ref":"auth/ConsentRevokeRequest.json","params":{"title":"ConsentRevokeRequest","description":"Request for auth.consent.revoke — withdraw a user's consent for a category (path user_id).","type":"object","required":["user_id","category"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"Path param."},"category":{"type":"string","enum":["marketing","analytics","essential","third_party"],"description":"Consent category (e.g. marketing, analytics)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/ConsentResult.json","response":{"title":"ConsentResult","type":"object","description":"Result shared by auth.consent.grant (returns the full Consent record) and auth.consent.revoke (returns bare ok= true, since infrai_auth.consent.revoke() returns None) — the two caps have genuinely different wire shapes, so both property sets are optional here.","required":[],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the operation succeeded (auth.consent.revoke only)"},"consent_id":{"type":"string","description":"Identifier of the consent record (auth.consent.grant only)"},"user_id":{"type":"string","description":"User identifier (auth.consent.grant only)"},"category":{"type":"string","description":"Consent category affected (auth.consent.grant only)"},"granted":{"type":"boolean","description":"Whether consent is granted (auth.consent.grant only)"},"granted_at":{"type":["string","null"],"description":"ISO 8601 timestamp when consent was granted (auth.consent.grant only)"},"revoked_at":{"type":["string","null"],"description":"ISO 8601 timestamp when consent was revoked, if any (auth.consent.grant only)"},"source":{"type":"string","description":"How consent was captured, e.g. 'explicit' (auth.consent.grant only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/consent/revoke/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\", \"category\": \"marketing\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample', 'category': 'marketing'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"category\": \"marketing\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"category\": \"marketing\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\", \"category\": \"marketing\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\", \\\"category\\\": \\\"marketing\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\", \"category\": \"marketing\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/consent/revoke/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\", \"category\": \"marketing\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample","category":"marketing"}}},{"id":"auth.email.change_confirm","module":"auth","namespace":"auth","action":"email.change_confirm","method":"POST","path":"/v1/auth/email/change_confirm","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Confirm an email change with the single-use token from the new address; switches the user's email. Returns AUTH_TOKEN_REUSED on replay. Accepts idempotency_key.","request_schema_ref":"auth/EmailChangeConfirmRequest.json","params":{"title":"EmailChangeConfirmRequest","description":"Request for auth.email.change_confirm — confirm an email change with the single-use token from the new address. Replay returns AUTH_TOKEN_REUSED.","type":"object","required":["token"],"additionalProperties":false,"properties":{"token":{"type":"string","minLength":1,"description":"Authentication or verification token"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/email/change_confirm \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"token\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/email/change_confirm\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'token': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/change_confirm\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"token\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/change_confirm\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"token\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"token\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/email/change_confirm\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/email/change_confirm\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"token\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/email/change_confirm\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"token\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/email/change_confirm\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"token\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/email/change_confirm\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"token\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/email/change_confirm\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"token\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"token":"sample"}}},{"id":"auth.email.change_request","module":"auth","namespace":"auth","action":"email.change_request","method":"POST","path":"/v1/auth/email/change_request","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Start an email change for a user; sends a single-use signed verification token to the NEW address (self-built, no BYOK). Accepts idempotency_key.","request_schema_ref":"auth/EmailChangeRequest.json","params":{"title":"EmailChangeRequest","description":"Request for auth.email.change_request — start an email change for a user; sends a single-use signed verification token to the NEW address.","type":"object","required":["user_id","new_email"],"additionalProperties":false,"properties":{"user_id":{"type":"string","minLength":1,"description":"User identifier associated with this resource"},"new_email":{"type":"string","minLength":3,"format":"email","description":"New email address; the signed verification link is sent here."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/EmailChangeResult.json","response":{"title":"EmailChangeResult","type":"object","description":"Result of an email change request.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the change request was accepted"},"pending_token":{"type":["string","null"],"description":"Confirmation token sent to the new email, if confirmation required"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/email/change_request \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/email/change_request\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample', 'new_email': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/change_request\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/change_request\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/email/change_request\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/email/change_request\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\", \\\"new_email\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/email/change_request\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\", \\\"new_email\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/email/change_request\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\", \\\"new_email\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/email/change_request\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/email/change_request\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\", \"new_email\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample","new_email":"user@example.com"}}},{"id":"auth.email.send_code","module":"auth","namespace":"auth","action":"email.send_code","method":"POST","path":"/v1/auth/email/send_code","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Send a short-lived single-use email OTP to a user for verification or passwordless login (self-built). Accepts idempotency_key.","request_schema_ref":"auth/EmailSendCodeRequest.json","params":{"title":"EmailSendCodeRequest","description":"Request for auth.email.send_code — send a short-lived single-use email OTP (self-built, no BYOK).","type":"object","required":["email"],"additionalProperties":false,"properties":{"email":{"type":"string","minLength":3,"format":"email","description":"Email address"},"purpose":{"type":"string","enum":["verify","login"],"default":"verify","description":"Purpose of the DNS record"},"locale":{"type":"string","description":"End-user's current language (BCP-47, e.g. 'zh-CN' / 'en'); the OTP email is rendered in it (zh/en supported, default en). Pass your app's UI locale so the code reaches the user in their language.","examples":["zh-CN","en"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/EmailSendCodeResult.json","response":{"title":"EmailSendCodeResult","type":"object","description":"Result of sending an email OTP code. The edge mints the code in-process then delivers it via email and strips the code before returning; purpose=verify can short-circuit with already_verified=true.","required":["sent","expires_in"],"additionalProperties":false,"properties":{"sent":{"type":"boolean","description":"Whether the code was sent"},"expires_in":{"type":"integer","description":"Seconds until the code expires"},"already_verified":{"type":"boolean","description":"True when purpose=verify and this email is already verified for the current account; no email OTP was sent."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/email/send_code \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/email/send_code\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/send_code\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/send_code\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/email/send_code\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/email/send_code\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/email/send_code\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/email/send_code\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/email/send_code\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/email/send_code\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com"}}},{"id":"auth.email.verify","module":"auth","namespace":"auth","action":"email.verify","method":"POST","path":"/v1/auth/email/verify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Verify an email OTP AND log in: on success resolves-or-creates the unified user (passwordless signup) and mints a session, returning {verified, user_id, created, session_id, access_token, refresh_token, expires_at} — a one-call login matching Auth0/Clerk/Supabase verifyOtp. Pass login=false for a bare code-check. Wrong/expired returns AUTH_CODE_INVALID. Accepts idempotency_key.","request_schema_ref":"auth/EmailVerifyRequest.json","params":{"title":"EmailVerifyRequest","description":"Request for auth.email.verify — verify an email OTP code (single-use, short TTL). Wrong/expired returns AUTH_CODE_INVALID; replay returns AUTH_TOKEN_REUSED.","type":"object","required":["email","code"],"additionalProperties":false,"properties":{"email":{"type":"string","minLength":3,"format":"email","description":"Email address"},"code":{"type":"string","minLength":1,"description":"Authorization code from the OAuth provider"},"login":{"type":"boolean","default":true,"description":"When false, verify the code without creating a user session"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/TokenPair.json","response":{"title":"TokenPair","description":"Access + refresh token pair.","type":"object","required":["access_token","refresh_token","expires_in"],"additionalProperties":false,"properties":{"access_token":{"type":"string","description":"Short-lived access token for API authentication"},"refresh_token":{"type":"string","description":"Long-lived token used to obtain new access tokens"},"expires_in":{"type":"integer","minimum":1,"description":"Seconds until access_token expiry."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/email/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\", \"code\": \"123456\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/email/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com', 'code': '123456'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\", \"code\": \"123456\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/email/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\", \"code\": \"123456\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\", \"code\": \"123456\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/email/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/email/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/email/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/email/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/email/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\", \"code\": \"123456\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/email/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\", \"code\": \"123456\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com","code":"123456"}}},{"id":"auth.identity.get","module":"auth","namespace":"auth","action":"identity.get","method":"POST","path":"/v1/auth/identity/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Look up the end-user that owns a given identity (email/phone/external subject) without creating one; returns IDENTITY_NOT_FOUND if unknown.","request_schema_ref":"auth/IdentityResolveRequest.json","params":{"title":"IdentityResolveRequest","description":"Resolve / look up / add an identity. `type` + `value` are REQUIRED: type is the identity kind (email | phone | external), value is the address/subject (an email, an E.164 phone, or a provider subject id). For external (e.g. wechat/google OIDC) also pass `provider`. resolve() creates the unified user when none exists (create defaults true); add() attaches the identity to the path user_id. Returns the resolved/created user.","type":"object","additionalProperties":false,"required":["type","value"],"properties":{"type":{"type":"string","enum":["email","phone","external"],"example":"email","description":"Identity kind."},"value":{"type":"string","example":"user@example.com","description":"The identity address/subject — an email, an E.164 phone, or a provider subject id (must match `type`)."},"provider":{"type":["string","null"],"description":"For type=external: the provider id (e.g. wechat, google, github)."},"create":{"type":["boolean","null"],"default":true,"description":"resolve(): create a unified user when none matches (default true)."},"verified":{"type":["boolean","null"],"description":"Mark the identity verified on attach (e.g. a tenant-vouched external subject)."},"account_id":{"type":["string","null"],"description":"Tenant scope (defaults to the authenticated account)."}}},"response_schema_ref":"auth/IdentityResult.json","response":{"title":"IdentityResult","type":"object","description":"Result of an identity get/resolve operation (infrai_auth.identity.get/resolve): the matched/created user and identity records. auth.identity.resolve additionally reports whether a new user was minted.","required":["user","identity"],"additionalProperties":false,"properties":{"user":{"type":"object","description":"The resolved end-user record"},"identity":{"type":"object","description":"The matched identity record (type/provider/value/user_id/verified/created_at)"},"created":{"type":"boolean","description":"Whether a new user was minted by this call (auth.identity.resolve only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/identity/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\": \"email\", \"value\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/identity/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'type': 'email', 'value': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/get\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"type\": \"email\", \"value\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/get\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"type\": \"email\", \"value\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"type\": \"email\", \"value\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/identity/get\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/identity/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/identity/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/identity/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/identity/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"type\": \"email\", \"value\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/identity/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"type\": \"email\", \"value\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"type":"email","value":"user@example.com"}}},{"id":"auth.identity.list","module":"auth","namespace":"auth","action":"identity.list","method":"GET","path":"/v1/auth/identity/list/{user_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List every login identity (email/phone/external) attached to a user.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/IdentityListResult.json","response":{"title":"IdentityListResult","type":"object","description":"List of identities linked to a user.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of identity records"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/identity/list/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/identity/list/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/list/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/list/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/identity/list/USER_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/identity/list/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/identity/list/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/identity/list/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/identity/list/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/identity/list/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.identity.remove","module":"auth","namespace":"auth","action":"identity.remove","method":"DELETE","path":"/v1/auth/identity/remove/{user_id}/{identity_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Unlink one identity from a user; refuses IDENTITY_LAST_REMAINING when it is the user's only remaining identity.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/IdentityResult.json","response":{"title":"IdentityResult","type":"object","description":"Result of an identity get/resolve operation (infrai_auth.identity.get/resolve): the matched/created user and identity records. auth.identity.resolve additionally reports whether a new user was minted.","required":["user","identity"],"additionalProperties":false,"properties":{"user":{"type":"object","description":"The resolved end-user record"},"identity":{"type":"object","description":"The matched identity record (type/provider/value/user_id/verified/created_at)"},"created":{"type":"boolean","description":"Whether a new user was minted by this call (auth.identity.resolve only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/auth/identity/remove/USER_ID/IDENTITY_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.identity.resolve","module":"auth","namespace":"auth","action":"identity.resolve","method":"POST","path":"/v1/auth/identity/resolve","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Unified login/register: resolve a (tenant-vouched) email, phone, or external-provider identity to its end-user, minting the user + identity if unknown. type=external + provider (e.g. 'wechat') + value=<subject> handles any third-party login; one person who arrives via different identities maps to the SAME user_id.","request_schema_ref":"auth/IdentityResolveRequest.json","params":{"title":"IdentityResolveRequest","description":"Resolve / look up / add an identity. `type` + `value` are REQUIRED: type is the identity kind (email | phone | external), value is the address/subject (an email, an E.164 phone, or a provider subject id). For external (e.g. wechat/google OIDC) also pass `provider`. resolve() creates the unified user when none exists (create defaults true); add() attaches the identity to the path user_id. Returns the resolved/created user.","type":"object","additionalProperties":false,"required":["type","value"],"properties":{"type":{"type":"string","enum":["email","phone","external"],"example":"email","description":"Identity kind."},"value":{"type":"string","example":"user@example.com","description":"The identity address/subject — an email, an E.164 phone, or a provider subject id (must match `type`)."},"provider":{"type":["string","null"],"description":"For type=external: the provider id (e.g. wechat, google, github)."},"create":{"type":["boolean","null"],"default":true,"description":"resolve(): create a unified user when none matches (default true)."},"verified":{"type":["boolean","null"],"description":"Mark the identity verified on attach (e.g. a tenant-vouched external subject)."},"account_id":{"type":["string","null"],"description":"Tenant scope (defaults to the authenticated account)."}}},"response_schema_ref":"auth/IdentityResult.json","response":{"title":"IdentityResult","type":"object","description":"Result of an identity get/resolve operation (infrai_auth.identity.get/resolve): the matched/created user and identity records. auth.identity.resolve additionally reports whether a new user was minted.","required":["user","identity"],"additionalProperties":false,"properties":{"user":{"type":"object","description":"The resolved end-user record"},"identity":{"type":"object","description":"The matched identity record (type/provider/value/user_id/verified/created_at)"},"created":{"type":"boolean","description":"Whether a new user was minted by this call (auth.identity.resolve only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/identity/resolve \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\": \"email\", \"value\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/identity/resolve\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'type': 'email', 'value': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/resolve\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"type\": \"email\", \"value\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/identity/resolve\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"type\": \"email\", \"value\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"type\": \"email\", \"value\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/identity/resolve\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/identity/resolve\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/identity/resolve\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/identity/resolve\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"type\\\": \\\"email\\\", \\\"value\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/identity/resolve\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"type\": \"email\", \"value\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/identity/resolve\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"type\": \"email\", \"value\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"type":"email","value":"user@example.com"}}},{"id":"auth.oauth.authorize_url","module":"auth","namespace":"auth","action":"oauth.authorize_url","method":"GET","path":"/v1/auth/oauth/authorize_url","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Build the provider authorize URL (provider must be one of the enabled set — see auth.oauth.providers) with state, nonce and PKCE challenge; return_to/redirect_uri must be in the account's registered allowlist.","request_schema_ref":"auth/OAuthAuthorizeUrlRequest.json","params":{"title":"OAuthAuthorizeUrlRequest","description":"Request for auth.oauth.authorize_url — build the provider authorize URL (with state + nonce + PKCE challenge) the end user is sent to. `provider` is REQUIRED and must be one of the enabled providers (see auth.oauth.providers for the live list). Pass EITHER `return_to` (unified-brand transit: Infrai's fixed redirect handles the callback, then 302s back to this customer destination — preferred) OR `redirect_uri` (legacy customer-BFF: the caller's own OAuth redirect). Both are validated against the account's console-registered allowlist.","type":"object","additionalProperties":false,"required":["provider"],"properties":{"provider":{"description":"OAuth provider name (e.g. google, github)","type":"string","enum":["google","github","apple","facebook"]},"return_to":{"type":["string","null"],"example":"https://app.example.com/auth/done","description":"Unified-brand transit (preferred): final web URL or app deep link to 302 back to after Infrai's transit endpoint completes the flow. Must be in the account's allowlist."},"redirect_uri":{"type":["string","null"],"example":"https://app.example.com/oauth/callback","description":"Legacy customer-BFF: the caller's own provider redirect URI (used when `return_to` is absent). Must be in the account's allowlist.","format":"uri"}}},"response_schema_ref":"auth/OAuthRedirect.json","response":{"title":"OAuthRedirect","description":"Hosted OAuth start URL returned by auth.oauth.start.","type":"object","required":["url","state"],"additionalProperties":false,"properties":{"url":{"type":"string","description":"URL for this resource or endpoint"},"state":{"type":"string","description":"CSRF nonce; pass back on callback."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/oauth/authorize_url?provider=google\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"provider":"google"}}},{"id":"auth.oauth.callback","module":"auth","namespace":"auth","action":"oauth.callback","method":"POST","path":"/v1/auth/oauth/callback","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Complete the OAuth flow: validate state + redirect_uri, exchange the code, link/create the user and mint a session. Honest typed error if the provider is not configured.","request_schema_ref":"auth/OAuthCallbackRequest.json","params":{"title":"OAuthCallbackRequest","description":"Request for auth.oauth.callback — complete the OAuth flow: validate state + redirect_uri, exchange the code, link/create the user and mint a session.","type":"object","required":["provider","code","state","redirect_uri"],"additionalProperties":false,"properties":{"provider":{"description":"OAuth provider name (e.g. google, github)","type":"string","enum":["google","github","apple","facebook"]},"code":{"type":"string","minLength":1,"description":"Authorization code from the OAuth provider"},"state":{"type":"string","minLength":1,"description":"Current lifecycle state of this resource"},"redirect_uri":{"type":"string","minLength":1,"format":"uri","description":"Redirect URI registered with the OAuth provider"},"code_verifier":{"type":["string","null"],"description":"PKCE verifier matching the challenge from authorize_url."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/OAuthSession.json","response":{"title":"OAuthSession","description":"Returned by auth.oauth.callback once the code is exchanged: a minted Infrai session plus the provider profile fetched during the exchange. The profile fields (email/name/avatar) are passed back verbatim for the app to use/store — they are NOT persisted server-side, and the session JWT (access_token) deliberately carries only identifiers (sub/sid/acct), never PII. Availability varies by provider: X/Twitter returns no email; Apple returns no avatar; some users hide name/avatar.","type":"object","required":["user_id","session_id","expires_at","provider","created"],"additionalProperties":false,"properties":{"user_id":{"type":"string","description":"Stable Infrai user id (au_usr_…); same person across providers when unified by email/subject."},"session_id":{"type":"string","description":"Minted session id (au_ses_…)."},"access_token":{"type":["string","null"],"description":"Short-lived EdDSA session JWT, offline-verifiable via auth.token.jwks. Claims are identifiers only (iss/sub/acct/sid/aud/iat/exp/jti) — no email/name/avatar."},"refresh_token":{"type":["string","null"],"description":"Long-lived refresh token to mint new access tokens."},"expires_at":{"type":"string","format":"date-time","description":"Access-token expiry."},"provider":{"description":"OAuth provider name (e.g. google, github)","type":"string","enum":["google","github","apple","facebook"]},"created":{"type":"boolean","description":"true if this login created a new user; false if it linked to an existing one."},"return_to":{"type":["string","null"],"description":"App URL the browser transit flow redirects back to (echoed from the request)."},"email":{"type":["string","null"],"description":"Provider-verified email, when the provider exposes one (null for email-less providers like X)."},"name":{"type":["string","null"],"description":"Provider display name, when available."},"avatar":{"type":["string","null"],"description":"Provider avatar/picture URL, when available (Google picture, GitHub avatar_url, Facebook picture.data.url, X profile_image_url; null for Apple)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/oauth/callback \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/oauth/callback\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'provider': 'google', 'code': '123456', 'state': 'sample', 'redirect_uri': 'https://example.com/callback'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/callback\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/callback\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/oauth/callback\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/oauth/callback\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"provider\\\": \\\"google\\\", \\\"code\\\": \\\"123456\\\", \\\"state\\\": \\\"sample\\\", \\\"redirect_uri\\\": \\\"https://example.com/callback\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/oauth/callback\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"provider\\\": \\\"google\\\", \\\"code\\\": \\\"123456\\\", \\\"state\\\": \\\"sample\\\", \\\"redirect_uri\\\": \\\"https://example.com/callback\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/oauth/callback\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"provider\\\": \\\"google\\\", \\\"code\\\": \\\"123456\\\", \\\"state\\\": \\\"sample\\\", \\\"redirect_uri\\\": \\\"https://example.com/callback\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/oauth/callback\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/oauth/callback\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"provider\": \"google\", \"code\": \"123456\", \"state\": \"sample\", \"redirect_uri\": \"https://example.com/callback\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"provider":"google","code":"123456","state":"sample","redirect_uri":"https://example.com/callback"}}},{"id":"auth.oauth.providers","module":"auth","namespace":"auth","action":"oauth.providers","method":"GET","path":"/v1/auth/oauth/providers","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List the OAuth providers an end user can sign in with right now, each flagged ready (real client_id configured), plus the unified consent-screen brand. The runtime companion to the AuthProvider enum in discovery.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/OAuthProviderListResult.json","response":{"title":"OAuthProviderListResult","type":"object","description":"List of available OAuth providers (infrai_auth.oauth.providers()).","required":["providers","consent_brand"],"additionalProperties":false,"properties":{"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Provider identifier, e.g. 'google', 'github'"},"ready":{"type":"boolean","description":"Whether a real client_id is configured for this provider"}}},"description":"List of OAuth provider configurations"},"consent_brand":{"type":"string","description":"Brand name shown on the OAuth consent screen"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/oauth/providers \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/oauth/providers\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/providers\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/oauth/providers\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/oauth/providers\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/oauth/providers\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/oauth/providers\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/oauth/providers\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/oauth/providers\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/oauth/providers\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.password.change","module":"auth","namespace":"auth","action":"password.change","method":"POST","path":"/v1/auth/password/change","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Change a user's password after verifying the current one (AUTH_INVALID_CREDENTIALS on mismatch); argon2id re-hash. Accepts idempotency_key.","request_schema_ref":"auth/PasswordChangeRequest.json","params":{"title":"PasswordChangeRequest","description":"Request for auth.password.change — verify current password then argon2id re-hash the new one. Mismatch returns AUTH_INVALID_CREDENTIALS; weak password returns AUTH_PASSWORD_TOO_WEAK.","type":"object","required":["user_id","current_password","new_password"],"additionalProperties":false,"properties":{"user_id":{"type":"string","minLength":1,"description":"User identifier associated with this resource"},"current_password":{"type":"string","minLength":1,"description":"Current password for verification"},"new_password":{"type":"string","minLength":1,"description":"New password for the account"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/password/change \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/password/change\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample', 'current_password': 'sample', 'new_password': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/change\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/change\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/password/change\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/password/change\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\", \\\"current_password\\\": \\\"sample\\\", \\\"new_password\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/password/change\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\", \\\"current_password\\\": \\\"sample\\\", \\\"new_password\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/password/change\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\", \\\"current_password\\\": \\\"sample\\\", \\\"new_password\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/password/change\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/password/change\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\", \"current_password\": \"sample\", \"new_password\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample","current_password":"sample","new_password":"sample"}}},{"id":"auth.password.reset_confirm","module":"auth","namespace":"auth","action":"password.reset_confirm","method":"POST","path":"/v1/auth/password/reset_confirm","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Confirm a password reset with {email, code, new_password} — verifies the 6-digit code from reset_request, re-hashes (argon2id) and revokes all sessions. Wrong/expired code returns AUTH_CODE_INVALID; weak password returns AUTH_PASSWORD_TOO_WEAK. Accepts idempotency_key.","request_schema_ref":"auth/PasswordResetConfirmRequest.json","params":{"title":"PasswordResetConfirmRequest","description":"Request for auth.password.reset_confirm — confirm a password reset with the email, the single-use 6-digit code from reset_request, and the new password (code-style, Supabase pattern). Re-hashes (argon2id) and revokes all of the user's sessions. Wrong/expired code returns AUTH_CODE_INVALID; weak password returns AUTH_PASSWORD_TOO_WEAK.","type":"object","required":["email","code","new_password"],"additionalProperties":false,"properties":{"email":{"type":"string","format":"email","description":"Email address"},"code":{"type":"string","minLength":4,"maxLength":8,"description":"Authorization code from the OAuth provider"},"new_password":{"type":"string","minLength":1,"description":"New password for the account"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/TokenPair.json","response":{"title":"TokenPair","description":"Access + refresh token pair.","type":"object","required":["access_token","refresh_token","expires_in"],"additionalProperties":false,"properties":{"access_token":{"type":"string","description":"Short-lived access token for API authentication"},"refresh_token":{"type":"string","description":"Long-lived token used to obtain new access tokens"},"expires_in":{"type":"integer","minimum":1,"description":"Seconds until access_token expiry."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/password/reset_confirm \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/password/reset_confirm\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com', 'code': '123456', 'new_password': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/reset_confirm\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/reset_confirm\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/password/reset_confirm\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/password/reset_confirm\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\", \\\"new_password\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/password/reset_confirm\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\", \\\"new_password\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/password/reset_confirm\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\", \\\"code\\\": \\\"123456\\\", \\\"new_password\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/password/reset_confirm\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/password/reset_confirm\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\", \"code\": \"123456\", \"new_password\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com","code":"123456","new_password":"sample"}}},{"id":"auth.password.reset_request","module":"auth","namespace":"auth","action":"password.reset_request","method":"POST","path":"/v1/auth/password/reset_request","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Request a password reset (code-style, Supabase pattern); always returns 200 (no user-existence leak) and emails a single-use 6-digit code when the email is known. Accepts idempotency_key.","request_schema_ref":"auth/PasswordResetRequest.json","params":{"title":"PasswordResetRequest","description":"Request for auth.password.reset_request — always returns 200 (no user-existence leak) and emails a single-use signed reset token.","type":"object","required":["email"],"additionalProperties":false,"properties":{"email":{"type":"string","minLength":3,"format":"email","description":"Email address"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/PasswordResetResult.json","response":{"title":"PasswordResetResult","type":"object","description":"Result of a password reset request. Always returns bare sent= true regardless of whether the email is known (no account-existence oracle) — the reset code itself is delivered out-of-band and stripped from the live response.","required":["sent"],"additionalProperties":false,"properties":{"sent":{"type":"boolean","description":"Always true; does not reveal whether the email is registered"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/password/reset_request \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/password/reset_request\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/reset_request\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/password/reset_request\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/password/reset_request\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/password/reset_request\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/password/reset_request\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/password/reset_request\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/password/reset_request\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/password/reset_request\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com"}}},{"id":"auth.phone.send_code","module":"auth","namespace":"auth","action":"phone.send_code","method":"POST","path":"/v1/auth/phone/send_code","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Send a short-lived single-use phone (SMS) OTP to a user (self-built; SMS delivery depends on infra.sms). Accepts idempotency_key.","request_schema_ref":"auth/PhoneSendCodeRequest.json","params":{"title":"PhoneSendCodeRequest","description":"Request for auth.phone.send_code — send a short-lived single-use SMS OTP (self-built; SMS delivery depends on infra.sms).","type":"object","required":["phone"],"additionalProperties":false,"properties":{"phone":{"type":"string","minLength":3,"description":"Phone number in E.164 format"},"purpose":{"type":"string","enum":["verify","login"],"default":"verify","description":"Purpose of the DNS record"},"locale":{"type":"string","description":"End-user's current language (BCP-47, e.g. 'zh-CN' / 'en'); the OTP SMS is rendered in it (zh/en supported, default en). Pass your app's UI locale so the code reaches the user in their language.","examples":["zh-CN","en"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/PhoneSendCodeResult.json","response":{"title":"PhoneSendCodeResult","type":"object","description":"Result of sending a phone OTP code.","required":["ok","phone"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the code was sent"},"phone":{"type":"string","description":"Phone number the code was sent to"},"expires_in_seconds":{"type":["integer","null"],"description":"Seconds until the code expires"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/phone/send_code \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\": \"+15555550100\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/phone/send_code\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'phone': '+15555550100'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/phone/send_code\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/phone/send_code\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"phone\": \"+15555550100\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/phone/send_code\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/phone/send_code\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"phone\\\": \\\"+15555550100\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/phone/send_code\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"phone\\\": \\\"+15555550100\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/phone/send_code\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"phone\\\": \\\"+15555550100\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/phone/send_code\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"phone\": \"+15555550100\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/phone/send_code\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"phone\": \"+15555550100\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"phone":"+15555550100"}}},{"id":"auth.phone.verify","module":"auth","namespace":"auth","action":"phone.verify","method":"POST","path":"/v1/auth/phone/verify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Verify a phone OTP AND log in: on success resolves-or-creates the unified user (passwordless signup) and mints a session, returning {verified, user_id, created, session_id, access_token, refresh_token, expires_at} — a one-call login matching Auth0/Clerk/Supabase. Pass login=false for a bare code-check. Wrong/expired returns AUTH_CODE_INVALID. Accepts idempotency_key.","request_schema_ref":"auth/PhoneVerifyRequest.json","params":{"title":"PhoneVerifyRequest","description":"Request for auth.phone.verify — verify a phone OTP code (single-use, short TTL). Wrong/expired returns AUTH_CODE_INVALID; replay returns AUTH_TOKEN_REUSED.","type":"object","required":["phone","code"],"additionalProperties":false,"properties":{"phone":{"type":"string","minLength":3,"description":"Phone number in E.164 format"},"code":{"type":"string","minLength":1,"description":"Authorization code from the OAuth provider"},"login":{"type":"boolean","default":true,"description":"When false, verify the code without creating a user session"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/TokenPair.json","response":{"title":"TokenPair","description":"Access + refresh token pair.","type":"object","required":["access_token","refresh_token","expires_in"],"additionalProperties":false,"properties":{"access_token":{"type":"string","description":"Short-lived access token for API authentication"},"refresh_token":{"type":"string","description":"Long-lived token used to obtain new access tokens"},"expires_in":{"type":"integer","minimum":1,"description":"Seconds until access_token expiry."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/phone/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\": \"+15555550100\", \"code\": \"123456\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/phone/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'phone': '+15555550100', 'code': '123456'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/phone/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\", \"code\": \"123456\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/phone/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\", \"code\": \"123456\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"phone\": \"+15555550100\", \"code\": \"123456\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/phone/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/phone/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"phone\\\": \\\"+15555550100\\\", \\\"code\\\": \\\"123456\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/phone/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"phone\\\": \\\"+15555550100\\\", \\\"code\\\": \\\"123456\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/phone/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"phone\\\": \\\"+15555550100\\\", \\\"code\\\": \\\"123456\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/phone/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"phone\": \"+15555550100\", \"code\": \"123456\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/phone/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"phone\": \"+15555550100\", \"code\": \"123456\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"phone":"+15555550100","code":"123456"}}},{"id":"auth.session.create","module":"auth","namespace":"auth","action":"session.create","method":"POST","path":"/v1/auth/session/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Mint an authenticated session for a user; routes to the user's pinned vendor. May return AUTH_MFA_REQUIRED. Accepts idempotency_key.","request_schema_ref":"auth/SessionCreateRequest.json","params":{"title":"SessionCreateRequest","description":"Request for auth.session.create — mint a session for a user (vendor inferred from the user).","type":"object","required":["user_id"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"method":{"type":"string","enum":["password","magic_link","otp","oauth","passkey"],"default":"password","description":"Authentication method used (e.g. email_otp, oauth, password)"},"mfa_factor":{"type":["string","null"],"description":"MFA factor / code when require_mfa."},"require_mfa":{"type":"boolean","default":false,"description":"Whether MFA is required to complete authentication"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/SessionStart.json","response":{"title":"SessionStart","description":"Intermediate challenge state returned by auth.sessions.start.","type":"object","required":["challenge_id","method","expires_at"],"additionalProperties":false,"properties":{"challenge_id":{"type":"string","description":"Identifier for the authentication challenge"},"method":{"description":"Authentication method used (e.g. email_otp, oauth, password)","type":"string","enum":["password","magic_link","otp","oauth","passkey"]},"redirect_uri":{"type":["string","null"],"description":"For oauth method."},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/session/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/session/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/session/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/session/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/session/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample"}}},{"id":"auth.session.list_for_user","module":"auth","namespace":"auth","action":"session.list_for_user","method":"GET","path":"/v1/auth/session/list_for_user/{user_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List active sessions for a given user.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/SessionListResult.json","response":{"title":"SessionListResult","type":"object","description":"List of sessions for a user.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of session records"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/session/list_for_user/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.session.refresh","module":"auth","namespace":"auth","action":"session.refresh","method":"POST","path":"/v1/auth/session/refresh","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Exchange a refresh token for a new session; enforces 5-min cooldown (AUTH_REFRESH_TOO_FREQUENT). Accepts idempotency_key.","request_schema_ref":"auth/SessionRefreshRequest.json","params":{"title":"SessionRefreshRequest","description":"Request for auth.session.refresh — exchange a refresh token for a fresh session (5-min cooldown).","type":"object","required":["refresh_token"],"additionalProperties":false,"properties":{"refresh_token":{"type":"string","minLength":1,"description":"Long-lived token used to obtain new access tokens"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/TokenPair.json","response":{"title":"TokenPair","description":"Access + refresh token pair.","type":"object","required":["access_token","refresh_token","expires_in"],"additionalProperties":false,"properties":{"access_token":{"type":"string","description":"Short-lived access token for API authentication"},"refresh_token":{"type":"string","description":"Long-lived token used to obtain new access tokens"},"expires_in":{"type":"integer","minimum":1,"description":"Seconds until access_token expiry."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/session/refresh \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"refresh_token\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/session/refresh\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'refresh_token': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/refresh\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"refresh_token\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/refresh\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"refresh_token\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"refresh_token\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/session/refresh\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/refresh\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"refresh_token\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/session/refresh\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"refresh_token\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/refresh\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"refresh_token\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/refresh\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"refresh_token\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/session/refresh\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"refresh_token\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"refresh_token":"sample"}}},{"id":"auth.session.revoke","module":"auth","namespace":"auth","action":"session.revoke","method":"POST","path":"/v1/auth/session/revoke/{session_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Revoke a single session by session_id. Accepts idempotency_key.","request_schema_ref":"auth/SessionRevokeRequest.json","params":{"title":"SessionRevokeRequest","description":"Request for auth.session.revoke — revoke a single session (path session_id; idempotent).","type":"object","required":["session_id"],"additionalProperties":false,"properties":{"session_id":{"type":"string","minLength":1,"description":"Path param; the session to revoke."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/SessionRevokeResult.json","response":{"title":"SessionRevokeResult","type":"object","description":"Result shared by auth.session.revoke (returns bare ok= true, since infrai_auth.session.revoke() returns None) and auth.session.revoke_all_for_user (returns count= int, the number of sessions revoked) — the two caps have genuinely different wire shapes, so both property sets are optional here.","required":[],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the session was revoked (auth.session.revoke only)"},"count":{"type":"integer","description":"Number of sessions revoked (auth.session.revoke_all_for_user only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"session_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'session_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"session_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"session_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"session_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"session_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"session_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"session_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"session_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/session/revoke/SESSION_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"session_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"session_id":"sample"}}},{"id":"auth.session.revoke_all_for_user","module":"auth","namespace":"auth","action":"session.revoke_all_for_user","method":"POST","path":"/v1/auth/session/revoke_all_for_user/{user_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Revoke all active sessions for a user (e.g. password reset / logout-everywhere). Accepts idempotency_key.","request_schema_ref":"auth/SessionRevokeAllRequest.json","params":{"title":"SessionRevokeAllRequest","description":"Request for auth.session.revoke_all_for_user — log out all devices for a user (path user_id).","type":"object","required":["user_id"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"Path param; revoke all this user's active sessions."},"except_session_id":{"type":["string","null"],"description":"Keep this one session alive (e.g. the current browser)."}}},"response_schema_ref":"auth/SessionRevokeResult.json","response":{"title":"SessionRevokeResult","type":"object","description":"Result shared by auth.session.revoke (returns bare ok= true, since infrai_auth.session.revoke() returns None) and auth.session.revoke_all_for_user (returns count= int, the number of sessions revoked) — the two caps have genuinely different wire shapes, so both property sets are optional here.","required":[],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the session was revoked (auth.session.revoke only)"},"count":{"type":"integer","description":"Number of sessions revoked (auth.session.revoke_all_for_user only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/session/revoke_all_for_user/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample"}}},{"id":"auth.session.verify","module":"auth","namespace":"auth","action":"session.verify","method":"GET","path":"/v1/auth/session/verify/{session_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Verify a session_id / JWT against the vendor JWKS (RS256+ES256) and return the Session.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/Session.json","response":{"title":"Session","description":"An active authenticated session.","type":"object","required":["session_id","user_id","started_at","expires_at"],"additionalProperties":false,"properties":{"session_id":{"type":"string","description":"Unique identifier for this session"},"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"started_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when execution started"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"ip":{"type":["string","null"],"description":"IP address from which the session was created"},"ua":{"type":["string","null"],"description":"User-Agent string from the session creation request"},"mfa_factor":{"type":["string","null"],"description":"Active MFA factor (see enums/AuthFactor)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/session/verify/SESSION_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/session/verify/SESSION_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.token.jwks","module":"auth","namespace":"auth","action":"token.jwks","method":"GET","path":"/v1/auth/token/jwks","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Return the public JWKS (EdDSA) for offline verification of Infrai-issued access JWTs — clients verify tokens with zero round-trips.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/JwksResult.json","response":{"title":"JwksResult","type":"object","description":"JSON Web Key Set for verifying JWTs issued by this auth service.","required":["keys"],"additionalProperties":false,"properties":{"keys":{"type":"array","items":{"type":"object"},"description":"List of JWK objects"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/token/jwks \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/token/jwks\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/token/jwks\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/token/jwks\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/token/jwks\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/token/jwks\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/token/jwks\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/token/jwks\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/token/jwks\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/token/jwks\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.user.create","module":"auth","namespace":"auth","action":"user.create","method":"POST","path":"/v1/auth/user/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create an auth user with an email and optional display name. Pins the vendor of record (infrai_native). Accepts idempotency_key.","request_schema_ref":"auth/UserCreateRequest.json","params":{"title":"UserCreateRequest","description":"Request for auth.user.create — create an auth user (vendor pinned at create). server-assigned user_id is returned, not sent.","type":"object","required":["email"],"additionalProperties":false,"properties":{"email":{"type":"string","format":"email","description":"Email address"},"password":{"type":["string","null"],"description":"Optional initial password (vendor-dependent)."},"name":{"type":["string","null"],"minLength":1,"description":"Optional end-user display name"},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"enum":["infrai_native",null],"description":"Explicit vendor pin (auth is self-operated: infrai_native only)."},"mode":{"type":"string","enum":["default_vendor","verified_account"],"default":"default_vendor","description":"Delivery mode or operation mode"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/auth/user/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/auth/user/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/auth/user/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/auth/user/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/auth/user/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com"}}},{"id":"auth.user.delete","module":"auth","namespace":"auth","action":"user.delete","method":"DELETE","path":"/v1/auth/user/delete/{user_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete an auth user and cascade-revoke its sessions. Accepts idempotency_key.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/UserDeleteResult.json","response":{"title":"UserDeleteResult","type":"object","description":"Result of deleting a user.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the user was deleted"},"user_id":{"type":["string","null"],"description":"Identifier of the deleted user"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/auth/user/delete/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/auth/user/delete/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/delete/USER_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/delete/USER_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/auth/user/delete/USER_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/delete/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/auth/user/delete/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/delete/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/delete/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/auth/user/delete/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.user.get","module":"auth","namespace":"auth","action":"user.get","method":"GET","path":"/v1/auth/user/get/{user_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Fetch a single auth user by user_id from its pinned vendor.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/user/get/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/user/get/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/get/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/get/USER_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/user/get/USER_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/get/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/user/get/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/get/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/get/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/user/get/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.user.get_by_email","module":"auth","namespace":"auth","action":"user.get_by_email","method":"GET","path":"/v1/auth/user/get_by_email","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Look up an auth user by email address.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/user/get_by_email \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/user/get_by_email\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/get_by_email\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/get_by_email\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/user/get_by_email\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/get_by_email\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/user/get_by_email\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/get_by_email\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/get_by_email\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/user/get_by_email\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.user.list","module":"auth","namespace":"auth","action":"user.list","method":"GET","path":"/v1/auth/user/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Cursor-paginated list of auth users for the account.","request_schema_ref":null,"params":{},"response_schema_ref":"auth/UserListResult.json","response":{"title":"UserListResult","type":"object","description":"Paginated list of users.","required":["items","next_cursor","total"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of user records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"},"total":{"type":"integer","description":"Number of items in this page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/auth/user/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/auth/user/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/auth/user/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/auth/user/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/auth/user/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"auth.user.update","module":"auth","namespace":"auth","action":"user.update","method":"PATCH","path":"/v1/auth/user/update/{user_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Update mutable profile fields (name and metadata) of an existing auth user. Email verification and MFA flags are system-managed. Accepts idempotency_key.","request_schema_ref":"auth/UserUpdateRequest.json","params":{"title":"UserUpdateRequest","description":"Request for auth.user.update — patch a user's mutable fields (path user_id).","type":"object","required":["user_id"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"Path param; the user to update."},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"Arbitrary key-value metadata attached to this resource"},"name":{"type":["string","null"],"minLength":1,"description":"End-user display name"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"auth/AuthUser.json","response":{"title":"AuthUser","description":"User record across auth vendors. See docs/phase2/P2_03_New_Modules.md §5.2.","type":"object","required":["user_id","email","email_verified","mfa_enabled","created_at"],"additionalProperties":false,"properties":{"user_id":{"type":"string","pattern":"^au_usr_[A-Za-z0-9]{20,}$","description":"User identifier associated with this resource"},"email":{"type":"string","format":"email","description":"Email address"},"email_verified":{"type":"boolean","default":false,"description":"Whether the email address has been verified"},"phone":{"type":["string","null"],"description":"Phone number in E.164 format"},"name":{"type":["string","null"],"description":"End-user display name"},"mfa_enabled":{"type":"boolean","default":false,"description":"Whether multi-factor authentication is enabled for this user"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_login_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last successful login"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"vendor":{"type":["string","null"],"description":"Sticky: vendor of record for this user."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/auth/user/update/USER_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"user_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/auth/user/update/USER_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'user_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/update/USER_ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/auth/user/update/USER_ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"user_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"user_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/auth/user/update/USER_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/auth/user/update/USER_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"user_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/auth/user/update/USER_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"user_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/auth/user/update/USER_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"user_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/auth/user/update/USER_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"user_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/auth/user/update/USER_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"user_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"user_id":"sample"}}},{"id":"captcha.verify","module":"captcha","namespace":"captcha","action":"verify","method":"POST","path":"/v1/captcha/verify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Verify a client-submitted CAPTCHA token against the vendor and return the success result; idempotent.","request_schema_ref":"captcha/CaptchaVerifyRequest.json","params":{"title":"CaptchaVerifyRequest","description":"Request for captcha.verify. Canonical param names (edge/module contract): use `ip` (alias `remoteip`), `action`, `score_threshold`, and result field `success` (NOT remote_ip/expected_action/min_score/valid).","type":"object","required":["widget_record_id","token"],"additionalProperties":false,"properties":{"widget_record_id":{"type":"string","minLength":1,"description":"Infrai widget ID returned by captcha.widget.create; selects the exact vendor and server-side secret."},"token":{"type":"string","minLength":1,"description":"One-time vendor response token from the client widget."},"vendor":{"type":["string","null"],"description":"Optional consistency assertion; must match the widget vendor when provided."},"ip":{"type":["string","null"],"description":"End-user IP for vendor-side risk scoring. Alias: `remoteip`."},"remoteip":{"type":["string","null"],"description":"Alias of `ip` (module accepts both; `ip = ip or remoteip`)."},"action":{"type":["string","null"],"description":"Action name bound at challenge time; rejected if mismatched (anti cross-form replay)."},"expected_hostname":{"type":["string","null"],"description":"If set, token hostname must match."},"score_threshold":{"type":["number","null"],"minimum":0,"maximum":1,"description":"Minimum acceptable score [0,1]; below → fail with low-score reason."},"mode":{"enum":["default_vendor","verified_account"],"default":"default_vendor","description":"Routing axis (CaptchaMode); orthogonal to widget_mode."},"sitekey_label":{"type":"string","default":"default","description":"Deprecated compatibility hint; widget_record_id selects the exact sitekey and secret."}}},"response_schema_ref":"captcha/CaptchaVerification.json","response":{"title":"CaptchaVerification","description":"Result of captcha.verify; normalizes vendor scores into [0,1].","type":"object","required":["success","vendor","challenge_ts"],"additionalProperties":false,"properties":{"success":{"type":"boolean","description":"Whether the captcha verification passed"},"score":{"type":["number","null"],"minimum":0,"maximum":1,"description":"0=bot, 1=human (normalized)."},"hostname":{"type":["string","null"],"description":"Hostname of the site where the captcha was solved"},"action":{"type":["string","null"],"description":"Action performed (e.g. created, updated, deleted)"},"challenge_ts":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the captcha challenge was issued"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"reasons":{"type":"array","items":{"type":"string","enum":["timeout-or-duplicate","invalid-input-response","invalid-sitekey","low-score","hostname-mismatch"],"description":"Failure / signal reason codes returned by vendor (normalized)."},"description":"List of reasons contributing to the risk score"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CAPTCHA_DUPLICATE","CAPTCHA_EXPIRED","CAPTCHA_HOSTNAME_MISMATCH","CAPTCHA_INVALID_TOKEN","CAPTCHA_RATE_LIMIT","CAPTCHA_SCORE_TOO_LOW","CAPTCHA_TOKEN_EXPIRED","CAPTCHA_TOKEN_INVALID","CAPTCHA_TOO_MANY_FAILS","CAPTCHA_VENDOR_DOWN","CAPTCHA_WIDGET_NOT_FOUND","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/captcha/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"widget_record_id\": \"sample\", \"token\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/captcha/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'widget_record_id': 'sample', 'token': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Browser prerequisite: fetch the public WidgetSetup from your server; never expose INFRAI_API_KEY.\nconst widget = await fetch(\"/captcha-config\").then((r) => r.json());\nconst script = document.createElement(\"script\");\nscript.src = widget.embed_url;\nscript.onload = () => turnstile.render(\"#captcha\", {\n  sitekey: widget.sitekey, action: \"signup\",\n  callback: (token) => fetch(\"/signup\", {\n    method: \"POST\", headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify({ token, widget_record_id: widget.widget_record_id }),\n  }),\n});\ndocument.head.appendChild(script); // page contains <div id=\"captcha\"></div>\n\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"widget_record_id\": \"sample\", \"token\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"declare const turnstile: { render(selector: string, options: { sitekey: string; action: string; callback(token: string): void }): void };\n// Browser prerequisite: fetch the public WidgetSetup from your server; never expose INFRAI_API_KEY.\nconst widget = await fetch(\"/captcha-config\").then((r) => r.json());\nconst script = document.createElement(\"script\");\nscript.src = widget.embed_url;\nscript.onload = () => turnstile.render(\"#captcha\", {\n  sitekey: widget.sitekey, action: \"signup\",\n  callback: (token) => fetch(\"/signup\", {\n    method: \"POST\", headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify({ token, widget_record_id: widget.widget_record_id }),\n  }),\n});\ndocument.head.appendChild(script); // page contains <div id=\"captcha\"></div>\n\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"widget_record_id\": \"sample\", \"token\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"widget_record_id\": \"sample\", \"token\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/captcha/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/captcha/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"widget_record_id\\\": \\\"sample\\\", \\\"token\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/captcha/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"widget_record_id\\\": \\\"sample\\\", \\\"token\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/captcha/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"widget_record_id\\\": \\\"sample\\\", \\\"token\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/captcha/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"widget_record_id\": \"sample\", \"token\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/captcha/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"widget_record_id\": \"sample\", \"token\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"widget_record_id":"sample","token":"sample"}}},{"id":"captcha.widget.create","module":"captcha","namespace":"captcha","action":"widget.create","method":"POST","path":"/v1/captcha/widget/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create and manage a CAPTCHA widget through Infrai; returns the public sitekey and browser embed snippet while keeping the vendor secret server-side.","request_schema_ref":"captcha/WidgetCreateRequest.json","params":{"title":"WidgetCreateRequest","description":"Request for captcha.widget.create. `mode` (routing axis) and `widget_mode` (vendor render axis) are orthogonal and must not be merged.","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human label; also the verify-time sitekey_label hint."},"domains":{"type":"array","items":{"type":"string"},"description":"Allowed hostnames for this sitekey."},"vendor":{"enum":["hcaptcha","turnstile",null],"description":"Optional vendor pin. hCaptcha is the default and registers a dashboard-created sitekey; Turnstile remains supported."},"mode":{"enum":["default_vendor","verified_account"],"default":"default_vendor","description":"Routing axis (CaptchaMode)."},"widget_mode":{"enum":["managed","non-interactive","invisible"],"default":"managed","description":"Vendor render axis (orthogonal to mode)."}}},"response_schema_ref":"captcha/WidgetSetup.json","response":{"title":"WidgetSetup","description":"Public CAPTCHA widget configuration returned by Infrai. Vendor secrets are encrypted server-side and are never included in this response.","type":"object","required":["widget_record_id","name","vendor","status","sitekey","embed_url","embed_snippet","created_at"],"additionalProperties":false,"properties":{"widget_record_id":{"type":"string","description":"Infrai widget ID; pass it to widget.get and captcha.verify."},"name":{"type":"string","description":"Human label; doubles as verify-time sitekey_label hint."},"vendor":{"type":"string"},"status":{"const":"provisioned","description":"The vendor widget and its server-side verification secret were provisioned successfully."},"sitekey":{"type":"string","minLength":1,"description":"Public; embed in client HTML."},"widget_id":{"type":["string","null"],"description":"Vendor-side widget identifier."},"domains":{"type":"array","items":{"type":"string"}},"embed_url":{"type":"string","format":"uri","description":"Public vendor browser script URL."},"embed_snippet":{"type":"string","minLength":1,"description":"Copy-paste browser HTML snippet."},"dashboard_url":{"type":["string","null"],"description":"Optional operator-only vendor reference URL."},"message":{"type":["string","null"],"description":"Optional provisioning note."},"metadata":{"type":["object","null"]},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CAPTCHA_DUPLICATE","CAPTCHA_EXPIRED","CAPTCHA_HOSTNAME_MISMATCH","CAPTCHA_INVALID_TOKEN","CAPTCHA_RATE_LIMIT","CAPTCHA_SCORE_TOO_LOW","CAPTCHA_TOKEN_EXPIRED","CAPTCHA_TOKEN_INVALID","CAPTCHA_TOO_MANY_FAILS","CAPTCHA_VENDOR_DOWN","CAPTCHA_WIDGET_NOT_FOUND","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/captcha/widget/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/captcha/widget/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/captcha/widget/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/captcha/widget/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/captcha/widget/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/captcha/widget/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/captcha/widget/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/captcha/widget/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"captcha.widget.get","module":"captcha","namespace":"captcha","action":"widget.get","method":"GET","path":"/v1/captcha/widget/get/{widget_record_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get this account's CAPTCHA widget and public browser configuration.","request_schema_ref":"captcha/WidgetGetRequest.json","params":{"title":"WidgetGetRequest","description":"Request for captcha.widget.get. Look up a single widget by store primary key.","type":"object","required":["widget_record_id"],"additionalProperties":false,"properties":{"widget_record_id":{"type":"string","description":"WidgetStore primary key."}}},"response_schema_ref":"captcha/WidgetSetup.json","response":{"title":"WidgetSetup","description":"Public CAPTCHA widget configuration returned by Infrai. Vendor secrets are encrypted server-side and are never included in this response.","type":"object","required":["widget_record_id","name","vendor","status","sitekey","embed_url","embed_snippet","created_at"],"additionalProperties":false,"properties":{"widget_record_id":{"type":"string","description":"Infrai widget ID; pass it to widget.get and captcha.verify."},"name":{"type":"string","description":"Human label; doubles as verify-time sitekey_label hint."},"vendor":{"type":"string"},"status":{"const":"provisioned","description":"The vendor widget and its server-side verification secret were provisioned successfully."},"sitekey":{"type":"string","minLength":1,"description":"Public; embed in client HTML."},"widget_id":{"type":["string","null"],"description":"Vendor-side widget identifier."},"domains":{"type":"array","items":{"type":"string"}},"embed_url":{"type":"string","format":"uri","description":"Public vendor browser script URL."},"embed_snippet":{"type":"string","minLength":1,"description":"Copy-paste browser HTML snippet."},"dashboard_url":{"type":["string","null"],"description":"Optional operator-only vendor reference URL."},"message":{"type":["string","null"],"description":"Optional provisioning note."},"metadata":{"type":["object","null"]},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CAPTCHA_DUPLICATE","CAPTCHA_EXPIRED","CAPTCHA_HOSTNAME_MISMATCH","CAPTCHA_INVALID_TOKEN","CAPTCHA_RATE_LIMIT","CAPTCHA_SCORE_TOO_LOW","CAPTCHA_TOKEN_EXPIRED","CAPTCHA_TOKEN_INVALID","CAPTCHA_TOO_MANY_FAILS","CAPTCHA_VENDOR_DOWN","CAPTCHA_WIDGET_NOT_FOUND","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/captcha/widget/get/WIDGET_RECORD_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"widget_record_id":"sample"}}},{"id":"captcha.widget.list","module":"captcha","namespace":"captcha","action":"widget.list","method":"GET","path":"/v1/captcha/widget/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List this account's CAPTCHA widgets.","request_schema_ref":"captcha/WidgetListRequest.json","params":{"title":"WidgetListRequest","description":"Request for captcha.widget.list. Cursor pagination over WidgetStore.","type":"object","additionalProperties":false,"properties":{"vendor":{"type":["string","null"],"description":"Optional filter by vendor."},"cursor":{"type":["string","null"],"description":"Opaque cursor from a previous page; null = first page."},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":50}}},"response_schema_ref":"captcha/WidgetListResult.json","response":{"title":"WidgetListResult","description":"Paginated result for captcha.widget.list. items are WidgetSetup records.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"WidgetSetup","description":"Public CAPTCHA widget configuration returned by Infrai. Vendor secrets are encrypted server-side and are never included in this response.","type":"object","required":["widget_record_id","name","vendor","status","sitekey","embed_url","embed_snippet","created_at"],"additionalProperties":false,"properties":{"widget_record_id":{"type":"string","description":"Infrai widget ID; pass it to widget.get and captcha.verify."},"name":{"type":"string","description":"Human label; doubles as verify-time sitekey_label hint."},"vendor":{"type":"string"},"status":{"const":"provisioned","description":"The vendor widget and its server-side verification secret were provisioned successfully."},"sitekey":{"type":"string","minLength":1,"description":"Public; embed in client HTML."},"widget_id":{"type":["string","null"],"description":"Vendor-side widget identifier."},"domains":{"type":"array","items":{"type":"string"}},"embed_url":{"type":"string","format":"uri","description":"Public vendor browser script URL."},"embed_snippet":{"type":"string","minLength":1,"description":"Copy-paste browser HTML snippet."},"dashboard_url":{"type":["string","null"],"description":"Optional operator-only vendor reference URL."},"message":{"type":["string","null"],"description":"Optional provisioning note."},"metadata":{"type":["object","null"]},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}}},"total_count":{"type":"integer","minimum":0,"description":"Optional; may be omitted for high-cardinality lists."},"next_cursor":{"type":["string","null"],"description":"Pass back into list() to fetch the next page. null = end."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CAPTCHA_DUPLICATE","CAPTCHA_EXPIRED","CAPTCHA_HOSTNAME_MISMATCH","CAPTCHA_INVALID_TOKEN","CAPTCHA_RATE_LIMIT","CAPTCHA_SCORE_TOO_LOW","CAPTCHA_TOKEN_EXPIRED","CAPTCHA_TOKEN_INVALID","CAPTCHA_TOO_MANY_FAILS","CAPTCHA_VENDOR_DOWN","CAPTCHA_WIDGET_NOT_FOUND","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/captcha/widget/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/captcha/widget/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/captcha/widget/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/captcha/widget/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/captcha/widget/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/captcha/widget/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/captcha/widget/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/captcha/widget/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/captcha/widget/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.create","module":"scheduling","namespace":"cron","action":"create","method":"POST","path":"/v1/cron/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create a scheduled job: recurring via cron_expr, or a one-shot via run_at (fires once); idempotent write.","request_schema_ref":"scheduling/CronCreateRequest.json","params":{"title":"CronCreateRequest","description":"Request shape for cron.create. A job is EITHER recurring (provide cron_expr) OR a one-shot (provide run_at, an absolute time — fires once via max_runs=1; supersedes the retired scheduling.task.schedule). Exposes the full module schedule() surface (task / overlap_policy / on_failure_webhook / timezone / retry / timeout). See REVIEW Scheduling §3.A and docs/Infrai_SDK_Scheduling.md §1.","type":"object","required":["task"],"oneOf":[{"required":["cron_expr"]},{"required":["run_at"]}],"additionalProperties":false,"properties":{"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression (recurring schedule). Mutually exclusive with run_at."},"run_at":{"type":"string","format":"date-time","description":"Absolute UTC time for a ONE-SHOT job that fires exactly once (max_runs=1). Mutually exclusive with cron_expr."},"task":{"type":"string","format":"uri","description":"Delivery target URL the cron fires against (http_url task type)."},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"timezone":{"type":"string","default":"UTC","description":"IANA tz name."},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Maximum execution time in seconds"},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"secret":{"type":["string","null"],"description":"HMAC signing secret for the fired request; never returned (only secret_fingerprint)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/CronJob.json","response":{"title":"CronJob","type":"object","required":["job_id","cron_expr","task_type","enabled","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression."},"task_type":{"enum":["http_url","function_ref"],"description":"Type of task (http, serverless)"},"task_url":{"type":["string","null"],"format":"uri","description":"URL to call when the cron job triggers"},"task_function_name":{"type":["string","null"],"description":"Serverless function name to invoke"},"timezone":{"type":"string","default":"UTC","description":"IANA timezone for the cron schedule"},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Standard/Pro hard max 900s (15 min). Enterprise contract may override per-tier."},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"status":{"enum":["active","disabled","exhausted","deleted"],"description":"Current status of this resource"},"next_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the next scheduled run"},"last_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last cron run"},"last_run_status":{"enum":["succeeded","failed","skipped",null],"description":"Status of the last cron run"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/cron/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"task\": \"https://example.com/callback\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/cron/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'task': 'https://example.com/callback'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"task\": \"https://example.com/callback\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"task\": \"https://example.com/callback\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"task\": \"https://example.com/callback\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/cron/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"task\\\": \\\"https://example.com/callback\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/cron/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"task\\\": \\\"https://example.com/callback\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"task\\\": \\\"https://example.com/callback\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"task\": \"https://example.com/callback\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/cron/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"task\": \"https://example.com/callback\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"task":"https://example.com/callback"}}},{"id":"cron.delete","module":"scheduling","namespace":"cron","action":"delete","method":"DELETE","path":"/v1/cron/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a cron job and stop all of its future scheduled runs; idempotent.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/CronDeleteResult.json","response":{"title":"CronDeleteResult","type":"object","description":"Result of deleting a cron job.","required":["cron_id","deleted"],"additionalProperties":false,"properties":{"cron_id":{"type":"string","description":"Identifier of the (attempted) deleted cron job"},"deleted":{"type":"boolean","description":"Whether the cron job was deleted"},"status":{"type":["string","null"],"enum":["not_found",null],"description":"Set to 'not_found' when the job did not exist (deleted=false)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/cron/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/cron/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/cron/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/cron/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/cron/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.get","module":"scheduling","namespace":"cron","action":"get","method":"GET","path":"/v1/cron/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get a single cron job's configuration and next run time.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/CronJob.json","response":{"title":"CronJob","type":"object","required":["job_id","cron_expr","task_type","enabled","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression."},"task_type":{"enum":["http_url","function_ref"],"description":"Type of task (http, serverless)"},"task_url":{"type":["string","null"],"format":"uri","description":"URL to call when the cron job triggers"},"task_function_name":{"type":["string","null"],"description":"Serverless function name to invoke"},"timezone":{"type":"string","default":"UTC","description":"IANA timezone for the cron schedule"},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Standard/Pro hard max 900s (15 min). Enterprise contract may override per-tier."},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"status":{"enum":["active","disabled","exhausted","deleted"],"description":"Current status of this resource"},"next_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the next scheduled run"},"last_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last cron run"},"last_run_status":{"enum":["succeeded","failed","skipped",null],"description":"Status of the last cron run"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/cron/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/cron/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/cron/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/cron/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/cron/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.list","module":"scheduling","namespace":"cron","action":"list","method":"GET","path":"/v1/cron/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List the account's cron jobs with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/CronListResult.json","response":{"title":"CronListResult","type":"object","description":"Paginated list of cron jobs.","required":["items","next_cursor"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of cron job records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/cron/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/cron/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/cron/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/cron/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/cron/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.pause","module":"scheduling","namespace":"cron","action":"pause","method":"POST","path":"/v1/cron/pause/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Pause a cron job, halting subsequent triggers.","request_schema_ref":"scheduling/CronActionRequest.json","params":{"title":"CronActionRequest","description":"Request shape for cron lifecycle actions (cron.pause / .resume / .trigger). Returns the updated CronJob (pause/resume) or the fired CronRun (trigger).","type":"object","required":["cron_id"],"additionalProperties":false,"properties":{"cron_id":{"type":"string","description":"Id of the cron job to act on."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/CronJob.json","response":{"title":"CronJob","type":"object","required":["job_id","cron_expr","task_type","enabled","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression."},"task_type":{"enum":["http_url","function_ref"],"description":"Type of task (http, serverless)"},"task_url":{"type":["string","null"],"format":"uri","description":"URL to call when the cron job triggers"},"task_function_name":{"type":["string","null"],"description":"Serverless function name to invoke"},"timezone":{"type":"string","default":"UTC","description":"IANA timezone for the cron schedule"},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Standard/Pro hard max 900s (15 min). Enterprise contract may override per-tier."},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"status":{"enum":["active","disabled","exhausted","deleted"],"description":"Current status of this resource"},"next_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the next scheduled run"},"last_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last cron run"},"last_run_status":{"enum":["succeeded","failed","skipped",null],"description":"Status of the last cron run"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/cron/pause/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"cron_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/cron/pause/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'cron_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/pause/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/pause/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"cron_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/cron/pause/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/pause/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"cron_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/cron/pause/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"cron_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/pause/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"cron_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/pause/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"cron_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/cron/pause/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"cron_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"cron_id":"sample"}}},{"id":"cron.resume","module":"scheduling","namespace":"cron","action":"resume","method":"POST","path":"/v1/cron/resume/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Resume a paused cron job.","request_schema_ref":"scheduling/CronActionRequest.json","params":{"title":"CronActionRequest","description":"Request shape for cron lifecycle actions (cron.pause / .resume / .trigger). Returns the updated CronJob (pause/resume) or the fired CronRun (trigger).","type":"object","required":["cron_id"],"additionalProperties":false,"properties":{"cron_id":{"type":"string","description":"Id of the cron job to act on."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/CronJob.json","response":{"title":"CronJob","type":"object","required":["job_id","cron_expr","task_type","enabled","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression."},"task_type":{"enum":["http_url","function_ref"],"description":"Type of task (http, serverless)"},"task_url":{"type":["string","null"],"format":"uri","description":"URL to call when the cron job triggers"},"task_function_name":{"type":["string","null"],"description":"Serverless function name to invoke"},"timezone":{"type":"string","default":"UTC","description":"IANA timezone for the cron schedule"},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Standard/Pro hard max 900s (15 min). Enterprise contract may override per-tier."},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"status":{"enum":["active","disabled","exhausted","deleted"],"description":"Current status of this resource"},"next_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the next scheduled run"},"last_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last cron run"},"last_run_status":{"enum":["succeeded","failed","skipped",null],"description":"Status of the last cron run"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/cron/resume/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"cron_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/cron/resume/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'cron_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/resume/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/resume/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"cron_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/cron/resume/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/resume/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"cron_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/cron/resume/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"cron_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/resume/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"cron_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/resume/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"cron_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/cron/resume/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"cron_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"cron_id":"sample"}}},{"id":"cron.runs.get","module":"scheduling","namespace":"cron","action":"runs.get","method":"GET","path":"/v1/cron/runs/get/{id}/{run_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Retrieve details of a single cron job execution (CronRun).","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/CronRun.json","response":{"title":"CronRun","description":"One execution attempt of a CronJob. See docs/Infrai_SDK_Scheduling.md §1.6 and enums/cron_run_status.yaml.","type":"object","required":["run_id","job_id","account_id","scheduled_at","fired_at","status","retry_count","is_manual_trigger"],"additionalProperties":false,"properties":{"run_id":{"type":"string","pattern":"^cronrun_[A-Za-z0-9]{20,}$","description":"Unique identifier for this cron run"},"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"scheduled_at":{"type":"string","format":"date-time","description":"Time computed from the cron expression."},"fired_at":{"type":"string","format":"date-time","description":"Actual trigger time (may drift a few ms)."},"started_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution started"},"completed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution completed"},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Duration of the operation in milliseconds"},"status":{"enum":["queued","running","succeeded","failed","timeout","skipped"],"description":"Current status of this resource"},"skipped_reason":{"type":["string","null"],"enum":["overlap_skip","max_runs_reached","disabled",null],"description":"Reason the run was skipped"},"retry_count":{"type":"integer","minimum":0,"description":"Number of retries for this run"},"is_manual_trigger":{"type":"boolean","description":"Whether this run was triggered manually"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"output":{"type":["string","null"],"description":"First 4 KB of response body."},"error":{"type":["string","null"],"description":"Error message if the operation failed"},"error_code":{"type":["string","null"],"description":"Error code from the failed execution"},"on_failure_webhook_delivery_id":{"type":["string","null"],"pattern":"^dlv_[A-Za-z0-9]{20,}$","description":"Webhook delivery ID for the failure notification"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/cron/runs/get/ID/RUN_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.runs.list","module":"scheduling","namespace":"cron","action":"runs.list","method":"GET","path":"/v1/cron/runs/list/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List a cron job's run history (executions) with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/CronRunList.json","response":{"title":"CronRunList","description":"Paginated result for cron.runs.list — a cron job's run history (array of CronRun rows) with cursor pagination. See REVIEW Scheduling §3.A.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"CronRun","description":"One execution attempt of a CronJob. See docs/Infrai_SDK_Scheduling.md §1.6 and enums/cron_run_status.yaml.","type":"object","required":["run_id","job_id","account_id","scheduled_at","fired_at","status","retry_count","is_manual_trigger"],"additionalProperties":false,"properties":{"run_id":{"type":"string","pattern":"^cronrun_[A-Za-z0-9]{20,}$","description":"Unique identifier for this cron run"},"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"scheduled_at":{"type":"string","format":"date-time","description":"Time computed from the cron expression."},"fired_at":{"type":"string","format":"date-time","description":"Actual trigger time (may drift a few ms)."},"started_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution started"},"completed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution completed"},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Duration of the operation in milliseconds"},"status":{"enum":["queued","running","succeeded","failed","timeout","skipped"],"description":"Current status of this resource"},"skipped_reason":{"type":["string","null"],"enum":["overlap_skip","max_runs_reached","disabled",null],"description":"Reason the run was skipped"},"retry_count":{"type":"integer","minimum":0,"description":"Number of retries for this run"},"is_manual_trigger":{"type":"boolean","description":"Whether this run was triggered manually"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"output":{"type":["string","null"],"description":"First 4 KB of response body."},"error":{"type":["string","null"],"description":"Error message if the operation failed"},"error_code":{"type":["string","null"],"description":"Error code from the failed execution"},"on_failure_webhook_delivery_id":{"type":["string","null"],"pattern":"^dlv_[A-Za-z0-9]{20,}$","description":"Webhook delivery ID for the failure notification"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/cron/runs/list/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/cron/runs/list/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/runs/list/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/runs/list/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/cron/runs/list/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/runs/list/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/cron/runs/list/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/runs/list/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/runs/list/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/cron/runs/list/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"cron.trigger","module":"scheduling","namespace":"cron","action":"trigger","method":"POST","path":"/v1/cron/trigger/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Manually trigger an immediate run of a scheduled cron job.","request_schema_ref":"scheduling/CronActionRequest.json","params":{"title":"CronActionRequest","description":"Request shape for cron lifecycle actions (cron.pause / .resume / .trigger). Returns the updated CronJob (pause/resume) or the fired CronRun (trigger).","type":"object","required":["cron_id"],"additionalProperties":false,"properties":{"cron_id":{"type":"string","description":"Id of the cron job to act on."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/CronRun.json","response":{"title":"CronRun","description":"One execution attempt of a CronJob. See docs/Infrai_SDK_Scheduling.md §1.6 and enums/cron_run_status.yaml.","type":"object","required":["run_id","job_id","account_id","scheduled_at","fired_at","status","retry_count","is_manual_trigger"],"additionalProperties":false,"properties":{"run_id":{"type":"string","pattern":"^cronrun_[A-Za-z0-9]{20,}$","description":"Unique identifier for this cron run"},"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"scheduled_at":{"type":"string","format":"date-time","description":"Time computed from the cron expression."},"fired_at":{"type":"string","format":"date-time","description":"Actual trigger time (may drift a few ms)."},"started_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution started"},"completed_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when execution completed"},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Duration of the operation in milliseconds"},"status":{"enum":["queued","running","succeeded","failed","timeout","skipped"],"description":"Current status of this resource"},"skipped_reason":{"type":["string","null"],"enum":["overlap_skip","max_runs_reached","disabled",null],"description":"Reason the run was skipped"},"retry_count":{"type":"integer","minimum":0,"description":"Number of retries for this run"},"is_manual_trigger":{"type":"boolean","description":"Whether this run was triggered manually"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"output":{"type":["string","null"],"description":"First 4 KB of response body."},"error":{"type":["string","null"],"description":"Error message if the operation failed"},"error_code":{"type":["string","null"],"description":"Error code from the failed execution"},"on_failure_webhook_delivery_id":{"type":["string","null"],"pattern":"^dlv_[A-Za-z0-9]{20,}$","description":"Webhook delivery ID for the failure notification"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/cron/trigger/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"cron_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/cron/trigger/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'cron_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/trigger/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/trigger/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"cron_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"cron_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/cron/trigger/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/trigger/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"cron_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/cron/trigger/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"cron_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/trigger/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"cron_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/trigger/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"cron_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/cron/trigger/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"cron_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"cron_id":"sample"}}},{"id":"cron.update","module":"scheduling","namespace":"cron","action":"update","method":"PATCH","path":"/v1/cron/update/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Update a cron job's schedule expression, target, overlap policy, and other fields.","request_schema_ref":"scheduling/CronUpdateRequest.json","params":{"title":"CronUpdateRequest","description":"Request shape for cron.update. Partial update; preserves job_id + run history. See REVIEW Scheduling §3.A.","type":"object","additionalProperties":false,"properties":{"cron_expr":{"type":["string","null"],"description":"Cron expression for the schedule"},"task":{"type":["string","null"],"format":"uri","description":"Task URL or function to invoke on trigger"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"timezone":{"type":["string","null"],"description":"IANA tz name."},"retry":{"type":["integer","null"],"minimum":0,"maximum":10,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":["integer","null"],"minimum":1,"maximum":900,"description":"Maximum execution time in seconds"},"overlap_policy":{"type":["string","null"],"enum":["allow","skip","queue",null],"description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/CronJob.json","response":{"title":"CronJob","type":"object","required":["job_id","cron_expr","task_type","enabled","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^cron_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"cron_expr":{"type":"string","description":"Standard 5/6-field cron expression."},"task_type":{"enum":["http_url","function_ref"],"description":"Type of task (http, serverless)"},"task_url":{"type":["string","null"],"format":"uri","description":"URL to call when the cron job triggers"},"task_function_name":{"type":["string","null"],"description":"Serverless function name to invoke"},"timezone":{"type":"string","default":"UTC","description":"IANA timezone for the cron schedule"},"retry":{"type":"integer","minimum":0,"maximum":10,"default":3,"description":"Retry configuration for failed executions"},"timeout_seconds":{"type":"integer","minimum":1,"maximum":900,"default":300,"description":"Standard/Pro hard max 900s (15 min). Enterprise contract may override per-tier."},"overlap_policy":{"enum":["allow","skip","queue"],"default":"skip","description":"Policy for handling overlapping runs (skip, queue, cancel)"},"max_runs":{"type":["integer","null"],"minimum":1,"description":"Maximum number of runs to retain"},"payload":{"type":["object","null"],"description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"on_failure_webhook":{"type":["string","null"],"format":"uri","description":"Webhook URL to call on execution failure"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"status":{"enum":["active","disabled","exhausted","deleted"],"description":"Current status of this resource"},"next_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the next scheduled run"},"last_run_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last cron run"},"last_run_status":{"enum":["succeeded","failed","skipped",null],"description":"Status of the last cron run"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/cron/update/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/cron/update/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/cron/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/cron/update/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/cron/update/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/cron/update/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/cron/update/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/cron/update/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/cron/update/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"db.branch.create","module":"db","namespace":"db","action":"branch.create","method":"POST","path":"/v1/db/branch/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"db branch create — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":"db/BranchCreateRequest.json","params":{"title":"BranchCreateRequest","description":"Request for db.branch.create — branch/clone a project off an existing branch.","type":"object","required":["project_id","branch_name"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Parent project id."},"branch_name":{"type":"string","minLength":1,"description":"Name of the database branch"},"from_branch":{"type":"string","default":"main","description":"Source branch to clone from."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"db/DbBranch.json","response":{"title":"DbBranch","description":"A branch / clone of a DbInstance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","branch_name","created_at","state"],"additionalProperties":false,"properties":{"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"branch_name":{"type":"string","description":"Name of the database branch"},"parent":{"type":["string","null"],"default":"main","description":"Parent branch name"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"state":{"enum":["creating","active","promoting","failed","deleted"],"description":"Current lifecycle state of this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/db/branch/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"project_id\": \"sample\", \"branch_name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/db/branch/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'project_id': 'sample', 'branch_name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"project_id\": \"sample\", \"branch_name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"project_id\": \"sample\", \"branch_name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"project_id\": \"sample\", \"branch_name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/db/branch/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/branch/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"project_id\\\": \\\"sample\\\", \\\"branch_name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/db/branch/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"project_id\\\": \\\"sample\\\", \\\"branch_name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/branch/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"project_id\\\": \\\"sample\\\", \\\"branch_name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/branch/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"project_id\": \"sample\", \"branch_name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/db/branch/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"project_id\": \"sample\", \"branch_name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"project_id":"sample","branch_name":"example"}}},{"id":"db.branch.delete","module":"db","namespace":"db","action":"branch.delete","method":"DELETE","path":"/v1/db/branch/delete/{project_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db branch delete — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbBranch.json","response":{"title":"DbBranch","description":"A branch / clone of a DbInstance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","branch_name","created_at","state"],"additionalProperties":false,"properties":{"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"branch_name":{"type":"string","description":"Name of the database branch"},"parent":{"type":["string","null"],"default":"main","description":"Parent branch name"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"state":{"enum":["creating","active","promoting","failed","deleted"],"description":"Current lifecycle state of this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/db/branch/delete/PROJECT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.branch.get","module":"db","namespace":"db","action":"branch.get","method":"GET","path":"/v1/db/branch/get/{project_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db branch get — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbBranch.json","response":{"title":"DbBranch","description":"A branch / clone of a DbInstance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","branch_name","created_at","state"],"additionalProperties":false,"properties":{"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"branch_name":{"type":"string","description":"Name of the database branch"},"parent":{"type":["string","null"],"default":"main","description":"Parent branch name"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"state":{"enum":["creating","active","promoting","failed","deleted"],"description":"Current lifecycle state of this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/branch/get/PROJECT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/branch/get/PROJECT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.branch.list","module":"db","namespace":"db","action":"branch.list","method":"GET","path":"/v1/db/branch/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db branch list — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbBranchListResult.json","response":{"title":"DbBranchListResult","type":"object","description":"Paginated list of database branches.","required":["items","next_cursor"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of database branch records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/branch/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/branch/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/branch/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/branch/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/branch/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/branch/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/branch/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/branch/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/branch/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.project.create","module":"db","namespace":"db","action":"project.create","method":"POST","path":"/v1/db/project/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"db project create — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":"db/ProjectCreateRequest.json","params":{"title":"ProjectCreateRequest","description":"Request for db.project.create — provision a managed Postgres-compatible project (vendor sticky after create).","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"description":"Human-readable name for this resource"},"vendor":{"type":["string","null"],"enum":["tencent_pg",null],"description":"Explicit vendor pin (db is self-operated: tencent_pg only)."},"region":{"type":"string","default":"us-east-1","description":"Geographic region where this resource is located or processed"},"plan":{"type":"string","enum":["hobby","pro","scale"],"default":"hobby","description":"Pricing plan for the database instance"},"mode":{"type":"string","enum":["default_vendor","verified_account"],"default":"default_vendor","description":"Delivery mode or operation mode"},"postgres_version":{"type":"string","default":"15","description":"PostgreSQL version for the database"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"db/DbInstance.json","response":{"title":"DbInstance","description":"A managed Postgres-compatible database instance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","name","vendor","plan","state","created_at"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Unique identifier for the parent db project"},"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"plan":{"description":"Pricing plan for the database instance","type":"string","enum":["hobby","pro","scale"]},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["provisioning","active","paused","deleting","deleted","failed"]},"postgres_version":{"type":["string","null"],"description":"e.g. \"15.4\"."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"primary_branch":{"type":["string","null"],"default":"main","description":"Name of the primary branch"},"mode":{"type":"string","enum":["default_vendor","verified_account"],"description":"Delivery mode or operation mode"},"vendor_db_id":{"type":"string","description":"Vendor-side identifier for the physical database"},"metadata":{"type":"object","description":"Request accounting metadata captured at creation time","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"latency_ms":{"type":"integer","minimum":0},"entry_form":{"type":"string"},"cost_usd":{"type":"number"},"vendor":{"type":"string"},"vendor_region":{"type":"string"},"markup_pct":{"type":"number"},"trace_id":{"type":"string"},"mode":{"type":"string"}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/db/project/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/db/project/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/db/project/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/project/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/db/project/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/project/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/project/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/db/project/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"db.project.delete","module":"db","namespace":"db","action":"project.delete","method":"DELETE","path":"/v1/db/project/delete/{project_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db project delete — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbInstance.json","response":{"title":"DbInstance","description":"A managed Postgres-compatible database instance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","name","vendor","plan","state","created_at"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Unique identifier for the parent db project"},"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"plan":{"description":"Pricing plan for the database instance","type":"string","enum":["hobby","pro","scale"]},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["provisioning","active","paused","deleting","deleted","failed"]},"postgres_version":{"type":["string","null"],"description":"e.g. \"15.4\"."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"primary_branch":{"type":["string","null"],"default":"main","description":"Name of the primary branch"},"mode":{"type":"string","enum":["default_vendor","verified_account"],"description":"Delivery mode or operation mode"},"vendor_db_id":{"type":"string","description":"Vendor-side identifier for the physical database"},"metadata":{"type":"object","description":"Request accounting metadata captured at creation time","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"latency_ms":{"type":"integer","minimum":0},"entry_form":{"type":"string"},"cost_usd":{"type":"number"},"vendor":{"type":"string"},"vendor_region":{"type":"string"},"markup_pct":{"type":"number"},"trace_id":{"type":"string"},"mode":{"type":"string"}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/db/project/delete/PROJECT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/db/project/delete/PROJECT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.project.get","module":"db","namespace":"db","action":"project.get","method":"GET","path":"/v1/db/project/get/{project_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db project get — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbInstance.json","response":{"title":"DbInstance","description":"A managed Postgres-compatible database instance. See docs/phase2/P2_03_New_Modules.md §3.2.","type":"object","required":["db_id","name","vendor","plan","state","created_at"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Unique identifier for the parent db project"},"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"plan":{"description":"Pricing plan for the database instance","type":"string","enum":["hobby","pro","scale"]},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["provisioning","active","paused","deleting","deleted","failed"]},"postgres_version":{"type":["string","null"],"description":"e.g. \"15.4\"."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"primary_branch":{"type":["string","null"],"default":"main","description":"Name of the primary branch"},"mode":{"type":"string","enum":["default_vendor","verified_account"],"description":"Delivery mode or operation mode"},"vendor_db_id":{"type":"string","description":"Vendor-side identifier for the physical database"},"metadata":{"type":"object","description":"Request accounting metadata captured at creation time","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"latency_ms":{"type":"integer","minimum":0},"entry_form":{"type":"string"},"cost_usd":{"type":"number"},"vendor":{"type":"string"},"vendor_region":{"type":"string"},"markup_pct":{"type":"number"},"trace_id":{"type":"string"},"mode":{"type":"string"}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/project/get/PROJECT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/project/get/PROJECT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.project.list","module":"db","namespace":"db","action":"project.list","method":"GET","path":"/v1/db/project/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db project list — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/DbProjectListResult.json","response":{"title":"DbProjectListResult","type":"object","description":"Paginated list of database projects.","required":["items","next_cursor"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of database project records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"},"total":{"type":"integer","minimum":0,"description":"Total number of db projects for this account"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/project/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/project/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/project/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/project/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/project/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/project/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/project/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/project/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/project/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.snapshot.create","module":"db","namespace":"db","action":"snapshot.create","method":"POST","path":"/v1/db/snapshot/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"db snapshot create — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":"db/SnapshotCreateRequest.json","params":{"title":"SnapshotCreateRequest","description":"Request for db.snapshot.create — take a point-in-time snapshot of a project.","type":"object","required":["project_id"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Project identifier"},"label":{"type":["string","null"],"description":"Human-readable snapshot label."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"db/Snapshot.json","response":{"title":"DbSnapshot","description":"A point-in-time snapshot of a DbInstance.","type":"object","required":["snapshot_id","db_id","created_at","state"],"additionalProperties":false,"properties":{"snapshot_id":{"type":"string","description":"Unique identifier for this snapshot"},"project_id":{"type":"string","description":"Identifier of the db project this snapshot belongs to"},"db_id":{"type":"string","description":"Vendor-side identifier of the database this snapshot was taken from (NOT the internal dbi_ id)"},"label":{"type":["string","null"],"description":"Risk label (e.g. low, medium, high)"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"state":{"enum":["creating","ready","restoring","failed","expired"],"description":"Current lifecycle state of this resource"},"vendor":{"type":"string","description":"Vendor that handled the underlying database (present on db.snapshot.get)"},"_tier":{"type":"string","description":"Storage retention tier stamped by the asset store (present on db.snapshot.get)"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 expiry timestamp for the stored dump (present on db.snapshot.get)"},"_account_id":{"type":"string","description":"Owning account identifier stamped by the asset store (present on db.snapshot.get)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/db/snapshot/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"project_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/db/snapshot/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'project_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"project_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"project_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"project_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/db/snapshot/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/snapshot/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"project_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/db/snapshot/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"project_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/snapshot/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"project_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/snapshot/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"project_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/db/snapshot/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"project_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"project_id":"sample"}}},{"id":"db.snapshot.get","module":"db","namespace":"db","action":"snapshot.get","method":"GET","path":"/v1/db/snapshot/get/{snapshot_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db snapshot get — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/Snapshot.json","response":{"title":"DbSnapshot","description":"A point-in-time snapshot of a DbInstance.","type":"object","required":["snapshot_id","db_id","created_at","state"],"additionalProperties":false,"properties":{"snapshot_id":{"type":"string","description":"Unique identifier for this snapshot"},"project_id":{"type":"string","description":"Identifier of the db project this snapshot belongs to"},"db_id":{"type":"string","description":"Vendor-side identifier of the database this snapshot was taken from (NOT the internal dbi_ id)"},"label":{"type":["string","null"],"description":"Risk label (e.g. low, medium, high)"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"state":{"enum":["creating","ready","restoring","failed","expired"],"description":"Current lifecycle state of this resource"},"vendor":{"type":"string","description":"Vendor that handled the underlying database (present on db.snapshot.get)"},"_tier":{"type":"string","description":"Storage retention tier stamped by the asset store (present on db.snapshot.get)"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 expiry timestamp for the stored dump (present on db.snapshot.get)"},"_account_id":{"type":"string","description":"Owning account identifier stamped by the asset store (present on db.snapshot.get)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/snapshot/get/SNAPSHOT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.snapshot.list","module":"db","namespace":"db","action":"snapshot.list","method":"GET","path":"/v1/db/snapshot/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db snapshot list — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":null,"params":{},"response_schema_ref":"db/SnapshotListResult.json","response":{"title":"SnapshotListResult","type":"object","description":"Paginated list of database snapshots.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of snapshot records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page. NOTE: the live db.snapshot.list handler never returns this key today (unpaginated asset_store.list_ scan) — kept optional for forward compatibility."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/db/snapshot/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/db/snapshot/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/db/snapshot/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/snapshot/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/db/snapshot/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/snapshot/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/snapshot/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/db/snapshot/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"db.snapshot.restore","module":"db","namespace":"db","action":"snapshot.restore","method":"POST","path":"/v1/db/snapshot/restore/{snapshot_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"db snapshot restore — managed database (Neon/Supabase/PlanetScale).","request_schema_ref":"db/SnapshotRestoreRequest.json","params":{"title":"SnapshotRestoreRequest","description":"Request for db.snapshot.restore — restore a snapshot into a new project (path snapshot_id).","type":"object","required":["snapshot_id"],"additionalProperties":false,"properties":{"snapshot_id":{"type":"string","description":"Path param; the snapshot to restore."},"new_name":{"type":["string","null"],"description":"Name for the restored project (defaults to source-restored)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"db/SnapshotRestoreResult.json","response":{"title":"SnapshotRestoreResult","type":"object","description":"Result of restoring from a snapshot: the newly-registered DbProject that now points at the restored physical database (NOT {ok, snapshot_id} — the live handler registers a fresh project record via db.project._register_restored and returns its full to_dict()).","required":["project_id","db_id","name","vendor","region","plan","postgres_version","state","primary_branch","created_at","mode"],"additionalProperties":false,"properties":{"project_id":{"type":"string","description":"Unique identifier for the newly-registered db project"},"db_id":{"type":"string","pattern":"^dbi_[A-Za-z0-9]{20,}$","description":"Unique identifier for this database instance"},"name":{"type":"string","description":"Human-readable name for this resource (defaults to \"source_restored\")"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"plan":{"description":"Pricing plan for the database instance","type":"string","enum":["hobby","pro","scale"]},"postgres_version":{"type":["string","null"],"description":"e.g. \"15.4\"."},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["provisioning","active","paused","deleting","deleted","failed"]},"primary_branch":{"type":["string","null"],"default":"main","description":"Name of the primary branch"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"mode":{"type":"string","enum":["default_vendor","verified_account"],"description":"Delivery mode or operation mode"},"vendor_db_id":{"type":"string","description":"Vendor-side identifier for the restored physical database"},"metadata":{"type":"object","description":"Request accounting metadata; absent on a restore (only set at original project create time)","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"latency_ms":{"type":"integer","minimum":0},"entry_form":{"type":"string"},"cost_usd":{"type":"number"},"vendor":{"type":"string"},"vendor_region":{"type":"string"},"markup_pct":{"type":"number"},"trace_id":{"type":"string"},"mode":{"type":"string"}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"snapshot_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'snapshot_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"snapshot_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"snapshot_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"snapshot_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"snapshot_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"snapshot_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"snapshot_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"snapshot_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/db/snapshot/restore/SNAPSHOT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"snapshot_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"snapshot_id":"sample"}}},{"id":"dns.domain.add","module":"dns","namespace":"dns","action":"domain.add","method":"POST","path":"/v1/dns/domain/add","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Bind a domain YOU already own: Infrai creates a managed DNS zone for it at the vendor (Cloudflare / Route53 / AliDNS) and returns zone_id + name servers — point your registrar's NS at them to activate. Not domain registration (you must already own the name).","request_schema_ref":"dns/DnsDomainAddRequest.json","params":{"title":"DnsDomainAddRequest","description":"Request shape for dns.domain.add — bind a custom domain (create a managed zone). NOT domain registration.","type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Apex domain, e.g. example.com."},"vendor":{"type":["string","null"],"enum":["cloudflare","route53","aliyun_dns",null],"description":"Pin to a DNS vendor (explicit)."},"account_id":{"type":["string","null"],"description":"Vendor account id / caller-reference."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"dns/DnsDomainResult.json","response":{"title":"DnsDomainResult","description":"Canonical zone result for dns.domain.* operations.","type":"object","required":["zone_id","domain","state"],"additionalProperties":true,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"domain":{"type":"string","description":"Domain name"},"state":{"type":"string","enum":["pending","active","verified","failed"],"description":"Current lifecycle state of this resource"},"name_servers":{"type":"array","items":{"type":"string"},"description":"List of authoritative name servers for this zone"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/dns/domain/add \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/dns/domain/add\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'domain': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"domain\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/dns/domain/add\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/domain/add\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"domain\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/dns/domain/add\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"domain\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/domain/add\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"domain\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/domain/add\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"domain\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/dns/domain/add\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"domain\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"domain":"sample"}}},{"id":"dns.domain.delete","module":"dns","namespace":"dns","action":"domain.delete","method":"DELETE","path":"/v1/dns/domain/delete","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a bound domain's managed zone at the vendor (requires zone_id).","request_schema_ref":"dns/DnsDomainRef.json","params":{"title":"DnsDomainRef","description":"Reference shape for dns.domain.verify / .get / .delete — identify a bound domain by zone_id and/or domain name. verify is sticky_resource (must hit the same vendor/zone).","type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Domain name"},"zone_id":{"type":["string","null"],"description":"Vendor zone id (preferred for get/verify/delete)."},"vendor":{"type":["string","null"],"enum":["cloudflare","route53","aliyun_dns",null],"description":"Vendor that handled or will handle this request"}}},"response_schema_ref":"dns/DnsDeleteResult.json","response":{"title":"DnsDeleteResult","description":"Result for dns.domain.delete and dns.record.delete.","type":"object","required":["deleted","id"],"additionalProperties":true,"properties":{"deleted":{"type":"boolean","description":"Whether the resource was successfully deleted"},"id":{"type":"string","description":"Deleted zone_id or record_id."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/dns/domain/delete?domain=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/dns/domain/delete?domain=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"domain":"sample"}}},{"id":"dns.domain.get","module":"dns","namespace":"dns","action":"domain.get","method":"GET","path":"/v1/dns/domain/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Fetch a bound domain (zone) by zone_id or name, returning its state and name servers.","request_schema_ref":"dns/DnsDomainRef.json","params":{"title":"DnsDomainRef","description":"Reference shape for dns.domain.verify / .get / .delete — identify a bound domain by zone_id and/or domain name. verify is sticky_resource (must hit the same vendor/zone).","type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Domain name"},"zone_id":{"type":["string","null"],"description":"Vendor zone id (preferred for get/verify/delete)."},"vendor":{"type":["string","null"],"enum":["cloudflare","route53","aliyun_dns",null],"description":"Vendor that handled or will handle this request"}}},"response_schema_ref":"dns/DnsDomainResult.json","response":{"title":"DnsDomainResult","description":"Canonical zone result for dns.domain.* operations.","type":"object","required":["zone_id","domain","state"],"additionalProperties":true,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"domain":{"type":"string","description":"Domain name"},"state":{"type":"string","enum":["pending","active","verified","failed"],"description":"Current lifecycle state of this resource"},"name_servers":{"type":"array","items":{"type":"string"},"description":"List of authoritative name servers for this zone"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/dns/domain/get?domain=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/dns/domain/get?domain=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/get?domain=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/get?domain=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/dns/domain/get?domain=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/domain/get?domain=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/dns/domain/get?domain=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/domain/get?domain=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/domain/get?domain=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/dns/domain/get?domain=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"domain":"sample"}}},{"id":"dns.domain.list","module":"dns","namespace":"dns","action":"domain.list","method":"GET","path":"/v1/dns/domain/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_consistency","availability":"ga","regions":["western","china"],"summary":"List the domains YOU have bound (managed zones) at the DNS vendor. Empty until you bind one via dns.domain.add — a new account manages no domains yet (an empty list is expected, not an error).","request_schema_ref":null,"params":{},"response_schema_ref":"dns/DnsDomainListResult.json","response":{"title":"DnsDomainListResult","description":"Result for dns.domain.list — bound domains (zones) for the account.","type":"object","required":["domains"],"additionalProperties":true,"properties":{"domains":{"type":"array","items":{"title":"DnsDomainResult","description":"Canonical zone result for dns.domain.* operations.","type":"object","required":["zone_id","domain","state"],"additionalProperties":true,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"domain":{"type":"string","description":"Domain name"},"state":{"type":"string","enum":["pending","active","verified","failed"],"description":"Current lifecycle state of this resource"},"name_servers":{"type":"array","items":{"type":"string"},"description":"List of authoritative name servers for this zone"}}},"description":"List of domain objects"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/dns/domain/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/dns/domain/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/dns/domain/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/domain/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/dns/domain/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/domain/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/domain/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/dns/domain/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"dns.domain.verify","module":"dns","namespace":"dns","action":"domain.verify","method":"POST","path":"/v1/dns/domain/verify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Verify a bound domain's activation/delegation against the same vendor zone it was created on (sticky_resource); read-only lookup of zone state.","request_schema_ref":"dns/DnsDomainRef.json","params":{"title":"DnsDomainRef","description":"Reference shape for dns.domain.verify / .get / .delete — identify a bound domain by zone_id and/or domain name. verify is sticky_resource (must hit the same vendor/zone).","type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Domain name"},"zone_id":{"type":["string","null"],"description":"Vendor zone id (preferred for get/verify/delete)."},"vendor":{"type":["string","null"],"enum":["cloudflare","route53","aliyun_dns",null],"description":"Vendor that handled or will handle this request"}}},"response_schema_ref":"dns/DnsDomainResult.json","response":{"title":"DnsDomainResult","description":"Canonical zone result for dns.domain.* operations.","type":"object","required":["zone_id","domain","state"],"additionalProperties":true,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"domain":{"type":"string","description":"Domain name"},"state":{"type":"string","enum":["pending","active","verified","failed"],"description":"Current lifecycle state of this resource"},"name_servers":{"type":"array","items":{"type":"string"},"description":"List of authoritative name servers for this zone"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/dns/domain/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/dns/domain/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'domain': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/domain/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"domain\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/dns/domain/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/domain/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"domain\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/dns/domain/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"domain\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/domain/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"domain\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/domain/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"domain\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/dns/domain/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"domain\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"domain":"sample"}}},{"id":"dns.record.create","module":"dns","namespace":"dns","action":"record.create","method":"POST","path":"/v1/dns/record/create","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Create a DNS record (A/AAAA/CNAME/TXT/MX) in a bound zone with TTL and optional MX priority / Cloudflare proxying.","request_schema_ref":"dns/DnsRecordCreateRequest.json","params":{"title":"DnsRecordCreateRequest","description":"Request shape for dns.record.create / .update — a DNS record within a bound zone.","type":"object","required":["zone_id","record_type","name","content"],"additionalProperties":false,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Record name, e.g. www or www.example.com."},"content":{"type":"string","description":"IP / target / text value."},"ttl":{"type":"integer","default":300,"minimum":1,"description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"MX preference (MX only)."},"proxied":{"type":["boolean","null"],"description":"Cloudflare orange-cloud (A/AAAA/CNAME only)."},"record_id":{"type":["string","null"],"description":"Required for dns.record.update."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"dns/DnsRecordResult.json","response":{"title":"DnsRecordResult","description":"Canonical record result for dns.record.* operations.","type":"object","required":["record_id","zone_id","record_type","name","content"],"additionalProperties":true,"properties":{"record_id":{"type":"string","description":"DNS record identifier"},"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Human-readable name for this resource"},"content":{"type":"string","description":"DNS record value/content"},"ttl":{"type":"integer","description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"Priority for MX or SRV records"},"proxied":{"type":["boolean","null"],"description":"Whether Cloudflare proxy is enabled for this record"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/dns/record/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/dns/record/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'zone_id': 'sample', 'record_type': 'A', 'name': 'example', 'content': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/dns/record/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/record/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/dns/record/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/record/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/record/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/dns/record/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"zone_id":"sample","record_type":"A","name":"example","content":"hello"}}},{"id":"dns.record.delete","module":"dns","namespace":"dns","action":"record.delete","method":"DELETE","path":"/v1/dns/record/delete","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a DNS record from a bound zone (requires record_id).","request_schema_ref":"dns/DnsRecordRef.json","params":{"title":"DnsRecordRef","description":"Reference shape for dns.record.delete and dns.record.list scoping.","type":"object","required":["zone_id"],"additionalProperties":false,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"record_id":{"type":["string","null"],"description":"Required for dns.record.delete."},"record_type":{"type":["string","null"],"enum":["A","AAAA","CNAME","TXT","MX",null],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"}}},"response_schema_ref":"dns/DnsDeleteResult.json","response":{"title":"DnsDeleteResult","description":"Result for dns.domain.delete and dns.record.delete.","type":"object","required":["deleted","id"],"additionalProperties":true,"properties":{"deleted":{"type":"boolean","description":"Whether the resource was successfully deleted"},"id":{"type":"string","description":"Deleted zone_id or record_id."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/dns/record/delete?zone_id=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/dns/record/delete?zone_id=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"zone_id":"sample"}}},{"id":"dns.record.list","module":"dns","namespace":"dns","action":"record.list","method":"GET","path":"/v1/dns/record/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List DNS records in a bound zone.","request_schema_ref":"dns/DnsRecordRef.json","params":{"title":"DnsRecordRef","description":"Reference shape for dns.record.delete and dns.record.list scoping.","type":"object","required":["zone_id"],"additionalProperties":false,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"record_id":{"type":["string","null"],"description":"Required for dns.record.delete."},"record_type":{"type":["string","null"],"enum":["A","AAAA","CNAME","TXT","MX",null],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":["string","null"],"description":"Human-readable name for this resource"}}},"response_schema_ref":"dns/DnsRecordListResult.json","response":{"title":"DnsRecordListResult","description":"Result for dns.record.list — records within a zone.","type":"object","required":["records"],"additionalProperties":true,"properties":{"records":{"type":"array","items":{"title":"DnsRecordResult","description":"Canonical record result for dns.record.* operations.","type":"object","required":["record_id","zone_id","record_type","name","content"],"additionalProperties":true,"properties":{"record_id":{"type":"string","description":"DNS record identifier"},"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Human-readable name for this resource"},"content":{"type":"string","description":"DNS record value/content"},"ttl":{"type":"integer","description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"Priority for MX or SRV records"},"proxied":{"type":["boolean","null"],"description":"Whether Cloudflare proxy is enabled for this record"}}},"description":"List of resource records"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/dns/record/list?zone_id=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/dns/record/list?zone_id=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"zone_id":"sample"}}},{"id":"dns.record.update","module":"dns","namespace":"dns","action":"record.update","method":"PATCH","path":"/v1/dns/record/update","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Update an existing DNS record (by record_id; Route53 uses UPSERT).","request_schema_ref":"dns/DnsRecordCreateRequest.json","params":{"title":"DnsRecordCreateRequest","description":"Request shape for dns.record.create / .update — a DNS record within a bound zone.","type":"object","required":["zone_id","record_type","name","content"],"additionalProperties":false,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Record name, e.g. www or www.example.com."},"content":{"type":"string","description":"IP / target / text value."},"ttl":{"type":"integer","default":300,"minimum":1,"description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"MX preference (MX only)."},"proxied":{"type":["boolean","null"],"description":"Cloudflare orange-cloud (A/AAAA/CNAME only)."},"record_id":{"type":["string","null"],"description":"Required for dns.record.update."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"dns/DnsRecordResult.json","response":{"title":"DnsRecordResult","description":"Canonical record result for dns.record.* operations.","type":"object","required":["record_id","zone_id","record_type","name","content"],"additionalProperties":true,"properties":{"record_id":{"type":"string","description":"DNS record identifier"},"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Human-readable name for this resource"},"content":{"type":"string","description":"DNS record value/content"},"ttl":{"type":"integer","description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"Priority for MX or SRV records"},"proxied":{"type":["boolean","null"],"description":"Whether Cloudflare proxy is enabled for this record"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/dns/record/update \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/dns/record/update\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'zone_id': 'sample', 'record_type': 'A', 'name': 'example', 'content': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/update\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/update\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/dns/record/update\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/record/update\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/dns/record/update\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/record/update\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/record/update\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/dns/record/update\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"zone_id":"sample","record_type":"A","name":"example","content":"hello"}}},{"id":"dns.record.upsert","module":"dns","namespace":"dns","action":"record.upsert","method":"PUT","path":"/v1/dns/record/upsert","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Idempotently ensure a DNS record exists with a given value — create it if absent, update it in place if a single record of the same type+name exists, no-op if already identical. The declarative, no-list-first primitive for automation: ACME / Let's Encrypt DNS-01 challenge TXT records, pointing www/CNAME at a deploy, SPF/DKIM/DMARC setup, and infrastructure-as-code reconcile. Matched by (type, name); if several records share that type+name (e.g. round-robin A or multiple concurrent _acme-challenge TXT) it is ambiguous — use record.create to append or record.update with an explicit record_id.","request_schema_ref":"dns/DnsRecordCreateRequest.json","params":{"title":"DnsRecordCreateRequest","description":"Request shape for dns.record.create / .update — a DNS record within a bound zone.","type":"object","required":["zone_id","record_type","name","content"],"additionalProperties":false,"properties":{"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Record name, e.g. www or www.example.com."},"content":{"type":"string","description":"IP / target / text value."},"ttl":{"type":"integer","default":300,"minimum":1,"description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"MX preference (MX only)."},"proxied":{"type":["boolean","null"],"description":"Cloudflare orange-cloud (A/AAAA/CNAME only)."},"record_id":{"type":["string","null"],"description":"Required for dns.record.update."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"dns/DnsRecordResult.json","response":{"title":"DnsRecordResult","description":"Canonical record result for dns.record.* operations.","type":"object","required":["record_id","zone_id","record_type","name","content"],"additionalProperties":true,"properties":{"record_id":{"type":"string","description":"DNS record identifier"},"zone_id":{"type":"string","description":"DNS zone identifier"},"record_type":{"type":"string","enum":["A","AAAA","CNAME","TXT","MX"],"description":"DNS record type (e.g. A, AAAA, CNAME, MX, TXT)"},"name":{"type":"string","description":"Human-readable name for this resource"},"content":{"type":"string","description":"DNS record value/content"},"ttl":{"type":"integer","description":"Time-to-live in seconds for this DNS record"},"priority":{"type":["integer","null"],"description":"Priority for MX or SRV records"},"proxied":{"type":["boolean","null"],"description":"Whether Cloudflare proxy is enabled for this record"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/dns/record/upsert \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/dns/record/upsert\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'zone_id': 'sample', 'record_type': 'A', 'name': 'example', 'content': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/upsert\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/dns/record/upsert\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/dns/record/upsert\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/dns/record/upsert\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/dns/record/upsert\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/dns/record/upsert\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"zone_id\\\": \\\"sample\\\", \\\"record_type\\\": \\\"A\\\", \\\"name\\\": \\\"example\\\", \\\"content\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/dns/record/upsert\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/dns/record/upsert\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"zone_id\": \"sample\", \"record_type\": \"A\", \"name\": \"example\", \"content\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"zone_id":"sample","record_type":"A","name":"example","content":"hello"}}},{"id":"email.batch.send","module":"comm-email","namespace":"email","action":"batch.send","method":"POST","path":"/v1/email/batch/send","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Send up to 100 personalized emails under one idempotency_key (batch passthrough, not billed per message).","request_schema_ref":"comm-email/BatchSendRequest.json","params":{"title":"BatchSendRequest","description":"Batch personalised send for email.batch.send (POST /v1/email/batch). Up to 100 distinct messages share ONE idempotency_key (batch passthrough — per-message is not re-charged). See docs/Infrai_SDK_Comm.md §2.3.","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"maxItems":100,"items":{"title":"EmailSendRequest","type":"object","required":["to"],"additionalProperties":false,"properties":{"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Recipient address, or an array of addresses for multiple recipients."},"cc":{"type":"array","items":{"type":"string"},"description":"Carbon copy recipients"},"bcc":{"type":"array","items":{"type":"string"},"description":"Blind carbon copy recipients"},"from":{"type":["string","null"],"description":"Optional. Omit to use Infrai's default sender on send.infrai.cc. If you provide a custom-domain sender, that domain must be verified first."},"from_display_name":{"type":["string","null"],"description":"Display name for the sender"},"reply_to":{"type":["string","null"],"description":"Reply-to email address"},"subject":{"type":["string","null"],"description":"Email subject line"},"body":{"type":["string","null"],"description":"Plain text body."},"html":{"type":["string","null"],"description":"HTML body of the email"},"template_id":{"type":["string","null"],"description":"Identifier of the template used for rendering"},"template_vars":{"type":["object","null"],"description":"Variables to substitute in the template"},"attachments":{"type":"array","items":{"type":"object"},"description":"List of email attachments"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for categorization and filtering"},"track_opens":{"type":"boolean","default":false,"description":"Whether to track email opens"},"track_clicks":{"type":"boolean","default":false,"description":"Whether to track link clicks in the email"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the resource is scheduled to activate"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"vendor":{"type":["string","null"],"description":"Pin to a specific vendor."},"message_class":{"enum":["transactional","marketing"],"default":"transactional","description":"Semantic class of the message. Only transactional is currently live; marketing is reserved and fails closed."},"auto_unsubscribe_link":{"type":["boolean","null"],"description":"Whether to append a signed unsubscribe link. Transactional messages omit it by default; marketing-like content may still be forced to include it."}}},"description":"Each entry is a full EmailSendRequest with its own recipients / template_vars."},"idempotency_key":{"type":["string","null"],"description":"One key for the whole batch; per-message sends are not re-charged."}}},"response_schema_ref":"comm-email/BatchSendResult.json","response":{"title":"BatchSendResult","description":"Result of email.batch.send. Per-message results carry an index for partial-failure localisation, mirroring single-send EmailSendResult.accepted_recipients/suppressed_recipients conventions. See docs/Infrai_SDK_Comm.md §2.3.","type":"object","required":["batch_id","results"],"additionalProperties":false,"properties":{"batch_id":{"type":"string","pattern":"^batch_[A-Za-z0-9]{20,}$","description":"Unique identifier for this batch job"},"results":{"type":"array","items":{"type":"object","required":["index","to","status"],"additionalProperties":false,"properties":{"index":{"type":"integer","minimum":0,"description":"Position of this message in the request messages[] array."},"message_id":{"type":["string","null"],"pattern":"^msg_[A-Za-z0-9]{20,}$","description":"Null when this message failed to enqueue."},"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"status":{"enum":["accepted","suppressed","failed"]},"error":{"type":["string","null"],"description":"Error code when status=failed (e.g. SUPPRESSED_RECIPIENT)."}}},"description":"List of individual results from a batch operation"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/batch/send \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"to\": \"sample\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/batch/send\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'to': 'sample'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/batch/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"to\": \"sample\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/batch/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"to\": \"sample\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"to\": \"sample\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/batch/send\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/batch/send\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/batch/send\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/batch/send\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/batch/send\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"to\": \"sample\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/batch/send\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"to\": \"sample\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"to":"sample"}]}}},{"id":"email.cancel","module":"comm-email","namespace":"email","action":"cancel","method":"POST","path":"/v1/email/cancel/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Cancel a scheduled email that has not yet been sent.","request_schema_ref":"comm-email/EmailCancelRequest.json","params":{"title":"EmailCancelRequest","description":"Cancel a still-scheduled (not yet dispatched) email for email.cancel (POST /v1/email/{id}/cancel). See docs/Infrai_SDK_Comm.md §2.2.6.","type":"object","additionalProperties":false,"properties":{"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/cancel/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/cancel/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/cancel/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/cancel/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/cancel/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/cancel/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/cancel/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/cancel/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"email.domain.delete","module":"comm-email","namespace":"email","action":"domain.delete","method":"DELETE","path":"/v1/email/domain/delete/{domain}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a previously added sender domain.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/DomainDeleteResult.json","response":{"title":"DomainDeleteResult","type":"object","description":"Result of deleting a domain.","required":["domain","deleted","found"],"additionalProperties":false,"properties":{"domain":{"type":["string","null"],"description":"Domain name that was deleted"},"deleted":{"type":"boolean","description":"Whether the domain was deleted (same value as `found`: the domain existed and was removed from the self-managed sender-domain store)."},"found":{"type":"boolean","description":"Whether a domain verification record existed for this domain prior to the delete call."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/email/domain/delete/DOMAIN \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/email/domain/delete/DOMAIN\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.domain.get","module":"comm-email","namespace":"email","action":"domain.get","method":"GET","path":"/v1/email/domain/get/{domain}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the verification status and reputation of a sender domain.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/DomainGetResult.json","response":{"title":"DomainGetResult","description":"Composite read for email.domain.get (GET /v1/email/domains/{domain}) — the single read surface for domain verification + reputation. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["verification"],"additionalProperties":false,"properties":{"verification":{"description":"Domain verification status and DNS records","title":"DomainVerification","type":"object","required":["domain","domain_id","status","dns_records","created_at"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Apex domain, e.g. 'yourdomain.com'."},"domain_id":{"type":"string","pattern":"^dom_[A-Za-z0-9]{20,}$","description":"Unique identifier for this domain"},"status":{"enum":["pending_dns","verifying","verified","failed","expired"],"description":"Current status of this resource"},"dns_records":{"type":"array","items":{"title":"DnsRecord","description":"One DNS record the user must publish at their DNS provider to verify a domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["type","name","value","purpose"],"additionalProperties":false,"properties":{"type":{"enum":["TXT","CNAME","MX","A","AAAA"],"description":"Type discriminator for this resource"},"name":{"type":"string","description":"Fully qualified DNS name."},"value":{"type":"string","description":"Value of the DNS record or configuration"},"purpose":{"enum":["spf","dkim","tracking","dmarc","return_path","verification"],"description":"Purpose of the DNS record"},"ttl_recommended":{"type":"integer","minimum":60,"default":3600,"description":"Recommended TTL in seconds"}}},"description":"DNS records required for domain verification"},"checks":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Per-record check status ('ok'/'pending'/'mismatch'/...)."},"warm_up_state":{"type":["string","null"],"enum":["not_started","in_progress","complete",null],"description":"Current warm-up state for the domain"},"daily_limit_current":{"type":["integer","null"],"minimum":0,"description":"Current daily sending limit"},"daily_limit_target":{"type":["integer","null"],"minimum":0,"description":"Target daily sending limit after warm-up"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"verified_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when verification was completed"},"expires_at":{"type":["string","null"],"format":"date-time","description":"DKIM rotation due (1y recommended)."},"rotated":{"type":"boolean","description":"Present only on the response of email.domain.rotate_dkim: true once the DKIM key rotation has been issued (status drops back to pending_dns until the new record is observed in DNS)."}}},"reputation":{"oneOf":[{"title":"DomainReputationCap","description":"Reputation + daily-cap snapshot for a verified domain. See docs/Infrai_SDK_Comm.md §1.2.4.2.","type":"object","required":["domain","tier","current_daily_cap","used_today","bounce_rate_30d","complaint_rate_30d","days_in_current_tier"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Domain name"},"tier":{"enum":["warming_up","established","trusted","throttled","suspended"],"description":"Current subscription tier (standard / pro / enterprise)"},"current_daily_cap":{"type":"integer","minimum":0,"description":"Current daily sending cap"},"used_today":{"type":"integer","minimum":0,"description":"Number of emails sent today"},"bounce_rate_30d":{"type":"number","minimum":0,"maximum":1,"description":"Bounce rate over the last 30 days"},"complaint_rate_30d":{"type":"number","minimum":0,"maximum":1,"description":"Complaint rate over the last 30 days"},"days_in_current_tier":{"type":"integer","minimum":0,"description":"Days in the current warm-up tier"},"next_tier":{"type":["string","null"],"enum":["warming_up","established","trusted","throttled","suspended",null],"description":"Next warm-up tier"},"next_tier_requirements":{"type":["object","null"],"description":"Concrete thresholds + remaining-duration to upgrade."},"throttle_risk":{"type":"string","enum":["low","medium","high"],"description":"Current risk of being throttled based on recent domain reputation metrics."}}},{"type":"null"}],"description":"Null until the domain is verified and has begun warming up."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/domain/get/DOMAIN \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/domain/get/DOMAIN\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/get/DOMAIN\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/get/DOMAIN\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/domain/get/DOMAIN\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/domain/get/DOMAIN\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/domain/get/DOMAIN\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/domain/get/DOMAIN\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/domain/get/DOMAIN\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/domain/get/DOMAIN\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.domain.list","module":"comm-email","namespace":"email","action":"domain.list","method":"GET","path":"/v1/email/domain/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_consistency","availability":"ga","regions":["western","china"],"summary":"List the sender domains added to the account.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/DomainListResult.json","response":{"title":"DomainListResult","description":"Paginated result for email.domain.list — configured sending domains with verification status. Use email.domain.get for per-domain reputation and daily-cap details. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["items","total_count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"DomainVerification","description":"Result of infra.email.verify_domain / get_domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["domain","domain_id","status","dns_records","created_at"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Apex domain, e.g. 'yourdomain.com'."},"domain_id":{"type":"string","pattern":"^dom_[A-Za-z0-9]{20,}$","description":"Unique identifier for this domain"},"status":{"enum":["pending_dns","verifying","verified","failed","expired"],"description":"Current status of this resource"},"dns_records":{"type":"array","items":{"title":"DnsRecord","description":"One DNS record the user must publish at their DNS provider to verify a domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["type","name","value","purpose"],"additionalProperties":false,"properties":{"type":{"enum":["TXT","CNAME","MX","A","AAAA"],"description":"Type discriminator for this resource"},"name":{"type":"string","description":"Fully qualified DNS name."},"value":{"type":"string","description":"Value of the DNS record or configuration"},"purpose":{"enum":["spf","dkim","tracking","dmarc","return_path","verification"],"description":"Purpose of the DNS record"},"ttl_recommended":{"type":"integer","minimum":60,"default":3600,"description":"Recommended TTL in seconds"}}},"description":"DNS records required for domain verification"},"checks":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Per-record check status ('ok'/'pending'/'mismatch'/...)."},"warm_up_state":{"type":["string","null"],"enum":["not_started","in_progress","complete",null],"description":"Current warm-up state for the domain"},"daily_limit_current":{"type":["integer","null"],"minimum":0,"description":"Current daily sending limit"},"daily_limit_target":{"type":["integer","null"],"minimum":0,"description":"Target daily sending limit after warm-up"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"verified_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when verification was completed"},"expires_at":{"type":["string","null"],"format":"date-time","description":"DKIM rotation due (1y recommended)."},"rotated":{"type":"boolean","description":"Present only on the response of email.domain.rotate_dkim: true once the DKIM key rotation has been issued (status drops back to pending_dns until the new record is observed in DNS)."}}},"description":"Configured sender domains with verification state"},"total_count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"},"next_cursor":{"type":["string","null"],"description":"Pass back into domain.list() to fetch the next page."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/domain/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/domain/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/domain/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/domain/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/domain/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/domain/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/domain/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/domain/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.domain.rotate_dkim","module":"comm-email","namespace":"email","action":"domain.rotate_dkim","method":"POST","path":"/v1/email/domain/rotate_dkim/{domain}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Rotate DKIM for a sender domain and return the new DNS records.","request_schema_ref":"comm-email/DomainRotateDkimRequest.json","params":{"title":"DomainRotateDkimRequest","description":"Rotate a domain's DKIM keypair for email.domain.rotate_dkim (POST /v1/email/domains/{domain}/rotate-dkim). Returns DomainVerification with new DKIM dns_records + updated expires_at. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","additionalProperties":false,"properties":{"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"comm-email/DomainVerification.json","response":{"title":"DomainVerification","description":"Result of infra.email.verify_domain / get_domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["domain","domain_id","status","dns_records","created_at"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Apex domain, e.g. 'yourdomain.com'."},"domain_id":{"type":"string","pattern":"^dom_[A-Za-z0-9]{20,}$","description":"Unique identifier for this domain"},"status":{"enum":["pending_dns","verifying","verified","failed","expired"],"description":"Current status of this resource"},"dns_records":{"type":"array","items":{"title":"DnsRecord","description":"One DNS record the user must publish at their DNS provider to verify a domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["type","name","value","purpose"],"additionalProperties":false,"properties":{"type":{"enum":["TXT","CNAME","MX","A","AAAA"],"description":"Type discriminator for this resource"},"name":{"type":"string","description":"Fully qualified DNS name."},"value":{"type":"string","description":"Value of the DNS record or configuration"},"purpose":{"enum":["spf","dkim","tracking","dmarc","return_path","verification"],"description":"Purpose of the DNS record"},"ttl_recommended":{"type":"integer","minimum":60,"default":3600,"description":"Recommended TTL in seconds"}}},"description":"DNS records required for domain verification"},"checks":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Per-record check status ('ok'/'pending'/'mismatch'/...)."},"warm_up_state":{"type":["string","null"],"enum":["not_started","in_progress","complete",null],"description":"Current warm-up state for the domain"},"daily_limit_current":{"type":["integer","null"],"minimum":0,"description":"Current daily sending limit"},"daily_limit_target":{"type":["integer","null"],"minimum":0,"description":"Target daily sending limit after warm-up"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"verified_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when verification was completed"},"expires_at":{"type":["string","null"],"format":"date-time","description":"DKIM rotation due (1y recommended)."},"rotated":{"type":"boolean","description":"Present only on the response of email.domain.rotate_dkim: true once the DKIM key rotation has been issued (status drops back to pending_dns until the new record is observed in DNS)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/domain/rotate_dkim/DOMAIN\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"email.domain.verify","module":"comm-email","namespace":"email","action":"domain.verify","method":"POST","path":"/v1/email/domain/verify","idempotent":true,"minimum_tier":"pro","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Verify a sender domain's DNS records to complete verification.","request_schema_ref":"comm-email/DomainVerifyRequest.json","params":{"title":"DomainVerifyRequest","description":"Request shape for email.domain.verify — trigger the vendor's DNS/domain verification for a sending domain. Returns domain + status + dns_records.","type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Sending domain to verify (e.g. mail.example.com)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"comm-email/DomainVerification.json","response":{"title":"DomainVerification","description":"Result of infra.email.verify_domain / get_domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["domain","domain_id","status","dns_records","created_at"],"additionalProperties":false,"properties":{"domain":{"type":"string","description":"Apex domain, e.g. 'yourdomain.com'."},"domain_id":{"type":"string","pattern":"^dom_[A-Za-z0-9]{20,}$","description":"Unique identifier for this domain"},"status":{"enum":["pending_dns","verifying","verified","failed","expired"],"description":"Current status of this resource"},"dns_records":{"type":"array","items":{"title":"DnsRecord","description":"One DNS record the user must publish at their DNS provider to verify a domain. See docs/Infrai_SDK_Comm.md §3.1.","type":"object","required":["type","name","value","purpose"],"additionalProperties":false,"properties":{"type":{"enum":["TXT","CNAME","MX","A","AAAA"],"description":"Type discriminator for this resource"},"name":{"type":"string","description":"Fully qualified DNS name."},"value":{"type":"string","description":"Value of the DNS record or configuration"},"purpose":{"enum":["spf","dkim","tracking","dmarc","return_path","verification"],"description":"Purpose of the DNS record"},"ttl_recommended":{"type":"integer","minimum":60,"default":3600,"description":"Recommended TTL in seconds"}}},"description":"DNS records required for domain verification"},"checks":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Per-record check status ('ok'/'pending'/'mismatch'/...)."},"warm_up_state":{"type":["string","null"],"enum":["not_started","in_progress","complete",null],"description":"Current warm-up state for the domain"},"daily_limit_current":{"type":["integer","null"],"minimum":0,"description":"Current daily sending limit"},"daily_limit_target":{"type":["integer","null"],"minimum":0,"description":"Target daily sending limit after warm-up"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"verified_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when verification was completed"},"expires_at":{"type":["string","null"],"format":"date-time","description":"DKIM rotation due (1y recommended)."},"rotated":{"type":"boolean","description":"Present only on the response of email.domain.rotate_dkim: true once the DKIM key rotation has been issued (status drops back to pending_dns until the new record is observed in DNS)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/domain/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/domain/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'domain': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/domain/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"domain\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"domain\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/domain/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/domain/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"domain\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/domain/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"domain\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/domain/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"domain\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/domain/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"domain\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/domain/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"domain\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"domain":"sample"}}},{"id":"email.event.list","module":"comm-email","namespace":"email","action":"event.list","method":"GET","path":"/v1/email/event/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List the delivery event timeline for one email; message_id is required.","request_schema_ref":"comm-email/EmailEventListRequest.json","params":{"title":"EmailEventListRequest","description":"Query parameters for email.event.list. message_id is the Infrai id returned by email.send.","type":"object","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^msg_[A-Za-z0-9]{12,}$","example":"msg_0123456789abcdef","description":"Infrai message id returned by email.send."},"type":{"type":"string","description":"Optional delivery-event type filter."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum events to return."}}},"response_schema_ref":"comm-email/EmailEventListResult.json","response":{"title":"EmailEventListResult","description":"Paginated per-recipient event stream for email.event.list (complements the email.get aggregate EmailStatus). See docs/Infrai_SDK_Comm.md §3 and enums/email_event_type.yaml.","type":"object","required":["items","count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"EmailEvent","description":"One lifecycle event for a message recipient. See docs/Infrai_SDK_Comm.md §2.2.2 and enums/email_event_type.yaml.","type":"object","required":["type","at","recipient"],"additionalProperties":false,"properties":{"type":{"enum":["queued","sent","delivered","opened","clicked","bounced","complained","deferred","expired","cancelled","unsubscribed","auto_suppressed"],"description":"Type discriminator for this resource"},"at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"recipient":{"type":"string","format":"email","description":"Recipient email address"},"message_id":{"type":["string","null"],"pattern":"^msg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"meta":{"type":["object","null"],"description":"Event-specific metadata (ip / user_agent / url / bounce_type / reason)."}}},"description":"List of resource records"},"count":{"type":"integer","minimum":0,"description":"Number of items in this page"},"next_cursor":{"type":["string","null"],"description":"Pass back into event.list() to fetch the next page."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/event/list?message_id=msg_0123456789abcdef\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"message_id":"msg_0123456789abcdef"}}},{"id":"email.get","module":"comm-email","namespace":"email","action":"get","method":"GET","path":"/v1/email/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the delivery details of one email by message_id.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/EmailStatus.json","response":{"title":"EmailStatus","description":"Status for a single message_id, read back from the account-scoped sent-message archive (what THIS edge actually dispatched). See docs/Infrai_SDK_Comm.md §2.2.1. NOTE: per-recipient state, the open/click/bounce event timeline, and per-event-type counts require an inbound vendor delivery-event webhook pipeline that the in-process archive does not (yet) populate, so those four fields are OPTIONAL — only message_id + state are guaranteed real.","type":"object","required":["message_id","state"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^msg_[A-Za-z0-9]{12,}$","description":"Archive id of the message (msg_ + hex)."},"state":{"type":"string","description":"Aggregate state — see enums/email_state.yaml."},"channel":{"type":"string","enum":["email"],"description":"Delivery channel of the archived record."},"to":{"description":"Recipient(s) the message was sent to (string or array, as submitted)."},"vendor":{"type":"string","description":"Serving vendor that dispatched the message."},"created_at":{"type":["number","string"],"description":"Epoch seconds (or ISO-8601) when the message was archived."},"per_recipient_state":{"type":"object","additionalProperties":{"type":"string"},"description":"OPTIONAL — map of recipient_email -> per-recipient state (populated only when a delivery-event webhook pipeline is wired)."},"first_event_at":{"type":"string","format":"date-time","description":"OPTIONAL — first delivery-event timestamp (webhook-derived)."},"last_event_at":{"type":"string","format":"date-time","description":"OPTIONAL — latest delivery-event timestamp (webhook-derived)."},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"OPTIONAL — per-event-type tallies (delivered/bounced/opened/clicked/...), webhook-derived."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.list","module":"comm-email","namespace":"email","action":"list","method":"GET","path":"/v1/email/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List emails sent by the current account with their latest status.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/EmailListResult.json","response":{"title":"EmailListResult","description":"Paginated account-scoped list of sent email messages. Each item is the latest aggregate EmailStatus for one message_id; use email.event.list with message_id to inspect that message's event timeline.","type":"object","required":["items","count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"EmailStatus","description":"Status for a single message_id, read back from the account-scoped sent-message archive (what THIS edge actually dispatched). See docs/Infrai_SDK_Comm.md §2.2.1. NOTE: per-recipient state, the open/click/bounce event timeline, and per-event-type counts require an inbound vendor delivery-event webhook pipeline that the in-process archive does not (yet) populate, so those four fields are OPTIONAL — only message_id + state are guaranteed real.","type":"object","required":["message_id","state"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^msg_[A-Za-z0-9]{12,}$","description":"Archive id of the message (msg_ + hex)."},"state":{"type":"string","description":"Aggregate state — see enums/email_state.yaml."},"channel":{"type":"string","enum":["email"],"description":"Delivery channel of the archived record."},"to":{"description":"Recipient(s) the message was sent to (string or array, as submitted)."},"vendor":{"type":"string","description":"Serving vendor that dispatched the message."},"created_at":{"type":["number","string"],"description":"Epoch seconds (or ISO-8601) when the message was archived."},"per_recipient_state":{"type":"object","additionalProperties":{"type":"string"},"description":"OPTIONAL — map of recipient_email -> per-recipient state (populated only when a delivery-event webhook pipeline is wired)."},"first_event_at":{"type":"string","format":"date-time","description":"OPTIONAL — first delivery-event timestamp (webhook-derived)."},"last_event_at":{"type":"string","format":"date-time","description":"OPTIONAL — latest delivery-event timestamp (webhook-derived)."},"counts":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"OPTIONAL — per-event-type tallies (delivered/bounced/opened/clicked/...), webhook-derived."}}},"description":"Latest status rows for emails sent by this account, newest first."},"count":{"type":"integer","minimum":0,"description":"Number of items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null when no further page is available."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.send","module":"comm-email","namespace":"email","action":"send","method":"POST","path":"/v1/email/send","idempotent":true,"minimum_tier":"standard","supported_message_classes":["transactional"],"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Send a transactional email (inline body/HTML or a template) with tracking; idempotent.","request_schema_ref":"comm-email/EmailSendRequest.json","params":{"title":"EmailSendRequest","type":"object","required":["to"],"additionalProperties":false,"properties":{"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Recipient address, or an array of addresses for multiple recipients."},"cc":{"type":"array","items":{"type":"string"},"description":"Carbon copy recipients"},"bcc":{"type":"array","items":{"type":"string"},"description":"Blind carbon copy recipients"},"from":{"type":["string","null"],"description":"Optional. Omit to use Infrai's default sender on send.infrai.cc. If you provide a custom-domain sender, that domain must be verified first."},"from_display_name":{"type":["string","null"],"description":"Display name for the sender"},"reply_to":{"type":["string","null"],"description":"Reply-to email address"},"subject":{"type":["string","null"],"description":"Email subject line"},"body":{"type":["string","null"],"description":"Plain text body."},"html":{"type":["string","null"],"description":"HTML body of the email"},"template_id":{"type":["string","null"],"description":"Identifier of the template used for rendering"},"template_vars":{"type":["object","null"],"description":"Variables to substitute in the template"},"attachments":{"type":"array","items":{"type":"object"},"description":"List of email attachments"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for categorization and filtering"},"track_opens":{"type":"boolean","default":false,"description":"Whether to track email opens"},"track_clicks":{"type":"boolean","default":false,"description":"Whether to track link clicks in the email"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the resource is scheduled to activate"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"vendor":{"type":["string","null"],"description":"Pin to a specific vendor."},"message_class":{"enum":["transactional","marketing"],"default":"transactional","description":"Semantic class of the message. Only transactional is currently live; marketing is reserved and fails closed."},"auto_unsubscribe_link":{"type":["boolean","null"],"description":"Whether to append a signed unsubscribe link. Transactional messages omit it by default; marketing-like content may still be forced to include it."}}},"response_schema_ref":"comm-email/EmailSendResult.json","response":{"title":"EmailSendResult","type":"object","required":["message_id","mode","from_used","accepted_recipients"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^msg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"vendor_message_id":{"type":["string","null"],"description":"Message identifier assigned by the upstream vendor"},"from_used":{"type":"string","description":"Sender email address that was actually used for delivery"},"mode":{"enum":["default_vendor","verified_domain"],"description":"Delivery mode or operation mode"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the resource is scheduled to activate"},"accepted_recipients":{"type":"array","items":{"type":"string"},"description":"List of recipient email addresses that were accepted"},"suppressed_recipients":{"type":"array","items":{"type":"string"},"description":"List of recipient email addresses that were suppressed"},"metadata":{"type":["object","null"],"description":"Cost/vendor disclosure for this send (cost-transparency contract surface). A superset of kernel ResultMetadata that also carries the email-specific `mode` field; present once a vendor route has been resolved (absent only if all recipients were pre-suppressed before delivery was attempted... still normally present with cost_usd=0 in that case).","additionalProperties":false,"required":["request_id","timestamp","latency_ms","entry_form"],"properties":{"request_id":{"type":"string","description":"UUID v7."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"latency_ms":{"type":"integer","minimum":0,"description":"Latency of the operation in milliseconds"},"entry_form":{"description":"Entry point format (rest, mcp, sdk)"},"cost_usd":{"type":"number","minimum":0,"description":"Cost of this operation in USD"},"cost_cny":{"type":"number","minimum":0,"description":"Cost in CNY for this request"},"vendor":{"type":"string","description":"Adapter name; references VendorRegistry."},"vendor_region":{"enum":["china","western"],"description":"Vendor region where the request was processed"},"markup_pct":{"type":"number","description":"Markup percentage applied on top of vendor cost"},"mode":{"enum":["default_vendor","verified_domain"],"description":"Email delivery mode this send resolved to (email-specific field not present on the generic kernel ResultMetadata)."}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/send \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/send\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'to': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"to\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/send\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/send\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"to\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/send\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"to\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/send\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"to\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/send\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"to\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/send\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"to\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"to":"sample"}}},{"id":"email.suppression.add","module":"comm-email","namespace":"email","action":"suppression.add","method":"POST","path":"/v1/email/suppression/add","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Add a recipient address to the suppression list to stop future delivery; idempotent.","request_schema_ref":"comm-email/SuppressRequest.json","params":{"title":"SuppressRequest","description":"Add a recipient to the suppression list for email.suppression.add (POST /v1/email/suppress). SDK alias: email.suppression.add (same route). Returns the back-filled SuppressionRecord. See docs/Infrai_SDK_Comm.md §6 and enums/suppression_reason.yaml.","type":"object","required":["email"],"additionalProperties":false,"properties":{"email":{"type":"string","format":"email","description":"Email address"},"reason":{"enum":["hard_bounce","soft_bounce_5x","complained","unsubscribed","invalid","manual","user_request"],"default":"manual","description":"Reason for the current state or action"},"scope":{"enum":["account","domain"],"default":"account","description":"Scope of applicability for this resource"},"domain_scope":{"type":["string","null"],"description":"When scope=domain, the specific verified domain."},"notes":{"type":["string","null"],"description":"Free-text notes about this suppression"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"comm-email/SuppressionRecord.json","response":{"title":"SuppressionRecord","description":"Suppression-list entry for one recipient email. See docs/Infrai_SDK_Comm.md §5.3 and enums/suppression_reason.yaml.","type":"object","required":["email","reason","added_at","scope"],"additionalProperties":false,"properties":{"email":{"type":"string","format":"email","description":"Email address"},"reason":{"enum":["hard_bounce","soft_bounce_5x","complained","unsubscribed","invalid","manual","user_request"],"description":"Reason for the current state or action"},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was added"},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"Last time a send was blocked by this entry."},"attempt_count_blocked":{"type":["integer","null"],"minimum":0,"description":"Number of delivery attempts blocked by this suppression"},"notes":{"type":["string","null"],"description":"Free-text notes about this suppression"},"scope":{"enum":["account","domain"],"description":"Scope of applicability for this resource"},"domain_scope":{"type":["string","null"],"description":"When scope=domain, the specific verified domain."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/suppression/add \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"user@example.com\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/suppression/add\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'email': 'user@example.com'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"email\": \"user@example.com\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"email\": \"user@example.com\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/suppression/add\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/suppression/add\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\": \\\"user@example.com\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/suppression/add\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"email\\\": \\\"user@example.com\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/suppression/add\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"email\\\": \\\"user@example.com\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/suppression/add\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"email\": \"user@example.com\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/suppression/add\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"email\": \"user@example.com\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"email":"user@example.com"}}},{"id":"email.suppression.check","module":"comm-email","namespace":"email","action":"suppression.check","method":"GET","path":"/v1/email/suppression/check/{email}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Check whether an address is on the suppression list.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/SuppressionCheckResult.json","response":{"title":"SuppressionCheckResult","description":"Single-point suppression lookup for email.suppression.check (GET /v1/email/suppressions/{email}). Used as a pre-send check. See docs/Infrai_SDK_Comm.md §6.","type":"object","required":["email","suppressed"],"additionalProperties":false,"properties":{"email":{"type":"string","description":"The email address that was checked."},"suppressed":{"type":"boolean","description":"Whether the address is currently suppressed"},"reason":{"enum":["hard_bounce","soft_bounce_5x","complained","unsubscribed","invalid","manual","user_request"],"description":"Reason for the current suppression. Present only when suppressed=true."},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this suppression was added. Present only when suppressed=true."},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"Last time a send was blocked by this entry. Present only when suppressed=true."},"attempt_count_blocked":{"type":["integer","null"],"minimum":0,"description":"Number of delivery attempts blocked by this suppression. Present only when suppressed=true."},"notes":{"type":["string","null"],"description":"Free-text notes about this suppression. Present only when suppressed=true."},"scope":{"enum":["account","domain"],"description":"Scope of applicability for this suppression entry. Present only when suppressed=true."},"domain_scope":{"type":["string","null"],"description":"When scope=domain, the specific verified domain. Present only when suppressed=true."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/suppression/check/EMAIL \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/suppression/check/EMAIL\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/check/EMAIL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/check/EMAIL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/suppression/check/EMAIL\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/suppression/check/EMAIL\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/suppression/check/EMAIL\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/suppression/check/EMAIL\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/suppression/check/EMAIL\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/suppression/check/EMAIL\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.suppression.delete","module":"comm-email","namespace":"email","action":"suppression.delete","method":"DELETE","path":"/v1/email/suppression/delete/{email}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Remove an address from the suppression list to resume delivery.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/SuppressionDeleteResult.json","response":{"title":"SuppressionDeleteResult","type":"object","description":"Result of removing a suppression.","required":["email","deleted","found"],"additionalProperties":false,"properties":{"email":{"type":["string","null"],"description":"Email address removed from suppression list"},"deleted":{"type":"boolean","description":"Whether the suppression entry was removed (same value as `found`: the entry existed and was removed from the suppression store)."},"found":{"type":"boolean","description":"Whether a suppression entry existed for this email prior to the delete call."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/email/suppression/delete/EMAIL \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/email/suppression/delete/EMAIL\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.suppression.list","module":"comm-email","namespace":"email","action":"suppression.list","method":"GET","path":"/v1/email/suppression/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List recipient addresses on the suppression list.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/SuppressionListResult.json","response":{"title":"SuppressionListResult","description":"Paginated result for infra.email.suppression.list. See docs/Infrai_SDK_Comm.md §5.3.","type":"object","required":["items","count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SuppressionRecord","description":"Suppression-list entry for one recipient email. See docs/Infrai_SDK_Comm.md §5.3 and enums/suppression_reason.yaml.","type":"object","required":["email","reason","added_at","scope"],"additionalProperties":false,"properties":{"email":{"type":"string","format":"email","description":"Email address"},"reason":{"enum":["hard_bounce","soft_bounce_5x","complained","unsubscribed","invalid","manual","user_request"],"description":"Reason for the current state or action"},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was added"},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"Last time a send was blocked by this entry."},"attempt_count_blocked":{"type":["integer","null"],"minimum":0,"description":"Number of delivery attempts blocked by this suppression"},"notes":{"type":["string","null"],"description":"Free-text notes about this suppression"},"scope":{"enum":["account","domain"],"description":"Scope of applicability for this resource"},"domain_scope":{"type":["string","null"],"description":"When scope=domain, the specific verified domain."}}},"description":"List of resource records"},"count":{"type":"integer","minimum":0,"description":"Number of items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/email/suppression/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/email/suppression/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/suppression/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/email/suppression/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/suppression/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/email/suppression/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/suppression/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/suppression/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/email/suppression/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.template.create","module":"comm-email","namespace":"email","action":"template.create","method":"POST","path":"/v1/email/template/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create an email template.","request_schema_ref":"comm-email/TemplateCreateRequest.json","params":{"title":"TemplateCreateRequest","description":"Create a stored email template for email.template.create (POST /v1/email/templates). Returns Template. See docs/Infrai_SDK_Comm.md §4.1.","type":"object","required":["name","subject","html"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Unique within account."},"subject":{"type":"string","description":"May contain double-brace var placeholders."},"html":{"type":"string","description":"HTML body; may contain double-brace var, double-brace #section, double-brace ^inverted."},"body_text":{"type":["string","null"],"description":"Plain-text alternative."},"variables":{"type":["object","null"],"description":"Declared variables: { name: 'string' | 'int' | 'bool' | 'array' | 'object' }."},"default_vars":{"type":["object","null"],"description":"Defaults used when var missing in send()."},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Tags for categorization and filtering"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"comm-email/Template.json","response":{"title":"Template","description":"Stored email template (Mustache-compatible subset). See docs/Infrai_SDK_Comm.md §4.","type":"object","required":["template_id","name","subject","html","created_at","updated_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","pattern":"^tmpl_[A-Za-z0-9]{20,}$","description":"Identifier of the template used for rendering"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Unique within account."},"subject":{"type":"string","description":"May contain double-brace var placeholders."},"html":{"type":"string","description":"HTML body; may contain double-brace var, double-brace #section, double-brace ^inverted."},"body_text":{"type":["string","null"],"description":"Plain-text alternative."},"variables":{"type":["object","null"],"description":"Declared variables: { name: 'string' | 'int' | 'bool' | 'array' | 'object' }."},"default_vars":{"type":["object","null"],"description":"Defaults used when var missing in send()."},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Tags for categorization and filtering"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/template/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/template/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example', 'subject': 'sample', 'html': '<h1>Hello from infrai</h1>'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/template/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/template/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\", \\\"subject\\\": \\\"sample\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/template/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\", \\\"subject\\\": \\\"sample\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/template/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\", \\\"subject\\\": \\\"sample\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/template/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/template/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\", \"subject\": \"sample\", \"html\": \"<h1>Hello from infrai</h1>\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","subject":"sample","html":"<h1>Hello from infrai</h1>"}}},{"id":"email.template.delete","module":"comm-email","namespace":"email","action":"template.delete","method":"DELETE","path":"/v1/email/template/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete an email template.","request_schema_ref":null,"params":{},"response_schema_ref":"comm-email/TemplateDeleteResult.json","response":{"title":"TemplateDeleteResult","type":"object","description":"Result of deleting an email template.","required":["template_id","deleted","found"],"additionalProperties":false,"properties":{"template_id":{"type":["string","null"],"description":"Identifier of the deleted template"},"deleted":{"type":"boolean","description":"Whether the template was deleted (same value as `found`: the template existed and was removed from the template store)."},"found":{"type":"boolean","description":"Whether a template existed with this id prior to the delete call."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/email/template/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/email/template/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/email/template/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/template/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/email/template/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/template/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/template/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/email/template/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"email.template.preview","module":"comm-email","namespace":"email","action":"template.preview","method":"POST","path":"/v1/email/template/preview/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Render and preview a template with the given variables.","request_schema_ref":"comm-email/TemplatePreviewRequest.json","params":{"title":"TemplatePreviewRequest","description":"Render a stored template with sample vars for email.template.preview (POST /v1/email/templates/{id}/preview). Returns TemplatePreview. See docs/Infrai_SDK_Comm.md §4.2.","type":"object","required":["vars"],"additionalProperties":false,"properties":{"vars":{"type":"object","description":"Variable values merged with the template's default_vars before rendering."}}},"response_schema_ref":"comm-email/TemplatePreview.json","response":{"title":"TemplatePreview","description":"Result of infra.email.template.preview — renders subject + body with given vars. See docs/Infrai_SDK_Comm.md §4.2.","type":"object","required":["rendered_subject","rendered_html","missing_vars"],"additionalProperties":false,"properties":{"rendered_subject":{"type":"string","description":"Rendered subject line with variables substituted"},"rendered_html":{"type":"string","description":"Rendered HTML body with variables substituted"},"rendered_text":{"type":["string","null"],"description":"Rendered plain text body with variables substituted"},"missing_vars":{"type":"array","items":{"type":"string"},"description":"Variables referenced by template but missing from input + default_vars."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/email/template/preview/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"vars\": {}}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/email/template/preview/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'vars': {}},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/preview/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"vars\": {}}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/preview/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"vars\": {}}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"vars\": {}}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/email/template/preview/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/template/preview/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"vars\\\": {}}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/email/template/preview/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"vars\\\": {}}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/template/preview/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"vars\\\": {}}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/template/preview/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"vars\": {}}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/email/template/preview/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"vars\": {}}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"vars":{}}}},{"id":"email.template.update","module":"comm-email","namespace":"email","action":"template.update","method":"PATCH","path":"/v1/email/template/update/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Update an existing email template.","request_schema_ref":"comm-email/TemplateUpdateRequest.json","params":{"title":"TemplateUpdateRequest","description":"Patch a stored email template for email.template.update (PATCH /v1/email/templates/{id}). Returns Template. See docs/Infrai_SDK_Comm.md §4.1.","type":"object","additionalProperties":false,"properties":{"subject":{"type":["string","null"],"description":"May contain double-brace var placeholders."},"html":{"type":["string","null"],"description":"HTML body; may contain double-brace var, double-brace #section, double-brace ^inverted."},"body_text":{"type":["string","null"],"description":"Plain-text alternative."},"variables":{"type":["object","null"],"description":"Template variable definitions"},"default_vars":{"type":["object","null"],"description":"Default variable values for the template"},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Tags for categorization and filtering"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"comm-email/Template.json","response":{"title":"Template","description":"Stored email template (Mustache-compatible subset). See docs/Infrai_SDK_Comm.md §4.","type":"object","required":["template_id","name","subject","html","created_at","updated_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","pattern":"^tmpl_[A-Za-z0-9]{20,}$","description":"Identifier of the template used for rendering"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Unique within account."},"subject":{"type":"string","description":"May contain double-brace var placeholders."},"html":{"type":"string","description":"HTML body; may contain double-brace var, double-brace #section, double-brace ^inverted."},"body_text":{"type":["string","null"],"description":"Plain-text alternative."},"variables":{"type":["object","null"],"description":"Declared variables: { name: 'string' | 'int' | 'bool' | 'array' | 'object' }."},"default_vars":{"type":["object","null"],"description":"Defaults used when var missing in send()."},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Tags for categorization and filtering"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","DOMAIN_NOT_VERIFIED","EMAIL_ALREADY_HAS_ACCOUNT","EMAIL_BATCH_TOO_LARGE","EMAIL_CONFIRMATION_REQUIRED","EMAIL_EXPIRED","EMAIL_INVALID_RETENTION","EMAIL_INVALID_STATE","EMAIL_NOT_CONFIGURED","EMAIL_NOT_FOUND","EMAIL_PRO_REQUIRED","EMAIL_REPUTATION_SUSPENDED","EMAIL_SEND_FAILED","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_RECIPIENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SUPPRESSED_RECIPIENT","TEMPLATE_VAR_MISSING","TOO_MANY_RECIPIENTS","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/email/template/update/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/email/template/update/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/email/template/update/ID\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/email/template/update/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/email/template/update/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/email/template/update/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/email/template/update/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/email/template/update/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/email/template/update/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"errors.capture","module":"observability","namespace":"errors","action":"capture","method":"POST","path":"/v1/errors/capture","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Capture an error event, aggregated into a group by fingerprint.","request_schema_ref":"observability/ErrorCaptureRequest.json","params":{"title":"ErrorCaptureRequest","description":"Request shape for errors.capture — ingest an error/exception event. Returns the event_id. The title falls back to message or exception.value when absent.","type":"object","additionalProperties":false,"properties":{"title":{"type":["string","null"],"description":"Short error title; falls back to message or exception.value."},"message":{"type":["string","null"],"description":"Detailed message content"},"exception":{"type":["object","null"],"description":"Structured exception, e.g. {type, value, stacktrace}."},"level":{"type":"string","default":"error","description":"Severity level (e.g. error, warning, info)."},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"fingerprint":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Grouping fingerprint."},"breadcrumbs":{"type":["array","null"],"items":{"type":"object"},"description":"List of breadcrumb events leading up to the error"},"context":{"type":["object","null"],"description":"Additional context data for the error"},"extra":{"type":["object","null"],"description":"Extra metadata attached to the error event"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"service":{"type":["string","null"],"description":"Service that emitted the error. Stored in the event context."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"observability/CaptureData.json","response":{"title":"CaptureData","description":"Inner data payload returned by infra.error.capture. See docs/Infrai_SDK_Observability.md §3.2.","type":"object","required":["event_id","fingerprint","error_group_id","is_new_group","dashboard_url"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Hex sha256 used for grouping."},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"is_new_group":{"type":"boolean","description":"Whether this capture created a new error group"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/errors/capture \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/errors/capture\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/capture\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/capture\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/errors/capture\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/capture\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/errors/capture\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/capture\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/capture\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/errors/capture\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"errors.events","module":"observability","namespace":"errors","action":"events","method":"GET","path":"/v1/errors/events/{error_group_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Page through all events within an error group.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/ErrorEventList.json","response":{"title":"ErrorEventList","description":"Cursor-paginated event stream for errors.events — items are ErrorSummary (light-weight, no full stacktrace).","type":"object","required":["items","total"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"ErrorSummary","description":"Light-weight error event used in list / search responses; omits full stacktrace. See docs/Infrai_SDK_Observability.md §4.2.","type":"object","required":["event_id","fingerprint","error_group_id","timestamp","level","title","is_resolved","is_ignored","dashboard_url"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Hex sha256 grouping fingerprint."},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/events/ERROR_GROUP_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"errors.get","module":"observability","namespace":"errors","action":"get","method":"GET","path":"/v1/errors/get/{event_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the details of one error event by event ID.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/ErrorEvent.json","response":{"title":"ErrorEvent","type":"object","required":["event_id","fingerprint","timestamp","level","title"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Fingerprint hash for error grouping"},"error_group_id":{"type":"string","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"enum":["production","staging","development",null],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":"object","description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","default":false,"description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","default":false,"description":"Whether this error or group is marked as ignored"},"exception":{"type":["object","null"],"description":"Exception details including type and stacktrace"},"breadcrumbs":{"type":"array","items":{"type":"object"},"description":"List of breadcrumb events leading up to the error"},"context":{"type":"object","description":"Additional context data for the error"},"extra":{"type":"object","description":"Extra metadata attached to the error event"},"idempotency_key":{"type":["string","null"],"description":"Dedup key for errors.capture (route is idempotent:true)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/get/EVENT_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/get/EVENT_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/get/EVENT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/get/EVENT_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/get/EVENT_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/get/EVENT_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/get/EVENT_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/get/EVENT_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/get/EVENT_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/get/EVENT_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"errors.group_detail","module":"observability","namespace":"errors","action":"group_detail","method":"GET","path":"/v1/errors/group_detail/{error_group_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Get the aggregated details of a specified error group.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/ErrorGroupDetail.json","response":{"title":"ErrorGroupDetail","description":"Superset of ErrorGroup with representative event + distribution + timeline + activity. See docs/Infrai_SDK_Observability.md §4.6.","type":"object","required":["error_group_id","fingerprint","title","first_seen_at","last_seen_at","count","user_count","level","is_resolved","is_ignored","sample_event_id","dashboard_url","representative_event"],"additionalProperties":false,"properties":{"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"fingerprint":{"type":"string","description":"Fingerprint hash for error grouping"},"title":{"type":"string","description":"Short title or summary"},"first_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was first observed"},"last_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was last observed"},"count":{"type":"integer","minimum":1,"description":"Total number of items across all pages"},"user_count":{"type":"integer","minimum":0,"description":"Number of unique users affected"},"level":{"type":"string","description":"Severity or log level (e.g. info, warn, error)"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"assigned_to":{"type":["string","null"],"description":"User assigned to investigate this error group"},"sample_event_id":{"type":"string","description":"ID of a sample event from this error group"},"environments":{"type":["array","null"],"items":{"type":"string"},"description":"List of environments where this error has been seen"},"releases":{"type":["array","null"],"items":{"type":"string"},"description":"List of software releases where this error has been seen"},"trend_24h":{"type":["object","null"],"description":"24-hour trend data for this error group"},"sparkline":{"type":["array","null"],"items":{"type":"integer","minimum":0},"description":"Sparkline data points for error frequency visualization"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"},"representative_event":{"description":"Representative error event for this group","title":"ErrorDetail","type":"object","required":["event_id","fingerprint","error_group_id","timestamp","level","title","exception","is_resolved","is_ignored","dashboard_url","received_at","fingerprint_source","group_first_seen_at","group_last_seen_at","group_count","group_user_count"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Fingerprint hash for error grouping"},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"},"exception":{"description":"Exception details including type and stacktrace","title":"ExceptionInfo","type":"object","required":["type","value","stacktrace"],"additionalProperties":false,"properties":{"type":{"type":"string","description":"Exception class name, e.g. 'NullPointerException'."},"value":{"type":"string","description":"Exception message."},"stacktrace":{"type":"array","items":{"title":"StackFrame","description":"One frame in an exception stacktrace. See docs/Infrai_SDK_Observability.md §4.3.","type":"object","required":["func","file","line","in_app"],"additionalProperties":false,"properties":{"func":{"type":"string","description":"Function name in the stack frame"},"file":{"type":"string","description":"Source file name in the stack frame"},"line":{"type":"integer","minimum":0,"description":"Line number in the source file"},"col":{"type":["integer","null"],"minimum":0,"description":"Column number in the source file"},"in_app":{"type":"boolean","description":"true if frame is in user code; false for SDK / stdlib."},"context_pre":{"type":["array","null"],"items":{"type":"string"},"description":"Up to 5 lines of source before the error line."},"context_line":{"type":["string","null"],"description":"Source line where the error occurred."},"context_post":{"type":["array","null"],"items":{"type":"string"},"description":"Source code lines after the error line"},"vars":{"type":["object","null"],"description":"Local variable snapshot (PII scrubbed)."}}},"description":"Stack trace of the error"}}},"breadcrumbs":{"type":"array","items":{"title":"Breadcrumb","description":"One breadcrumb describing user / system activity leading up to an error. See docs/Infrai_SDK_Observability.md §3.3.","type":"object","required":["at","category","message"],"additionalProperties":false,"properties":{"at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"category":{"type":"string","examples":["http","db","ui","log","navigation","auth","rpc"],"description":"Consent category (e.g. marketing, analytics)"},"message":{"type":"string","description":"Detailed message content"},"level":{"type":["string","null"],"enum":["debug","info","warning","error","critical",null],"description":"Severity or log level (e.g. info, warn, error)"},"data":{"type":["object","null"],"description":"Free-form structured data attached to this breadcrumb."}}},"description":"List of breadcrumb events leading up to the error"},"context":{"type":["object","null"],"description":"Additional context data for the error"},"extra":{"type":["object","null"],"description":"Extra metadata attached to the error event"},"sdk":{"type":["object","null"],"description":"{ name, version }"},"runtime":{"type":["object","null"],"description":"{ name, version, os }"},"request":{"type":["object","null"],"description":"HTTP request info (scrubbed)."},"user":{"type":["object","null"],"description":"User info (scrubbed)."},"fingerprint_source":{"enum":["default","user","rule"],"description":"Source of the error fingerprint"},"received_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the error was received by the server"},"group_first_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this group was first seen"},"group_last_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this group was last seen"},"group_count":{"type":"integer","minimum":1,"description":"Number of events in this error group"},"group_user_count":{"type":"integer","minimum":0,"description":"Number of unique users affected in this group"}}},"tag_distribution":{"type":["object","null"],"description":"{ tag_name: { value: count } }."},"user_distribution":{"type":["object","null"],"description":"Top affected users: { user_id: count }."},"release_distribution":{"type":["object","null"],"description":"Distribution of events across software releases"},"environment_distribution":{"type":["object","null"],"description":"Distribution of events across environments"},"timeline":{"type":["array","null"],"items":{"type":"object"},"description":"24h time-series points."},"comments":{"type":["array","null"],"items":{"type":"object"},"description":"List of comments on this error group"},"activity_log":{"type":["array","null"],"items":{"type":"object"},"description":"List of activity log entries for the error group"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/group_detail/ERROR_GROUP_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"errors.groups","module":"observability","namespace":"errors","action":"groups","method":"GET","path":"/v1/errors/groups","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Page through error groups, with status filtering and sorting.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/ErrorGroupList.json","response":{"title":"ErrorGroupList","description":"Cursor-paginated result for errors.groups — fingerprint-aggregated error groups for the error dashboard main view.","type":"object","required":["groups","total"],"additionalProperties":false,"properties":{"groups":{"type":"array","items":{"title":"ErrorGroup","description":"Aggregation of all error events sharing the same fingerprint. See docs/Infrai_SDK_Observability.md §4.5 and enums/error_group_status.yaml.","type":"object","required":["error_group_id","fingerprint","title","first_seen_at","last_seen_at","count","user_count","level","is_resolved","is_ignored","sample_event_id","dashboard_url"],"additionalProperties":false,"properties":{"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"fingerprint":{"type":"string","description":"Fingerprint hash for error grouping"},"title":{"type":"string","description":"Short title or summary"},"first_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was first observed"},"last_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was last observed"},"count":{"type":"integer","minimum":1,"description":"Total number of items across all pages"},"user_count":{"type":"integer","minimum":0,"description":"Number of unique users affected"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"assigned_to":{"type":["string","null"],"description":"User assigned to investigate this error group"},"sample_event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"ID of a sample event from this error group"},"environments":{"type":["array","null"],"items":{"type":"string"},"description":"List of environments where this error has been seen"},"releases":{"type":["array","null"],"items":{"type":"string"},"description":"List of software releases where this error has been seen"},"trend_24h":{"type":["object","null"],"description":"{ current, previous, change_pct }."},"sparkline":{"type":["array","null"],"items":{"type":"integer","minimum":0},"description":"24-bucket hourly event counts for mini chart."},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"description":"List of error group objects"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor for next page; null = end."},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/groups \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/groups\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/groups\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/groups\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/groups\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/groups\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/groups\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/groups\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/groups\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/groups\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"errors.list","module":"observability","namespace":"errors","action":"list","method":"GET","path":"/v1/errors/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Page through captured error events, with filtering.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/ErrorEventList.json","response":{"title":"ErrorEventList","description":"Cursor-paginated event stream for errors.events — items are ErrorSummary (light-weight, no full stacktrace).","type":"object","required":["items","total"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"ErrorSummary","description":"Light-weight error event used in list / search responses; omits full stacktrace. See docs/Infrai_SDK_Observability.md §4.2.","type":"object","required":["event_id","fingerprint","error_group_id","timestamp","level","title","is_resolved","is_ignored","dashboard_url"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Hex sha256 grouping fingerprint."},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"errors.message","module":"observability","namespace":"errors","action":"message","method":"POST","path":"/v1/errors/message","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Capture a structured error/log message (level, tags, user, release, environment).","request_schema_ref":"observability/ErrorMessageRequest.json","params":{"title":"ErrorMessageRequest","description":"Request shape for errors.message — capture a plain-text message event (twin of error.capture, no exception). Returns CaptureResult.","type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","minLength":1,"description":"Message body; becomes the event title."},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"default":"info","description":"Severity or log level (e.g. info, warn, error)"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"release":{"type":["string","null"],"description":"Software release version"},"environment":{"type":["string","null"],"enum":["production","staging","development",null],"description":"Deployment environment (e.g. production, staging)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"observability/CaptureData.json","response":{"title":"CaptureData","description":"Inner data payload returned by infra.error.capture. See docs/Infrai_SDK_Observability.md §3.2.","type":"object","required":["event_id","fingerprint","error_group_id","is_new_group","dashboard_url"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Hex sha256 used for grouping."},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"is_new_group":{"type":"boolean","description":"Whether this capture created a new error group"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/errors/message \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/errors/message\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'text': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/message\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"text\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/message\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"text\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"text\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/errors/message\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/message\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"text\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/errors/message\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"text\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/message\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"text\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/message\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"text\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/errors/message\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"text\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"text":"hello"}}},{"id":"errors.resolve","module":"observability","namespace":"errors","action":"resolve","method":"POST","path":"/v1/errors/resolve/{error_group_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Mark an error group as resolved.","request_schema_ref":"observability/ErrorGroupActionRequest.json","params":{"title":"ErrorGroupActionRequest","description":"Request shape for errors.resolve / .unresolve / .ignore — PATCH a single error group to a fixed target triage state (naturally idempotent). Returns ErrorGroupDetail.","type":"object","required":["error_group_id"],"additionalProperties":false,"properties":{"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"}}},"response_schema_ref":"observability/ErrorBulkResult.json","response":{"title":"ErrorBulkResult","description":"Result of errors.resolve/unresolve/ignore. Despite the legacy name this is a single-group lifecycle action, not a bulk update — the handler returns the full updated ErrorGroupDetail, not an {updated: count} tally (errors.bulk, the true bulk-by-ids action, is a distinct cap not wired to this schema).","type":"object","required":["error_group_id","fingerprint","title","first_seen_at","last_seen_at","count","user_count","level","is_resolved","is_ignored","sample_event_id","dashboard_url","representative_event"],"additionalProperties":false,"properties":{"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"fingerprint":{"type":"string","description":"Fingerprint hash for error grouping"},"title":{"type":"string","description":"Short title or summary"},"first_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was first observed"},"last_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this was last observed"},"count":{"type":"integer","minimum":1,"description":"Total number of items across all pages"},"user_count":{"type":"integer","minimum":0,"description":"Number of unique users affected"},"level":{"type":"string","description":"Severity or log level (e.g. info, warn, error)"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"assigned_to":{"type":["string","null"],"description":"User assigned to investigate this error group"},"sample_event_id":{"type":"string","description":"ID of a sample event from this error group"},"environments":{"type":["array","null"],"items":{"type":"string"},"description":"List of environments where this error has been seen"},"releases":{"type":["array","null"],"items":{"type":"string"},"description":"List of software releases where this error has been seen"},"trend_24h":{"type":["object","null"],"description":"24-hour trend data for this error group"},"sparkline":{"type":["array","null"],"items":{"type":"integer","minimum":0},"description":"Sparkline data points for error frequency visualization"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"},"representative_event":{"description":"Representative error event for this group","title":"ErrorDetail","type":"object","required":["event_id","fingerprint","error_group_id","timestamp","level","title","exception","is_resolved","is_ignored","dashboard_url","received_at","fingerprint_source","group_first_seen_at","group_last_seen_at","group_count","group_user_count"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Fingerprint hash for error grouping"},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"},"exception":{"description":"Exception details including type and stacktrace","title":"ExceptionInfo","type":"object","required":["type","value","stacktrace"],"additionalProperties":false,"properties":{"type":{"type":"string","description":"Exception class name, e.g. 'NullPointerException'."},"value":{"type":"string","description":"Exception message."},"stacktrace":{"type":"array","items":{"title":"StackFrame","description":"One frame in an exception stacktrace. See docs/Infrai_SDK_Observability.md §4.3.","type":"object","required":["func","file","line","in_app"],"additionalProperties":false,"properties":{"func":{"type":"string","description":"Function name in the stack frame"},"file":{"type":"string","description":"Source file name in the stack frame"},"line":{"type":"integer","minimum":0,"description":"Line number in the source file"},"col":{"type":["integer","null"],"minimum":0,"description":"Column number in the source file"},"in_app":{"type":"boolean","description":"true if frame is in user code; false for SDK / stdlib."},"context_pre":{"type":["array","null"],"items":{"type":"string"},"description":"Up to 5 lines of source before the error line."},"context_line":{"type":["string","null"],"description":"Source line where the error occurred."},"context_post":{"type":["array","null"],"items":{"type":"string"},"description":"Source code lines after the error line"},"vars":{"type":["object","null"],"description":"Local variable snapshot (PII scrubbed)."}}},"description":"Stack trace of the error"}}},"breadcrumbs":{"type":"array","items":{"title":"Breadcrumb","description":"One breadcrumb describing user / system activity leading up to an error. See docs/Infrai_SDK_Observability.md §3.3.","type":"object","required":["at","category","message"],"additionalProperties":false,"properties":{"at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"category":{"type":"string","examples":["http","db","ui","log","navigation","auth","rpc"],"description":"Consent category (e.g. marketing, analytics)"},"message":{"type":"string","description":"Detailed message content"},"level":{"type":["string","null"],"enum":["debug","info","warning","error","critical",null],"description":"Severity or log level (e.g. info, warn, error)"},"data":{"type":["object","null"],"description":"Free-form structured data attached to this breadcrumb."}}},"description":"List of breadcrumb events leading up to the error"},"context":{"type":["object","null"],"description":"Additional context data for the error"},"extra":{"type":["object","null"],"description":"Extra metadata attached to the error event"},"sdk":{"type":["object","null"],"description":"{ name, version }"},"runtime":{"type":["object","null"],"description":"{ name, version, os }"},"request":{"type":["object","null"],"description":"HTTP request info (scrubbed)."},"user":{"type":["object","null"],"description":"User info (scrubbed)."},"fingerprint_source":{"enum":["default","user","rule"],"description":"Source of the error fingerprint"},"received_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the error was received by the server"},"group_first_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this group was first seen"},"group_last_seen_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this group was last seen"},"group_count":{"type":"integer","minimum":1,"description":"Number of events in this error group"},"group_user_count":{"type":"integer","minimum":0,"description":"Number of unique users affected in this group"}}},"tag_distribution":{"type":["object","null"],"description":"{ tag_name: { value: count } }."},"user_distribution":{"type":["object","null"],"description":"Top affected users: { user_id: count }."},"release_distribution":{"type":["object","null"],"description":"Distribution of events across software releases"},"environment_distribution":{"type":["object","null"],"description":"Distribution of events across environments"},"timeline":{"type":["array","null"],"items":{"type":"object"},"description":"24h time-series points."},"comments":{"type":["array","null"],"items":{"type":"object"},"description":"List of comments on this error group"},"activity_log":{"type":["array","null"],"items":{"type":"object"},"description":"List of activity log entries for the error group"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"error_group_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'error_group_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"error_group_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"error_group_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"error_group_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"error_group_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"error_group_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"error_group_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"error_group_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/errors/resolve/ERROR_GROUP_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"error_group_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"error_group_id":"sample"}}},{"id":"errors.search","module":"observability","namespace":"errors","action":"search","method":"GET","path":"/v1/errors/search","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Full-text search error events by keyword.","request_schema_ref":"observability/ErrorSearchRequest.json","params":{"title":"ErrorSearchRequest","description":"Query shape for errors.search — full-text search across error events (title / message / stacktrace). Shares the ErrorList result with error.list.","type":"object","required":["q"],"additionalProperties":false,"properties":{"q":{"type":"string","minLength":1,"description":"Full-text query string."},"cursor":{"type":["string","null"],"description":"Opaque pagination cursor."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of items to return per page"}}},"response_schema_ref":"observability/ErrorEventList.json","response":{"title":"ErrorEventList","description":"Cursor-paginated event stream for errors.events — items are ErrorSummary (light-weight, no full stacktrace).","type":"object","required":["items","total"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"ErrorSummary","description":"Light-weight error event used in list / search responses; omits full stacktrace. See docs/Infrai_SDK_Observability.md §4.2.","type":"object","required":["event_id","fingerprint","error_group_id","timestamp","level","title","is_resolved","is_ignored","dashboard_url"],"additionalProperties":false,"properties":{"event_id":{"type":"string","pattern":"^evt_err_[A-Za-z0-9]{20,}$","description":"Unique identifier for this event"},"fingerprint":{"type":"string","description":"Hex sha256 grouping fingerprint."},"error_group_id":{"type":"string","pattern":"^errgrp_[A-Za-z0-9]{20,}$","description":"Identifier of the error group this event belongs to"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"title":{"type":"string","description":"Short title or summary"},"message":{"type":["string","null"],"description":"Detailed message content"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"release":{"type":["string","null"],"description":"Software release version"},"user_id":{"type":["string","null"],"description":"User identifier associated with this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"is_resolved":{"type":"boolean","description":"Whether this error or group is marked as resolved"},"is_ignored":{"type":"boolean","description":"Whether this error or group is marked as ignored"},"dashboard_url":{"type":"string","format":"uri","description":"URL to view this resource in the dashboard"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/errors/search?q=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/errors/search?q=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/search?q=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/errors/search?q=sample\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/errors/search?q=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/errors/search?q=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/errors/search?q=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/errors/search?q=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/errors/search?q=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/errors/search?q=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"q":"sample"}}},{"id":"flags.delete","module":"observability","namespace":"flags","action":"delete","method":"DELETE","path":"/v1/flags/delete/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a feature flag permanently.","request_schema_ref":"observability/FlagDeleteRequest.json","params":{"title":"FlagDeleteRequest","description":"Request shape for flags.delete — permanently remove a flag definition. Returns ObservabilityDeleteResult.","type":"object","required":["key"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"}}},"response_schema_ref":"observability/OkResult.json","response":{"title":"OkResult","description":"Result of flags.delete — idempotent delete acknowledgement. Sole consumer per infrai-spec/gateway/result_schemas.yaml; the name is legacy wire-compat, the real shape is {id, deleted}, not a generic {ok:true}.","type":"object","required":["id","deleted"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"The flag key that was targeted for deletion"},"deleted":{"type":"boolean","description":"Whether the flag existed and was deleted; false is an idempotent no-op when the flag was already absent"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/flags/delete/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/flags/delete/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/delete/KEY\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/delete/KEY\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/flags/delete/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/delete/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/flags/delete/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/delete/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/delete/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/flags/delete/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"key":"sample"}}},{"id":"flags.get","module":"observability","namespace":"flags","action":"get","method":"GET","path":"/v1/flags/get/{key}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Retrieve the full definition of a feature flag.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/Flag.json","response":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/flags/get/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/flags/get/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/flags/get/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/get/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/flags/get/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/get/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/get/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/flags/get/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"flags.get_all","module":"observability","namespace":"flags","action":"get_all","method":"GET","path":"/v1/flags/get_all","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Evaluate all feature flags at once for a given evaluation context.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/FlagList.json","response":{"title":"FlagList","description":"Result shared by flags.list (cursor-paginated items/total) and flags.get_all (flat key->value map; no pagination) — the two caps have genuinely different wire shapes, so both property sets are optional here.","type":"object","required":[],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"description":"Array of result items in this page (flags.list only)"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page (flags.list only)"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages (flags.list only)"},"flags":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Map of flag key to evaluated boolean value for the caller's context (flags.get_all only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/flags/get_all \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/flags/get_all\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get_all\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get_all\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/flags/get_all\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/get_all\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/flags/get_all\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/get_all\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/get_all\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/flags/get_all\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"flags.get_value","module":"observability","namespace":"flags","action":"get_value","method":"GET","path":"/v1/flags/get_value/{key}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Evaluate a single feature flag's value for a given evaluation context.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/FlagValue.json","response":{"title":"FlagValue","description":"Result shared by flags.get_value (value + winning variant) and flags.is_enabled (value + echoed key/enabled, no variant).","type":"object","required":["value"],"additionalProperties":false,"properties":{"value":{"description":"Evaluated flag value for the supplied user/context (type matches flag.type)."},"variant":{"oneOf":[{"title":"Variant","description":"One variant inside a multi-variant rollout (A/B/C test). See docs/Infrai_SDK_Observability.md §1.2.","type":"object","required":["value","weight"],"additionalProperties":false,"properties":{"value":{"description":"Variant value; type must match flag.type."},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"0..100; sum of weights must be <= rollout.percentage."}}},{"type":"null"}],"description":"Winning variant when a multi-variant rollout was applied; null otherwise (flags.get_value only)."},"key":{"type":"string","description":"Flag key that was evaluated (flags.is_enabled only)."},"enabled":{"type":"boolean","description":"Boolean-coerced evaluation result, same value as `value` (flags.is_enabled only)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/flags/get_value/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/flags/get_value/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get_value/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/get_value/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/flags/get_value/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/get_value/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/flags/get_value/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/get_value/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/get_value/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/flags/get_value/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"flags.is_enabled","module":"observability","namespace":"flags","action":"is_enabled","method":"GET","path":"/v1/flags/is_enabled/{key}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Check whether a feature flag is enabled for the current evaluation context.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/FlagValue.json","response":{"title":"FlagValue","description":"Result shared by flags.get_value (value + winning variant) and flags.is_enabled (value + echoed key/enabled, no variant).","type":"object","required":["value"],"additionalProperties":false,"properties":{"value":{"description":"Evaluated flag value for the supplied user/context (type matches flag.type)."},"variant":{"oneOf":[{"title":"Variant","description":"One variant inside a multi-variant rollout (A/B/C test). See docs/Infrai_SDK_Observability.md §1.2.","type":"object","required":["value","weight"],"additionalProperties":false,"properties":{"value":{"description":"Variant value; type must match flag.type."},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"0..100; sum of weights must be <= rollout.percentage."}}},{"type":"null"}],"description":"Winning variant when a multi-variant rollout was applied; null otherwise (flags.get_value only)."},"key":{"type":"string","description":"Flag key that was evaluated (flags.is_enabled only)."},"enabled":{"type":"boolean","description":"Boolean-coerced evaluation result, same value as `value` (flags.is_enabled only)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/flags/is_enabled/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/flags/is_enabled/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/is_enabled/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/is_enabled/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/flags/is_enabled/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/is_enabled/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/flags/is_enabled/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/is_enabled/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/is_enabled/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/flags/is_enabled/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"flags.list","module":"observability","namespace":"flags","action":"list","method":"GET","path":"/v1/flags/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List feature flags with pagination, optionally including archived ones.","request_schema_ref":null,"params":{},"response_schema_ref":"observability/FlagList.json","response":{"title":"FlagList","description":"Result shared by flags.list (cursor-paginated items/total) and flags.get_all (flat key->value map; no pagination) — the two caps have genuinely different wire shapes, so both property sets are optional here.","type":"object","required":[],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"description":"Array of result items in this page (flags.list only)"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page (flags.list only)"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages (flags.list only)"},"flags":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Map of flag key to evaluated boolean value for the caller's context (flags.get_all only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/flags/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/flags/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/flags/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/flags/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/flags/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"flags.rollout","module":"observability","namespace":"flags","action":"rollout","method":"POST","path":"/v1/flags/rollout/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Configure a percentage-based gradual rollout for a feature flag.","request_schema_ref":"observability/FlagRolloutRequest.json","params":{"title":"FlagRolloutRequest","description":"Request shape for flags.rollout — configure percentage / sticky-bucket / multi-variant rollout under optimistic lock. Returns the full Flag. Flat signature mirrors RolloutConfig.","type":"object","required":["key","percentage","salt","sticky_unit","version"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"percentage":{"type":"integer","minimum":0,"maximum":100,"description":"Rollout percentage (0-100)"},"salt":{"type":"string","description":"Consistent-hash salt; rotate to reshuffle bucket assignments."},"sticky_unit":{"type":"string","enum":["user_id","session_id","device_id"],"default":"user_id","description":"Sticky unit for consistent rollout assignment"},"variants":{"type":["array","null"],"items":{"title":"Variant","description":"One variant inside a multi-variant rollout (A/B/C test). See docs/Infrai_SDK_Observability.md §1.2.","type":"object","required":["value","weight"],"additionalProperties":false,"properties":{"value":{"description":"Variant value; type must match flag.type."},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"0..100; sum of weights must be <= rollout.percentage."}}},"description":"Variant definitions for the flag"},"version":{"type":"integer","minimum":1,"description":"Current version; mismatch triggers FLAG_VERSION_CONFLICT."}}},"response_schema_ref":"observability/Flag.json","response":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/flags/rollout/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/flags/rollout/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'key': 'sample', 'percentage': 1, 'salt': 'sample', 'sticky_unit': 'user_id', 'version': 1},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/rollout/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/rollout/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/flags/rollout/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/rollout/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key\\\": \\\"sample\\\", \\\"percentage\\\": 1, \\\"salt\\\": \\\"sample\\\", \\\"sticky_unit\\\": \\\"user_id\\\", \\\"version\\\": 1}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/flags/rollout/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"key\\\": \\\"sample\\\", \\\"percentage\\\": 1, \\\"salt\\\": \\\"sample\\\", \\\"sticky_unit\\\": \\\"user_id\\\", \\\"version\\\": 1}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/rollout/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"key\\\": \\\"sample\\\", \\\"percentage\\\": 1, \\\"salt\\\": \\\"sample\\\", \\\"sticky_unit\\\": \\\"user_id\\\", \\\"version\\\": 1}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/rollout/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/flags/rollout/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"key\": \"sample\", \"percentage\": 1, \"salt\": \"sample\", \"sticky_unit\": \"user_id\", \"version\": 1}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"key":"sample","percentage":1,"salt":"sample","sticky_unit":"user_id","version":1}}},{"id":"flags.set","module":"observability","namespace":"flags","action":"set","method":"POST","path":"/v1/flags/set","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create or update a feature-flag definition.","request_schema_ref":"observability/FlagSetRequest.json","params":{"title":"FlagSetRequest","description":"Request shape for flags.set (POST /v1/flags, upsert). SDK ergonomic surface = flag.create(key, description, ...) and flag.update(key, **patch, version) both map here. Create omits version (server assigns version=1). Update MUST carry the current version (integer>=1) for optimistic locking (FLAG_VERSION_CONFLICT). Returns the full Flag.","type":"object","required":["key"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":["string","null"],"minLength":5,"maxLength":500,"description":"Required on create (FLAG_DESCRIPTION_TOO_SHORT if <5 chars)."},"type":{"type":["string","null"],"enum":["bool","string","number","json",null],"description":"Flag value type (enums/flag_type.yaml). Defaults to bool on create."},"default_value":{"description":"Value returned when no rule matches; type must match `type` (FLAG_TYPE_MISMATCH)."},"rules":{"type":["array","null"],"items":{"title":"FlagRule","description":"Conditional rule on a feature flag. if_ is a recursive predicate using enums/flag_operator.yaml; then is the value returned when matched.","type":"object","required":["if","then"],"additionalProperties":false,"properties":{"if":{"description":"Predicate object. Top-level keys are context field paths (e.g. 'user_id', 'context.country') OR boolean composition keys ($and / $or / $not). Leaf values are operator objects { eq: ..., in: [...], gte: ..., matches: '...', percentage: N, cohort: 'cohort_id', ... }.","type":"object"},"then":{"description":"Value returned when the predicate matches. Type must match flag.type."},"description":{"type":["string","null"],"description":"Human-readable explanation."}}},"description":"Targeting rules for the flag"},"rollout":{"oneOf":[{"title":"RolloutConfig","description":"Percentage / sticky-bucket rollout config attached to a feature flag. See docs/Infrai_SDK_Observability.md §1.2.","type":"object","required":["percentage","salt","sticky_unit"],"additionalProperties":false,"properties":{"percentage":{"type":"integer","minimum":0,"maximum":100,"description":"Rollout percentage (0-100)"},"salt":{"type":"string","description":"Consistent-hash salt; rotate to reshuffle bucket assignments."},"variants":{"type":["array","null"],"items":{"title":"Variant","description":"One variant inside a multi-variant rollout (A/B/C test). See docs/Infrai_SDK_Observability.md §1.2.","type":"object","required":["value","weight"],"additionalProperties":false,"properties":{"value":{"description":"Variant value; type must match flag.type."},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"0..100; sum of weights must be <= rollout.percentage."}}},"description":"Variant definitions for the flag"},"sticky_unit":{"enum":["user_id","session_id","device_id"],"default":"user_id","description":"Sticky unit for consistent rollout assignment"}}},{"type":"null"}],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"enabled":{"type":["boolean","null"],"default":true,"description":"Whether this feature or configuration is enabled"},"version":{"type":["integer","null"],"minimum":1,"description":"Required for update (optimistic lock). Omit for create."}}},"response_schema_ref":"observability/Flag.json","response":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/flags/set \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/flags/set\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'key': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/set\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/set\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"key\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/flags/set\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/set\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/flags/set\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"key\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/set\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"key\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/set\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"key\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/flags/set\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"key\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"key":"sample"}}},{"id":"flags.toggle","module":"observability","namespace":"flags","action":"toggle","method":"POST","path":"/v1/flags/toggle/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Enable or disable a feature flag with optimistic version checking.","request_schema_ref":"observability/FlagToggleRequest.json","params":{"title":"FlagToggleRequest","description":"Request shape for flags.toggle — flip a flag's enabled state under optimistic lock. Returns the full Flag.","type":"object","required":["key","enabled","version"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"enabled":{"type":"boolean","description":"Whether this feature or configuration is enabled"},"version":{"type":"integer","minimum":1,"description":"Current version; mismatch triggers FLAG_VERSION_CONFLICT."}}},"response_schema_ref":"observability/Flag.json","response":{"title":"Flag","type":"object","required":["key","type","default_value","enabled","version","created_at","updated_at"],"additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9_.-]{1,128}$","description":"Unique identifier key for this resource"},"description":{"type":"string","minLength":5,"maxLength":500,"description":"Free-text description of this resource"},"type":{"enum":["bool","string","number","json"],"description":"Type discriminator for this resource"},"default_value":{"description":"Default value when no rules match"},"enabled":{"type":"boolean","default":true,"description":"Whether this feature or configuration is enabled"},"rules":{"type":"array","items":{"type":"object"},"description":"Targeting rules for the flag"},"rollout":{"type":["object","null"],"description":"Rollout configuration for gradual delivery"},"tags":{"type":["object","null"],"description":"Tags for categorization and filtering"},"version":{"type":"integer","minimum":1,"description":"Optimistic-lock counter."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"created_by":{"type":"string","description":"User who created this flag"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"updated_by":{"type":"string","description":"User who last updated this flag"},"archived_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this flag was archived"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/flags/toggle/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\": \"sample\", \"enabled\": true, \"version\": 1}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/flags/toggle/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'key': 'sample', 'enabled': True, 'version': 1},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/toggle/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\", \"enabled\": true, \"version\": 1}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/flags/toggle/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\", \"enabled\": true, \"version\": 1}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"key\": \"sample\", \"enabled\": true, \"version\": 1}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/flags/toggle/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/flags/toggle/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key\\\": \\\"sample\\\", \\\"enabled\\\": true, \\\"version\\\": 1}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/flags/toggle/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"key\\\": \\\"sample\\\", \\\"enabled\\\": true, \\\"version\\\": 1}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/flags/toggle/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"key\\\": \\\"sample\\\", \\\"enabled\\\": true, \\\"version\\\": 1}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/flags/toggle/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"key\": \"sample\", \"enabled\": true, \"version\": 1}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/flags/toggle/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"key\": \"sample\", \"enabled\": true, \"version\": 1}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"key":"sample","enabled":true,"version":1}}},{"id":"image.background_remove","module":"image-process","namespace":"image","action":"background_remove","method":"POST","path":"/v1/image/background_remove","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by AI-removing its background. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageBackgroundRemoveRequest.json","params":{"title":"ImageBackgroundRemoveRequest","description":"Request shape for image.background_remove — AI cutout (libvips_ai / cloudinary). Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/background_remove \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/background_remove\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/background_remove\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/background_remove\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/background_remove\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/background_remove\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/background_remove\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/background_remove\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/background_remove\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/background_remove\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.batch.cancel","module":"image-process","namespace":"image","action":"batch.cancel","method":"POST","path":"/v1/image/batch/cancel/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Cancel a batch image-processing job by job ID; idempotent write.","request_schema_ref":"image-process/ImageBatchCancelRequest.json","params":{"title":"ImageBatchCancelRequest","description":"Request shape for image.batch.cancel — cancel an image batch job. Returns cancelled + job_id.","type":"object","required":["job_id"],"additionalProperties":false,"properties":{"job_id":{"type":"string","description":"Id of the image batch job to cancel."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ImageBatchCancelResult.json","response":{"title":"ImageBatchCancelResult","description":"Result for image.batch.cancel. cancelled=false when the job already reached a terminal state (idempotent no-op). See REVIEW Image Processing §3.D.","type":"object","required":["cancelled"],"additionalProperties":false,"properties":{"cancelled":{"type":"boolean","description":"Whether the resource was successfully cancelled"},"job_id":{"type":["string","null"],"pattern":"^imgjob_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/batch/cancel/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"job_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/batch/cancel/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'job_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"job_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"job_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"job_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/batch/cancel/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/batch/cancel/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"job_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/batch/cancel/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"job_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/batch/cancel/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"job_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/batch/cancel/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"job_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/batch/cancel/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"job_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"job_id":"sample"}}},{"id":"image.batch.status","module":"image-process","namespace":"image","action":"batch.status","method":"GET","path":"/v1/image/batch/status/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the progress and results of a batch image-processing job by job ID.","request_schema_ref":null,"params":{},"response_schema_ref":"image-process/ImageBatchStatus.json","response":{"title":"ImageBatchStatus","description":"Result for image.batch.status — overall job state plus per-item outcomes. See REVIEW Image Processing §3.D.","type":"object","required":["job_id","status","items"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^imgjob_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"status":{"enum":["queued","in_progress","completed","failed","cancelled"],"description":"Current status of this resource"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["index","status"],"properties":{"index":{"type":"integer","minimum":0},"status":{"enum":["queued","in_progress","completed","failed"]},"result":{"anyOf":[{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},{"type":"null"}]},"error":{"type":["string","null"],"description":"Error code when this item failed."}}},"description":"Array of result items in this page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/image/batch/status/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/image/batch/status/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/image/batch/status/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/batch/status/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/image/batch/status/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/batch/status/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/batch/status/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/image/batch/status/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"image.batch.submit","module":"image-process","namespace":"image","action":"batch.submit","method":"POST","path":"/v1/image/batch/submit","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Submit a batch image-processing job and get a job handle, with optional webhook callback.","request_schema_ref":"image-process/ImageBatchSubmitRequest.json","params":{"title":"ImageBatchSubmitRequest","description":"Request shape for image.batch.submit — submit many image pipelines asynchronously. Write-idempotent. Pattern mirrors video.generate -> status -> cancel. Returns ImageBatchSubmitResult. See REVIEW Image Processing §3.D.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["image","ops"],"properties":{"image":{"title":"ImageRef","description":"Source-image reference shared by all single-op image transforms: inline bytes (url/base64) or a stable asset id (image_id). Mirrors ImageProcessRequest.image. See REVIEW Image Processing §3.A/B.","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"ops":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["op"],"properties":{"op":{"type":"string","enum":["resize","compress","crop","rotate","watermark","background_remove","smart_crop","format_convert","grayscale","blur","flip_h","flip_v"],"description":"Operation type for infra.image_process pipeline steps."},"params":{"type":["object","null"]}}}}}},"description":"Array of result items in this page"},"webhook_url":{"type":["string","null"],"format":"uri","description":"Optional completion callback; Infrai signs deliveries."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ImageBatchSubmitResult.json","response":{"title":"ImageBatchSubmitResult","description":"Non-blocking ack for image.batch.submit. See REVIEW Image Processing §3.D.","type":"object","required":["job_id","status","total_count"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^imgjob_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"status":{"enum":["queued","in_progress","completed","failed","cancelled"],"description":"Current status of this resource"},"total_count":{"type":"integer","minimum":1,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/batch/submit \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/batch/submit\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'items': [{'image': 'sample', 'ops': [{'op': 'resize'}]}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/submit\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/batch/submit\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/batch/submit\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/batch/submit\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"items\\\": [{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/batch/submit\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"items\\\": [{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/batch/submit\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"items\\\": [{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/batch/submit\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/batch/submit\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"items\": [{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"items":[{"image":"sample","ops":[{"op":"resize"}]}]}}},{"id":"image.compress","module":"image-process","namespace":"image","action":"compress","method":"POST","path":"/v1/image/compress","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by compressing it to a target quality or byte size, optionally re-encoding. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageCompressRequest.json","params":{"title":"ImageCompressRequest","description":"Request shape for image.compress — compress by quality or target byte budget (binary search). Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"quality":{"type":["integer","null"],"minimum":1,"maximum":100,"description":"Encoder quality 1-100; mutually informative with target_bytes."},"target_bytes":{"type":["integer","null"],"minimum":1,"description":"Compress to <= this byte budget via quality binary search."},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/compress \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/compress\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/compress\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/compress\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/compress\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/compress\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/compress\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/compress\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/compress\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/compress\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.convert","module":"image-process","namespace":"image","action":"convert","method":"POST","path":"/v1/image/convert","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by re-encoding it to another format (jpeg/png/webp/avif). To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageConvertRequest.json","params":{"title":"ImageConvertRequest","description":"Request shape for image.convert — re-encode into a different format. Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image","format"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/convert \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\", \"format\": \"auto\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/convert\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample', 'format': 'auto'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/convert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"format\": \"auto\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/convert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"format\": \"auto\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\", \"format\": \"auto\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/convert\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/convert\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\", \\\"format\\\": \\\"auto\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/convert\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\", \\\"format\\\": \\\"auto\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/convert\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\", \\\"format\\\": \\\"auto\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/convert\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\", \"format\": \"auto\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/convert\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\", \"format\": \"auto\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample","format":"auto"}}},{"id":"image.crop","module":"image-process","namespace":"image","action":"crop","method":"POST","path":"/v1/image/crop","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by cropping it to an x/y/w/h rectangle. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageCropRequest.json","params":{"title":"ImageCropRequest","description":"Request shape for image.crop — crop to an xywh box. Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image","x","y","width","height"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"x":{"type":"integer","minimum":0,"description":"X coordinate for crop origin"},"y":{"type":"integer","minimum":0,"description":"Y coordinate for crop origin"},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/crop \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/crop\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample', 'x': 1, 'y': 1, 'width': 1, 'height': 1},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/crop\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/crop\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/crop\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/crop\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\", \\\"x\\\": 1, \\\"y\\\": 1, \\\"width\\\": 1, \\\"height\\\": 1}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/crop\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\", \\\"x\\\": 1, \\\"y\\\": 1, \\\"width\\\": 1, \\\"height\\\": 1}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/crop\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\", \\\"x\\\": 1, \\\"y\\\": 1, \\\"width\\\": 1, \\\"height\\\": 1}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/crop\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/crop\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\", \"x\": 1, \"y\": 1, \"width\": 1, \"height\": 1}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample","x":1,"y":1,"width":1,"height":1}}},{"id":"image.delete","module":"image-process","namespace":"image","action":"delete","method":"DELETE","path":"/v1/image/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Delete a stored image asset by ID; idempotent write.","request_schema_ref":null,"params":{},"response_schema_ref":"image-process/ImageDeleteResult.json","response":{"title":"ImageDeleteResult","description":"Result for image.delete. deleted=false is an idempotent no-op (image_id unknown / already gone). See REVIEW Image Processing §3.C.","type":"object","required":["deleted"],"additionalProperties":false,"properties":{"deleted":{"type":"boolean","description":"Whether the resource was successfully deleted"},"image_id":{"type":["string","null"],"pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/image/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/image/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/image/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/image/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/image/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"image.get","module":"image-process","namespace":"image","action":"get","method":"GET","path":"/v1/image/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the metadata of one stored image asset (URL, MIME type, dimensions, byte size) by ID.","request_schema_ref":null,"params":{},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/image/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/image/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/image/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/image/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/image/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"image.metadata","module":"image-process","namespace":"image","action":"metadata","method":"POST","path":"/v1/image/metadata","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Inspect an EXISTING image's metadata (dimensions, format, EXIF) without modifying it; read-only.","request_schema_ref":"image-process/ImageMetadataRequest.json","params":{"title":"ImageMetadataRequest","description":"Request shape for image.metadata — read-only inspect. POST carries image bytes (GET impractical); route is idempotent:true as read-idempotency, not a write. Returns ImageMetadata. See REVIEW Image Processing §3.B.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]}}},"response_schema_ref":"image-process/ImageMetadata.json","response":{"title":"ImageMetadata","description":"Typed return for image.metadata. width/height/format/size_bytes always present; exif/color_space/has_alpha/orientation are nullable (needs_adapter until Pillow EXIF read lands). See REVIEW Image Processing §3.B.","type":"object","required":["width","height","format","size_bytes"],"additionalProperties":false,"properties":{"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"exif":{"type":["object","null"],"description":"Raw EXIF tag map; null when not read / not present."},"color_space":{"type":["string","null"],"description":"e.g. 'sRGB', 'CMYK'."},"has_alpha":{"type":["boolean","null"],"description":"Whether the image has an alpha channel"},"orientation":{"type":["integer","null"],"minimum":1,"maximum":8,"description":"EXIF orientation tag (1-8); null when unknown."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/metadata \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/metadata\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/metadata\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/metadata\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/metadata\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/metadata\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/metadata\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/metadata\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/metadata\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/metadata\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.moderate","module":"image-process","namespace":"image","action":"moderate","method":"POST","path":"/v1/image/moderate","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Classify an image for unsafe content (adult/violence/etc.) returning a flagged verdict plus per-category flags/scores. Real vendor dispatch: Google Vision SafeSearch, Aliyun Green image scan. service_markup applies.","request_schema_ref":"image-process/ImageModerateRequest.json","params":{"title":"ImageModerateRequest","description":"Request payload for image.moderate — classify an image for unsafe content.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"type":"string","description":"Image as data URI, URL, or base64."},"vendor":{"enum":["google","aliyun"],"description":"Optional vendor pin."}}},"response_schema_ref":"image-process/ImageModerateResult.json","response":{"title":"ImageModerateResult","description":"Result payload for image.moderate. Verdict + per-category scores are exactly what the vendor produced.","type":"object","required":["flagged","categories","category_scores","vendor"],"additionalProperties":false,"properties":{"flagged":{"type":"boolean","description":"Whether the content was flagged by moderation"},"categories":{"type":"object","additionalProperties":{"type":"boolean"},"description":"Content moderation categories that were flagged"},"category_scores":{"type":"object","additionalProperties":{"type":"number"},"description":"Confidence scores per moderation category"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"},"created_at":{"type":"string","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/moderate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/moderate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/moderate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/moderate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/moderate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/moderate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/moderate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/moderate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/moderate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/moderate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.ocr","module":"image-process","namespace":"image","action":"ocr","method":"POST","path":"/v1/image/ocr","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Extract text from an image (distinct from pdf.ocr) returning full text plus per-line blocks. Real vendor dispatch: Aliyun OCR, Baidu OCR, AWS Textract; self_hosted tesseract honestly degrades to a 503 when the binary is absent (no synthetic text).","request_schema_ref":"image-process/ImageOcrRequest.json","params":{"title":"ImageOcrRequest","description":"Request payload for image.ocr — extract text from an image (distinct from pdf.ocr).","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"type":"string","description":"Image as data URI, URL, or base64."},"language":{"type":"string","description":"Optional language hint (e.g. eng, chi_sim)."},"vendor":{"enum":["aliyun","baidu","aws","self_hosted"],"description":"Optional vendor pin."}}},"response_schema_ref":"image-process/ImageOcrResult.json","response":{"title":"ImageOcrResult","description":"Result payload for image.ocr. Extracted text + blocks are exactly what the vendor (or local tesseract) produced.","type":"object","required":["text","blocks","vendor"],"additionalProperties":false,"properties":{"text":{"type":"string","description":"Full recognized text."},"blocks":{"type":"array","items":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1}}},"description":"OCR text blocks extracted from the image"},"language":{"type":["string","null"],"description":"Detected language of the text"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"},"created_at":{"type":"string","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/ocr \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/ocr\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/ocr\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/ocr\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/ocr\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/ocr\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/ocr\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/ocr\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/ocr\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/ocr\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.process","module":"image-process","namespace":"image","action":"process","method":"POST","path":"/v1/image/process","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image through a chained pipeline of ops, re-encoded once at the end. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageProcessRequest.json","params":{"title":"ImageProcessRequest","description":"Multi-step pipeline request for image.process. Edge deserializes against THIS schema (reads `image` / `ops[].params`) — not flat top-level keys. ops[] are applied as a chain (in-memory object continued, re-encoded once at the end). See REVIEW Image Processing §3.B.","type":"object","required":["image","ops"],"additionalProperties":false,"properties":{"image":{"description":"The source image, as either inline bytes (url/base64) or a stable asset reference (image_id).","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"ops":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","additionalProperties":false,"required":["op"],"properties":{"op":{"type":"string","enum":["resize","compress","crop","rotate","watermark","background_remove","smart_crop","format_convert","grayscale","blur","flip_h","flip_v"],"description":"Operation type for infra.image_process pipeline steps."},"params":{"type":["object","null"]}}},"description":"Ordered list of image operations to apply"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/process \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/process\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample', 'ops': [{'op': 'resize'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/process\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/process\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/process\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/process\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/process\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/process\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\", \\\"ops\\\": [{\\\"op\\\": \\\"resize\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/process\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/process\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\", \"ops\": [{\"op\": \"resize\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample","ops":[{"op":"resize"}]}}},{"id":"image.resize","module":"image-process","namespace":"image","action":"resize","method":"POST","path":"/v1/image/resize","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by resizing it with a fit mode and optional upscaling/format. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageResizeRequest.json","params":{"title":"ImageResizeRequest","description":"Request shape for image.resize. thumbnail = fit=inside + enlarge=false. Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"width":{"type":["integer","null"],"minimum":1,"description":"Width of the image in pixels"},"height":{"type":["integer","null"],"minimum":1,"description":"Height of the image in pixels"},"fit":{"description":"Fit mode for resizing (cover, contain, fill, inside, outside)","type":"string","enum":["cover","contain","fill","inside","outside"]},"enlarge":{"type":"boolean","default":false,"description":"Allow upscaling beyond source dimensions; false (default) never upscales."},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/resize \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/resize\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/resize\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/resize\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/resize\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/resize\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/resize\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/resize\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/resize\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/resize\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.rotate","module":"image-process","namespace":"image","action":"rotate","method":"POST","path":"/v1/image/rotate","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by rotating it, optionally auto-correcting orientation from EXIF. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageRotateRequest.json","params":{"title":"ImageRotateRequest","description":"Request shape for image.rotate — rotate by degrees, optionally applying EXIF orientation correction first (ImageOps.exif_transpose). Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image","degrees"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"degrees":{"type":"number","description":"Clockwise rotation in degrees."},"auto_orient":{"type":"boolean","default":true,"description":"Apply EXIF orientation correction before rotating."},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/rotate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\", \"degrees\": 1.0}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/rotate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample', 'degrees': 1.0},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/rotate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"degrees\": 1.0}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/rotate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"degrees\": 1.0}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\", \"degrees\": 1.0}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/rotate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/rotate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\", \\\"degrees\\\": 1.0}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/rotate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\", \\\"degrees\\\": 1.0}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/rotate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\", \\\"degrees\\\": 1.0}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/rotate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\", \"degrees\": 1.0}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/rotate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\", \"degrees\": 1.0}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample","degrees":1}}},{"id":"image.smart_crop","module":"image-process","namespace":"image","action":"smart_crop","method":"POST","path":"/v1/image/smart_crop","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image with saliency-aware cropping to an aspect ratio, optionally targeting faces or subject. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageSmartCropRequest.json","params":{"title":"ImageSmartCropRequest","description":"Request shape for image.smart_crop — saliency-aware crop to a target aspect (libvips_saliency / imagekit / cloudinary). Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image","aspect"],"additionalProperties":false,"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"aspect":{"type":"string","description":"Target aspect ratio, e.g. '1:1', '16:9'."},"target":{"type":["string","null"],"description":"Saliency target hint, e.g. 'face', 'auto'."},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/smart_crop \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\", \"aspect\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/smart_crop\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample', 'aspect': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/smart_crop\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"aspect\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/smart_crop\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\", \"aspect\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\", \"aspect\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/smart_crop\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/smart_crop\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\", \\\"aspect\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/smart_crop\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\", \\\"aspect\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/smart_crop\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\", \\\"aspect\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/smart_crop\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\", \"aspect\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/smart_crop\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\", \"aspect\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample","aspect":"sample"}}},{"id":"image.tag","module":"image-process","namespace":"image","action":"tag","method":"POST","path":"/v1/image/tag","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Detect labels/objects in an image returning label + confidence pairs. Real vendor dispatch: Google Vision LABEL_DETECTION, AWS Rekognition DetectLabels. service_markup applies.","request_schema_ref":"image-process/ImageTagRequest.json","params":{"title":"ImageTagRequest","description":"Request payload for image.tag — detect labels/objects in an image.","type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"type":"string","description":"Image as data URI, URL, or base64."},"max_tags":{"type":"integer","minimum":1,"default":10,"description":"Maximum number of tags to return"},"vendor":{"enum":["google","aws"],"description":"Optional vendor pin."}}},"response_schema_ref":"image-process/ImageTagResult.json","response":{"title":"ImageTagResult","description":"Result payload for image.tag. Labels + confidences are exactly what the vendor produced.","type":"object","required":["tags","vendor"],"additionalProperties":false,"properties":{"tags":{"type":"array","items":{"type":"object","required":["label","confidence"],"additionalProperties":false,"properties":{"label":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1}}},"description":"Tags for categorization and filtering"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"},"created_at":{"type":"string","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/tag \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/tag\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/tag\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/tag\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/tag\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/tag\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/tag\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/tag\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/tag\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/tag\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"image.transformation.create","module":"image-process","namespace":"image","action":"transformation.create","method":"POST","path":"/v1/image/transformation/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Register a named image-transformation template reusable in delivery URLs.","request_schema_ref":"image-process/ImageTransformationCreateRequest.json","params":{"title":"ImageTransformationCreateRequest","description":"Request shape for image.transformation.create — register a named transform preset (vendor-gated: cloudinary named transformation; self_hosted needs preset resolver). Write-idempotent. Returns ImageTransformation. See REVIEW Image Processing §3.D.","type":"object","required":["name","transform"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name for this resource"},"transform":{"description":"Image transformation specification","title":"ImageTransform","type":"object","additionalProperties":false,"properties":{"w":{"type":["integer","null"],"minimum":1,"description":"Target width."},"h":{"type":["integer","null"],"minimum":1,"description":"Target height."},"f":{"description":"Format for the output image","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"q":{"type":["integer","null"],"minimum":1,"maximum":100,"description":"Encoder quality 1-100."},"fit":{"description":"Fit mode for resizing (cover, contain, fill, inside, outside)","type":"string","enum":["cover","contain","fill","inside","outside"]}}},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ImageTransformation.json","response":{"title":"ImageTransformation","description":"A named transform preset. Result for image.transformation.create; row shape for image.transformation.list. See REVIEW Image Processing §3.D.","type":"object","required":["transformation_id","name","transform","created_at"],"additionalProperties":false,"properties":{"transformation_id":{"type":"string","pattern":"^imgtf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this transformation"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name for this resource"},"transform":{"description":"Image transformation specification","title":"ImageTransform","type":"object","additionalProperties":false,"properties":{"w":{"type":["integer","null"],"minimum":1,"description":"Target width."},"h":{"type":["integer","null"],"minimum":1,"description":"Target height."},"f":{"description":"Format for the output image","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"q":{"type":["integer","null"],"minimum":1,"maximum":100,"description":"Encoder quality 1-100."},"fit":{"description":"Fit mode for resizing (cover, contain, fill, inside, outside)","type":"string","enum":["cover","contain","fill","inside","outside"]}}},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/transformation/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\", \"transform\": {}}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/transformation/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example', 'transform': {}},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/transformation/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"transform\": {}}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/transformation/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"transform\": {}}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\", \"transform\": {}}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/transformation/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/transformation/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\", \\\"transform\\\": {}}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/transformation/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\", \\\"transform\\\": {}}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/transformation/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\", \\\"transform\\\": {}}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/transformation/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\", \"transform\": {}}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/transformation/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\", \"transform\": {}}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","transform":{}}}},{"id":"image.transformation.list","module":"image-process","namespace":"image","action":"transformation.list","method":"GET","path":"/v1/image/transformation/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Page through the registered named image-transformation templates.","request_schema_ref":null,"params":{},"response_schema_ref":"image-process/ImageTransformationListResult.json","response":{"title":"ImageTransformationListResult","description":"Paginated list of named transform presets (same {items[], next_cursor} shape as ProcessedImageListResult). Result for image.transformation.list. See REVIEW Image Processing §3.D.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"ImageTransformation","description":"A named transform preset. Result for image.transformation.create; row shape for image.transformation.list. See REVIEW Image Processing §3.D.","type":"object","required":["transformation_id","name","transform","created_at"],"additionalProperties":false,"properties":{"transformation_id":{"type":"string","pattern":"^imgtf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this transformation"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Human-readable name for this resource"},"transform":{"description":"Image transformation specification","title":"ImageTransform","type":"object","additionalProperties":false,"properties":{"w":{"type":["integer","null"],"minimum":1,"description":"Target width."},"h":{"type":["integer","null"],"minimum":1,"description":"Target height."},"f":{"description":"Format for the output image","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"q":{"type":["integer","null"],"minimum":1,"maximum":100,"description":"Encoder quality 1-100."},"fit":{"description":"Fit mode for resizing (cover, contain, fill, inside, outside)","type":"string","enum":["cover","contain","fill","inside","outside"]}}},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/image/transformation/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/image/transformation/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/transformation/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/transformation/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/image/transformation/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/transformation/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/image/transformation/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/transformation/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/transformation/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/image/transformation/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"image.upload","module":"image-process","namespace":"image","action":"upload","method":"POST","path":"/v1/image/upload","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Upload an image and get an asset with an ID and URL for later processing.","request_schema_ref":"image-process/ImageUploadRequest.json","params":{"title":"ImageUploadRequest","description":"Request shape for image.upload — store an asset and return a stable image_id (pim_). Write-idempotent. self_hosted stores to Infrai object storage; cloudinary/imagekit native upload. Returns ProcessedImage. See REVIEW Image Processing §3.C.","type":"object","required":["file"],"additionalProperties":false,"properties":{"file":{"type":"string","description":"base64-encoded bytes (multipart is mapped to this field at the transport layer)."},"filename":{"type":["string","null"],"description":"Filename for the uploaded image"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/upload \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"file\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/upload\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'file': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/upload\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"file\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/upload\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"file\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"file\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/upload\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/upload\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"file\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/upload\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"file\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/upload\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"file\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/upload\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"file\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/upload\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"file\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"file":"sample"}}},{"id":"image.watermark","module":"image-process","namespace":"image","action":"watermark","method":"POST","path":"/v1/image/watermark","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Transform an EXISTING image by overlaying a text or image watermark with position and opacity. To GENERATE images with AI use ai.image.","request_schema_ref":"image-process/ImageWatermarkRequest.json","params":{"title":"ImageWatermarkRequest","description":"Request shape for image.watermark — overlay a text or image watermark. Provide exactly one of text / watermark_image. Returns ProcessedImage. See REVIEW Image Processing §3.A.","type":"object","required":["image"],"additionalProperties":false,"oneOf":[{"required":["text"]},{"required":["watermark_image"]}],"properties":{"image":{"description":"Image data or reference for processing","title":"ImageRef","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"text":{"type":["string","null"],"description":"Text watermark content."},"watermark_image":{"type":["object","null"],"description":"Image watermark source (same ref shape as `image`); null when text is used.","oneOf":[{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},{"type":"object","additionalProperties":false,"required":["base64"],"properties":{"base64":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["image_id"],"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$"}}}]},"position":{"enum":["top_left","top","top_right","left","center","right","bottom_left","bottom","bottom_right"],"default":"bottom_right","description":"Position for the watermark (e.g. top-left, center)"},"opacity":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"Watermark opacity (0.0 to 1.0)"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"image-process/ProcessedImage.json","response":{"title":"ProcessedImage","description":"Result of an image_process pipeline.","type":"object","required":["image_id","url","format","width","height","size_bytes","sha256","ops_applied","created_at"],"additionalProperties":false,"properties":{"image_id":{"type":"string","pattern":"^pim_[A-Za-z0-9]{20,}$","description":"Unique identifier for this image"},"url":{"type":"string","description":"URL for this resource or endpoint"},"format":{"description":"Output or input format (e.g. json, csv, png)","type":"string","enum":["auto","webp","avif","jpeg","png","heic"]},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"original_sha256":{"type":["string","null"],"description":"SHA-256 hash of the original image before processing"},"ops_applied":{"type":"array","items":{"type":"string"},"description":"List of image operations that were applied"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","IMAGE_AI_OP_DEGRADED","IMAGE_BUDGET_EXCEEDED","IMAGE_FORMAT_NOT_SUPPORTED","IMAGE_INPUT_INVALID","IMAGE_INPUT_TOO_LARGE","IMAGE_JOB_NOT_FOUND","IMAGE_NOT_FOUND","IMAGE_OCR_UNAVAILABLE","IMAGE_OP_NOT_SUPPORTED","IMAGE_PIPELINE_TOO_LONG","IMAGE_WATERMARK_OOB","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/image/watermark \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"image\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/image/watermark\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'image': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/watermark\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/image/watermark\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"image\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"image\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/image/watermark\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/image/watermark\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"image\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/image/watermark\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"image\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/image/watermark\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"image\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/image/watermark\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"image\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/image/watermark\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"image\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"image":"sample"}}},{"id":"logs.ingest","module":"observability","namespace":"logs","action":"ingest","method":"POST","path":"/v1/logs/ingest","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Ingest a batch of log entries.","request_schema_ref":"observability/LogIngestRequest.json","params":{"title":"LogIngestRequest","description":"Request shape for logs.ingest — batched structured-log ingestion. Returns AcceptedResult.","type":"object","required":["entries"],"additionalProperties":false,"properties":{"entries":{"type":"array","minItems":1,"items":{"title":"LogEntry","description":"A single structured log line ingested via logs.ingest; also the item type returned by logs.search. `level` uses enums/log_level.yaml.","type":"object","required":["message","level"],"additionalProperties":false,"properties":{"message":{"type":"string","description":"Detailed message content"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Defaults to ingest time if omitted."},"service":{"type":["string","null"],"description":"Service name that emitted the log"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"trace_id":{"type":["string","null"],"description":"Correlate with a distributed trace."},"span_id":{"type":["string","null"],"description":"Span identifier for tracing"},"attributes":{"type":["object","null"],"description":"Arbitrary structured fields."}}},"description":"Log entries to ingest"},"idempotency_key":{"type":["string","null"],"description":"Dedup key for the whole batch (route is idempotent:true)."}}},"response_schema_ref":"observability/AcceptedResult.json","response":{"title":"AcceptedResult","description":"Count of accepted items for batched ingestion (observability.span.batch / logs.ingest).","type":"object","required":["accepted"],"additionalProperties":false,"properties":{"accepted":{"type":"integer","minimum":0,"description":"Number of items accepted for processing"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/logs/ingest \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/logs/ingest\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'entries': [{'message': 'hello', 'level': 'debug'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/logs/ingest\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/logs/ingest\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/logs/ingest\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/logs/ingest\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"entries\\\": [{\\\"message\\\": \\\"hello\\\", \\\"level\\\": \\\"debug\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/logs/ingest\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"entries\\\": [{\\\"message\\\": \\\"hello\\\", \\\"level\\\": \\\"debug\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/logs/ingest\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"entries\\\": [{\\\"message\\\": \\\"hello\\\", \\\"level\\\": \\\"debug\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/logs/ingest\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/logs/ingest\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"entries\": [{\"message\": \"hello\", \"level\": \"debug\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"entries":[{"message":"hello","level":"debug"}]}}},{"id":"logs.search","module":"observability","namespace":"logs","action":"search","method":"GET","path":"/v1/logs/search","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Search logs by keyword and time range.","request_schema_ref":"observability/LogQueryRequest.json","params":{"title":"LogQueryRequest","description":"Query shape for logs.search — full-text + structured filter over ingested logs, cursor-paginated. Returns LogQueryResult.","type":"object","additionalProperties":false,"properties":{"q":{"type":["string","null"],"description":"Full-text query over message."},"filter":{"type":["object","null"],"description":"Structured predicate over level / service / environment / trace_id / attributes."},"level":{"type":["string","null"],"description":"Filter by normalized log level."},"service":{"type":["string","null"],"description":"Filter by service name."},"environment":{"type":["string","null"],"description":"Filter by deployment environment."},"trace_id":{"type":["string","null"],"description":"Filter by trace identifier."},"since":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date when the current tier or state became effective"},"until":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date/time for the end of the query range"},"cursor":{"type":["string","null"],"description":"Opaque cursor for pagination; pass to fetch the next page"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of items to return per page"}}},"response_schema_ref":"observability/LogQueryResult.json","response":{"title":"LogQueryResult","description":"Cursor-paginated result for logs.search — items are LogEntry.","type":"object","required":["items","total"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"LogEntry","description":"A single structured log line ingested via logs.ingest; also the item type returned by logs.search. `level` uses enums/log_level.yaml.","type":"object","required":["message","level"],"additionalProperties":false,"properties":{"message":{"type":"string","description":"Detailed message content"},"level":{"type":"string","enum":["debug","info","warning","error","fatal"],"description":"Severity or log level (e.g. info, warn, error)"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Defaults to ingest time if omitted."},"service":{"type":["string","null"],"description":"Service name that emitted the log"},"environment":{"type":["string","null"],"description":"Deployment environment (e.g. production, staging)"},"trace_id":{"type":["string","null"],"description":"Correlate with a distributed trace."},"span_id":{"type":["string","null"],"description":"Span identifier for tracing"},"attributes":{"type":["object","null"],"description":"Arbitrary structured fields."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"total":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/logs/search \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/logs/search\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/logs/search\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/logs/search\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/logs/search\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/logs/search\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/logs/search\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/logs/search\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/logs/search\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/logs/search\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"metrics.batch","module":"observability","namespace":"metrics","action":"batch","method":"POST","path":"/v1/metrics/batch","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Report a batch of metric data points.","request_schema_ref":"observability/MetricBatchRequest.json","params":{"title":"MetricBatchRequest","description":"Request shape for metrics.batch — high-frequency batched metric ingestion. Returns MetricBatchResult.","type":"object","required":["points"],"additionalProperties":false,"properties":{"points":{"type":"array","minItems":1,"items":{"title":"MetricPoint","description":"A single metric data point ingested via metrics.report / metrics.batch.","type":"object","required":["name","value","type"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Human-readable name for this resource"},"value":{"type":"number","description":"Value of the DNS record or configuration"},"type":{"type":"string","enum":["counter","gauge","timing","distribution"],"description":"Type discriminator for this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Defaults to ingest time if omitted."}}},"description":"Metric data points"},"idempotency_key":{"type":["string","null"],"description":"Dedup key for the whole batch (route is idempotent:true)."}}},"response_schema_ref":"observability/MetricBatchResult.json","response":{"title":"MetricBatchResult","description":"Result shared by metrics.batch (count of accepted points, integer) and metrics.report (single-point ack, boolean + metric_id).","type":"object","required":["accepted"],"additionalProperties":false,"properties":{"accepted":{"type":["integer","boolean"],"minimum":0,"description":"metrics.batch: number of points accepted for processing. metrics.report: boolean true/false ack for the single point."},"metric_id":{"type":"string","description":"Identifier of the ingested metric point (metrics.report only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/metrics/batch \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/metrics/batch\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'points': [{'name': 'example', 'value': 1.0, 'type': 'counter'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/metrics/batch\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/metrics/batch\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"points\\\": [{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/metrics/batch\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"points\\\": [{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/metrics/batch\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"points\\\": [{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/metrics/batch\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/metrics/batch\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"points\": [{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"points":[{"name":"example","value":1,"type":"counter"}]}}},{"id":"metrics.query","module":"observability","namespace":"metrics","action":"query","method":"GET","path":"/v1/metrics/query","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Query a metric time series with aggregation.","request_schema_ref":"observability/MetricQueryRequest.json","params":{"title":"MetricQueryRequest","description":"Query shape for metrics.query — time-series query of a metric with an aggregation. Returns MetricSeries.","type":"object","required":["name","agg"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Human-readable name for this resource"},"agg":{"type":"string","enum":["p50","p99","sum","avg","count"],"description":"Aggregation function (sum, avg, max, min)"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Filter to points matching these tags. Encode each entry in the query string as tag.<key>=<value>, for example tag.region=cn."},"window":{"type":["string","null"],"description":"Bucket size, e.g. '1m', '5m', '1h'."},"step":{"type":["string","null"],"description":"Alias for window; bucket size such as '60', '5m', '1h', or '1d'."},"since":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date when the current tier or state became effective"},"until":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date/time for the end of the query range"},"from":{"type":["string","null"],"format":"date-time","description":"Alias for since."},"to":{"type":["string","null"],"format":"date-time","description":"Alias for until."}}},"response_schema_ref":"observability/MetricSeries.json","response":{"title":"MetricSeries","description":"Result of metrics.query — an aggregated time series of (timestamp, value) points.","type":"object","required":["points"],"additionalProperties":false,"properties":{"name":{"type":["string","null"],"description":"Human-readable name for this resource"},"agg":{"type":["string","null"],"enum":["p50","p99","sum","avg","count",null],"description":"Aggregation function (sum, avg, max, min)"},"points":{"type":"array","items":{"type":"object","required":["ts","value"],"additionalProperties":false,"properties":{"ts":{"type":"string","format":"date-time"},"value":{"type":"number"}}},"description":"Metric data points"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/metrics/query?name=example&agg=p50 \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/metrics/query?name=example&agg=p50\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","agg":"p50"}}},{"id":"metrics.report","module":"observability","namespace":"metrics","action":"report","method":"POST","path":"/v1/metrics/report","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Report a single metric point (counter, gauge, timing, or distribution) with tags and idempotency.","request_schema_ref":"observability/MetricReportRequest.json","params":{"title":"MetricReportRequest","description":"Request shape for metrics.report — report a single metric point. The `type` axis aligns with MetricPoint (counter/gauge/timing/distribution).","type":"object","required":["name","value","type"],"additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.-]{0,127}$","description":"Human-readable name for this resource"},"value":{"type":"number","description":"Value of the DNS record or configuration"},"type":{"type":"string","enum":["counter","gauge","timing","distribution"],"description":"Type discriminator for this resource"},"tags":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Tags for categorization and filtering"},"timestamp":{"type":["string","null"],"format":"date-time","description":"Unix timestamp of the data point"},"idempotency_key":{"type":["string","null"],"description":"Dedup key (route is idempotent:true)."}}},"response_schema_ref":"observability/MetricBatchResult.json","response":{"title":"MetricBatchResult","description":"Result shared by metrics.batch (count of accepted points, integer) and metrics.report (single-point ack, boolean + metric_id).","type":"object","required":["accepted"],"additionalProperties":false,"properties":{"accepted":{"type":["integer","boolean"],"minimum":0,"description":"metrics.batch: number of points accepted for processing. metrics.report: boolean true/false ack for the single point."},"metric_id":{"type":"string","description":"Identifier of the ingested metric point (metrics.report only)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","COLD_TIER_NOT_ENABLED","ERROR_EVENT_NOT_FOUND","ERROR_GROUP_NOT_FOUND","ERROR_TAGS_HIGH_CARDINALITY","FLAG_ALREADY_EXISTS","FLAG_DESCRIPTION_TOO_SHORT","FLAG_KEY_INVALID","FLAG_NOT_FOUND","FLAG_RULE_INVALID","FLAG_TYPE_MISMATCH","FLAG_VERSION_CONFLICT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","RETENTION_FOREVER_NOT_ALLOWED","RETENTION_HARD_CAP_EXCEEDED","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/metrics/report \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/metrics/report\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example', 'value': 1.0, 'type': 'counter'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/report\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/metrics/report\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/metrics/report\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/metrics/report\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/metrics/report\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/metrics/report\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\", \\\"value\\\": 1.0, \\\"type\\\": \\\"counter\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/metrics/report\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/metrics/report\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\", \"value\": 1.0, \"type\": \"counter\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","value":1,"type":"counter"}}},{"id":"pdf.compress","module":"pdf","namespace":"pdf","action":"compress","method":"POST","path":"/v1/pdf/compress","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Compress a PDF to reduce file size, using the global fast/balanced/quality processing mode; idempotent write.","request_schema_ref":"pdf/PdfCompressRequest.json","params":{"title":"PdfCompressRequest","description":"Request shape for pdf.compress — reduce PDF size. Idempotent write: idempotency_key dedups retries. `mode` reuses the global fast/balanced/quality processing axis (no new enum). Returns PdfDocument(source='compress').","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"mode":{"enum":["fast","balanced","quality"],"default":"balanced","description":"Compression effort vs fidelity; reuses the global processing mode axis."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/compress \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/compress\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/compress\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/compress\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/compress\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/compress\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/compress\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/compress\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/compress\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/compress\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.convert","module":"pdf","namespace":"pdf","action":"convert","method":"POST","path":"/v1/pdf/convert","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Convert a PDF to another format; unsupported targets return PDF_CONVERT_UNSUPPORTED (422); idempotent write.","request_schema_ref":"pdf/PdfConvertRequest.json","params":{"title":"PdfConvertRequest","description":"Request shape for pdf.convert — convert a PDF to another format. Idempotent write: idempotency_key dedups retries. Unsupported `to` -> PDF_CONVERT_UNSUPPORTED(422). Returns PdfDocument (multi-page image targets return PdfDocumentListResult).","type":"object","required":["pdf","to"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"to":{"enum":["docx","xlsx","pptx","png","jpg","html"],"description":"Target format. (SSOT: enums/PdfConvertTarget)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/convert \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\", \"to\": \"docx\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/convert\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample', 'to': 'docx'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/convert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"to\": \"docx\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/convert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"to\": \"docx\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\", \"to\": \"docx\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/convert\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/convert\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\", \\\"to\\\": \\\"docx\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/convert\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\", \\\"to\\\": \\\"docx\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/convert\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\", \\\"to\\\": \\\"docx\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/convert\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\", \"to\": \"docx\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/convert\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\", \"to\": \"docx\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample","to":"docx"}}},{"id":"pdf.decrypt","module":"pdf","namespace":"pdf","action":"decrypt","method":"POST","path":"/v1/pdf/decrypt","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Remove password protection from a PDF; wrong password returns PDF_DECRYPT_FAILED (403); idempotent write.","request_schema_ref":"pdf/PdfDecryptRequest.json","params":{"title":"PdfDecryptRequest","description":"Request shape for pdf.decrypt — remove password protection. Idempotent write: idempotency_key dedups retries. Missing password -> PDF_PARSE_PASSWORD_REQUIRED(401); wrong password -> PDF_DECRYPT_FAILED(403). Returns PdfDocument(source='mutate').","type":"object","required":["pdf","password"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"password":{"type":"string","description":"Password to decrypt the document."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/decrypt \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\", \"password\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/decrypt\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample', 'password': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/decrypt\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"password\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/decrypt\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"password\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\", \"password\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/decrypt\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/decrypt\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\", \\\"password\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/decrypt\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\", \\\"password\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/decrypt\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\", \\\"password\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/decrypt\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\", \"password\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/decrypt\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\", \"password\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample","password":"sample"}}},{"id":"pdf.encrypt","module":"pdf","namespace":"pdf","action":"encrypt","method":"POST","path":"/v1/pdf/encrypt","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Encrypt a PDF with a password and permission flags; idempotent write.","request_schema_ref":"pdf/PdfEncryptRequest.json","params":{"title":"PdfEncryptRequest","description":"Request shape for pdf.encrypt — apply password / permission encryption. Idempotent write: idempotency_key dedups retries. Returns PdfDocument(source='encrypt').","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"user_password":{"type":["string","null"],"description":"Password required to open the document."},"owner_password":{"type":["string","null"],"description":"Password required to change permissions."},"permissions":{"type":["array","null"],"items":{"type":"string"},"description":"Allowed actions (e.g. print, copy, modify)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/encrypt \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/encrypt\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/encrypt\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/encrypt\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/encrypt\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/encrypt\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/encrypt\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/encrypt\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/encrypt\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/encrypt\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.extract_images","module":"pdf","namespace":"pdf","action":"extract_images","method":"POST","path":"/v1/pdf/extract_images","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Extract embedded images from a PDF, returned as data: URIs; read-only, no side effects.","request_schema_ref":"pdf/PdfExtractImagesRequest.json","params":{"title":"PdfExtractImagesRequest","description":"Request shape for pdf.extract_images — extract embedded XObject images as data: URIs. Non-idempotent read (no side effects).","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"pages":{"type":["array","null"],"items":{"type":"integer","minimum":1},"description":"1-indexed pages to scan; null = all pages."}}},"response_schema_ref":"pdf/PdfExtractImagesResult.json","response":{"title":"PdfExtractImagesResult","description":"Result of pdf.extract_images.","type":"object","required":["images"],"additionalProperties":false,"properties":{"images":{"type":"array","items":{"title":"ExtractedImage","description":"An image extracted from a PDF page.","type":"object","required":["page","image_url","width","height"],"additionalProperties":false,"properties":{"page":{"type":"integer","minimum":1,"description":"Page number (1-based)"},"image_url":{"type":"string","description":"URL to the extracted image"},"width":{"type":"integer","minimum":1,"description":"Width of the image in pixels"},"height":{"type":"integer","minimum":1,"description":"Height of the image in pixels"},"mime_type":{"type":["string","null"],"description":"MIME type of the resource"}}},"description":"List of generated or processed images"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/extract_images \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/extract_images\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/extract_images\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/extract_images\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/extract_images\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/extract_images\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/extract_images\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/extract_images\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/extract_images\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/extract_images\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.form.extract","module":"pdf","namespace":"pdf","action":"form.extract","method":"POST","path":"/v1/pdf/form/extract","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Read AcroForm field names and values from a PDF; read-only, no side effects.","request_schema_ref":"pdf/PdfFormExtractRequest.json","params":{"title":"PdfFormExtractRequest","description":"Request shape for pdf.form.extract — read AcroForm field names + values. Non-idempotent read (no side effects). Returns PdfFormExtractResult.","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."}}},"response_schema_ref":"pdf/PdfFormExtractResult.json","response":{"title":"PdfFormExtractResult","description":"Result of pdf.form.extract.","type":"object","required":["fields"],"additionalProperties":false,"properties":{"fields":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","description":"AcroForm field type (text, checkbox, radio, choice, signature)."},"value":{"type":["string","boolean","null"]}}},"description":"Extracted form fields"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/form/extract \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/form/extract\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/form/extract\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/form/extract\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/form/extract\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/form/extract\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/form/extract\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/form/extract\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/form/extract\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/form/extract\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.form.fill","module":"pdf","namespace":"pdf","action":"form.fill","method":"POST","path":"/v1/pdf/form/fill","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Fill AcroForm fields, optionally flattening to a non-editable PDF; idempotent write.","request_schema_ref":"pdf/PdfFormFillRequest.json","params":{"title":"PdfFormFillRequest","description":"Request shape for pdf.form.fill — populate AcroForm fields. Idempotent write: idempotency_key dedups retries. Returns PdfDocument(source='form').","type":"object","required":["pdf","fields"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"fields":{"type":"object","description":"Map of AcroForm field name -> value."},"flatten":{"type":"boolean","default":false,"description":"If true, flatten fields so they are no longer editable."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/form/fill \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\", \"fields\": {}}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/form/fill\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample', 'fields': {}},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/form/fill\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"fields\": {}}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/form/fill\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"fields\": {}}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\", \"fields\": {}}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/form/fill\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/form/fill\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\", \\\"fields\\\": {}}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/form/fill\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\", \\\"fields\\\": {}}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/form/fill\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\", \\\"fields\\\": {}}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/form/fill\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\", \"fields\": {}}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/form/fill\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\", \"fields\": {}}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample","fields":{}}}},{"id":"pdf.generate","module":"pdf","namespace":"pdf","action":"generate","method":"POST","path":"/v1/pdf/generate","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Generate a PDF from HTML, Markdown, inline template, or a stored template rendered with variables; idempotent write.","request_schema_ref":"pdf/PdfGenerateRequest.json","params":{"title":"PdfGenerateRequest","description":"Request shape for pdf.generate. Idempotent write: idempotency_key dedups retries. Exactly one source of html | markdown | template_html | template_id must be supplied (others null) else PDF_TEMPLATE_INVALID. With template_id (stored-template path), the server loads the template HTML and renders with `vars`; unknown template_id -> PDF_TEMPLATE_NOT_FOUND(404), missing required variable -> PDF_TEMPLATE_VAR_MISSING(400). Returns PdfDocument (source = html/markdown/template).","type":"object","additionalProperties":false,"properties":{"html":{"type":["string","null"],"description":"Inline HTML source."},"markdown":{"type":["string","null"],"description":"Inline Markdown source."},"template_html":{"type":["string","null"],"description":"Inline HTML template rendered with template_vars."},"template_id":{"type":["string","null"],"description":"Stored template id; server loads its HTML and renders with `vars` (source='template')."},"template_vars":{"type":["object","null"],"description":"Variables for template_html."},"vars":{"type":["object","null"],"description":"Variables for template_id rendering."},"page_size":{"description":"Page size (e.g. A4, Letter)","type":"string","enum":["A4","A3","A5","Letter","Legal","Tabloid"]},"orientation":{"enum":["portrait","landscape"],"default":"portrait","description":"Page orientation (portrait, landscape)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/generate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/generate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/generate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/generate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/generate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/generate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/generate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/generate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/generate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/generate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"pdf.job.get","module":"pdf","namespace":"pdf","action":"job.get","method":"GET","path":"/v1/pdf/job/get/{job_id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the status and result of an asynchronous PDF job by job_id.","request_schema_ref":null,"params":{},"response_schema_ref":"pdf/PdfJob.json","response":{"title":"PdfJob","description":"Result of pdf.job.get — async job state for large convert/ocr operations. Small inputs run inline; large inputs return {status:'queued'} and complete asynchronously.","type":"object","required":["job_id","status"],"additionalProperties":false,"properties":{"job_id":{"type":"string","description":"Unique identifier for this async job"},"status":{"enum":["queued","running","completed","failed"],"description":"Current status of this resource"},"result":{"type":["object","null"],"description":"Populated when status='completed' (a PdfDocument or PdfDocumentListResult)."},"error":{"type":["string","null"],"description":"Populated when status='failed'."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/pdf/job/get/JOB_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/pdf/job/get/JOB_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"pdf.merge","module":"pdf","namespace":"pdf","action":"merge","method":"POST","path":"/v1/pdf/merge","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Concatenate multiple PDFs in order into a single document; idempotent write.","request_schema_ref":"pdf/PdfMergeRequest.json","params":{"title":"PdfMergeRequest","description":"Request shape for pdf.merge — concatenate inputs in order into one PdfDocument(source='mutate'). Idempotent write: idempotency_key dedups retries. Fewer than one input -> PDF_TEMPLATE_INVALID(param='inputs').","type":"object","required":["inputs"],"additionalProperties":false,"properties":{"inputs":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Ordered list of PDF inputs (URL, base64, or stored pdf_id)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/merge \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"inputs\": [\"hello\"]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/merge\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'inputs': ['hello']},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/merge\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"inputs\": [\"hello\"]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/merge\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"inputs\": [\"hello\"]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"inputs\": [\"hello\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/merge\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/merge\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"inputs\\\": [\\\"hello\\\"]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/merge\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"inputs\\\": [\\\"hello\\\"]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/merge\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"inputs\\\": [\\\"hello\\\"]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/merge\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"inputs\": [\"hello\"]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/merge\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"inputs\": [\"hello\"]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"inputs":["hello"]}}},{"id":"pdf.ocr","module":"pdf","namespace":"pdf","action":"ocr","method":"POST","path":"/v1/pdf/ocr","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Run OCR on a scanned PDF; unsupported language returns PDF_OCR_LANG_UNSUPPORTED (400); idempotent write.","request_schema_ref":"pdf/PdfOcrRequest.json","params":{"title":"PdfOcrRequest","description":"Request shape for pdf.ocr — OCR a scanned PDF. Idempotent write: idempotency_key dedups retries. Unsupported lang -> PDF_OCR_LANG_UNSUPPORTED(400). Returns PdfOcrResult.","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"lang":{"type":"string","default":"eng","description":"OCR language code."},"quality":{"enum":["fast","balanced","quality"],"default":"fast","description":"OCR effort vs accuracy; reuses the global processing mode axis."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"pdf/PdfOcrResult.json","response":{"title":"PdfOcrResult","description":"Result of pdf.ocr.","type":"object","required":["pdf_id","text_per_page","duration_ms","engine"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"text_per_page":{"type":"array","items":{"type":"string"},"description":"Extracted text content per page"},"confidence_avg":{"type":["number","null"],"minimum":0,"maximum":1,"description":"Average confidence score of the OCR result"},"lang_detected":{"type":["string","null"],"description":"Detected language of the document"},"duration_ms":{"type":"integer","minimum":0,"description":"Duration of the operation in milliseconds"},"engine":{"description":"Processing engine used (e.g. tesseract, google-vision)","type":"string","enum":["chromium","unstructured_io","aws_textract","google_doc_ai","paddle_ocr"]}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/ocr \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/ocr\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/ocr\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/ocr\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/ocr\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/ocr\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/ocr\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/ocr\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/ocr\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/ocr\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.parse","module":"pdf","namespace":"pdf","action":"parse","method":"POST","path":"/v1/pdf/parse","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Extract text, outline, and metadata from a PDF for RAG ingestion; read-only, no side effects.","request_schema_ref":"pdf/PdfParseRequest.json","params":{"title":"PdfParseRequest","description":"Request shape for pdf.parse — extract text + outline + metadata for RAG ingestion. Non-idempotent read (no side effects, no idempotency_key). Encrypted PDF without password -> PDF_PARSE_PASSWORD_REQUIRED.","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"pages":{"type":["array","null"],"items":{"type":"integer","minimum":1},"description":"1-indexed pages to parse; null = all pages."}}},"response_schema_ref":"pdf/PdfParseResult.json","response":{"title":"PdfParseResult","description":"Result of pdf.parse — text + outline + metadata.","type":"object","required":["pdf_id","text_per_page"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"text_per_page":{"type":"array","items":{"type":"string"},"description":"Extracted text content per page"},"outline":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"page":{"type":"integer"}}},"description":"Document outline / table of contents"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"language":{"type":["string","null"],"description":"Detected language of the text"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/parse \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/parse\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/parse\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/parse\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/parse\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/parse\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/parse\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/parse\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/parse\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/parse\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.redact","module":"pdf","namespace":"pdf","action":"redact","method":"POST","path":"/v1/pdf/redact","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Irreversibly black out content by region or regex pattern; idempotent write.","request_schema_ref":"pdf/PdfRedactRequest.json","params":{"title":"PdfRedactRequest","description":"Request shape for pdf.redact — irreversibly black out content by region and/or pattern. Idempotent write: idempotency_key dedups retries. Returns PdfDocument(source='redact').","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"regions":{"type":["array","null"],"items":{"type":"object","additionalProperties":false,"required":["page","x","y","width","height"],"properties":{"page":{"type":"integer","minimum":1},"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0}}},"description":"Explicit rectangular regions to redact."},"patterns":{"type":["array","null"],"items":{"type":"string"},"description":"Regex patterns; matched text is redacted."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/redact \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/redact\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/redact\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/redact\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/redact\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/redact\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/redact\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/redact\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/redact\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/redact\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.rotate","module":"pdf","namespace":"pdf","action":"rotate","method":"POST","path":"/v1/pdf/rotate","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Rotate specified pages by 0, 90, 180, or 270 degrees; idempotent write.","request_schema_ref":"pdf/PdfRotateRequest.json","params":{"title":"PdfRotateRequest","description":"Request shape for pdf.rotate — rotate selected pages. Idempotent write: idempotency_key dedups retries. degrees not in 0 and90 and180 and270 -> PDF_TEMPLATE_INVALID(param='degrees'); pages out of range (p<1 or p>page_count) -> PDF_TEMPLATE_INVALID(param='pages'). Returns PdfDocument(source='mutate').","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"degrees":{"enum":[0,90,180,270],"default":90,"description":"Rotation angle in degrees"},"pages":{"type":["array","null"],"items":{"type":"integer","minimum":1},"description":"1-indexed pages to rotate; null = all pages."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/rotate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/rotate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/rotate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/rotate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/rotate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/rotate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/rotate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/rotate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/rotate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/rotate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"pdf.sign","module":"pdf","namespace":"pdf","action":"sign","method":"POST","path":"/v1/pdf/sign","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Apply a PKCS#7 / PAdES digital signature to a PDF; invalid certificate returns PDF_SIGN_CERT_INVALID; idempotent write.","request_schema_ref":"pdf/PdfSignRequest.json","params":{"title":"PdfSignRequest","description":"Request shape for pdf.sign — apply a PKCS#7 / PAdES digital signature. Idempotent write: idempotency_key dedups retries. cert_pem/key_pem must carry valid PEM headers else PDF_SIGN_CERT_INVALID. Returns SignedPdfDocument.","type":"object","required":["pdf","cert_pem","key_pem"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"cert_pem":{"type":"string","description":"Signing certificate, PEM-encoded."},"key_pem":{"type":"string","description":"Private key, PEM-encoded."},"reason":{"type":["string","null"],"description":"Reason for the current state or action"},"location":{"type":["string","null"],"description":"Location where the PDF was signed"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/SignedPdfDocument.json","response":{"title":"SignedPdfDocument","description":"Result of pdf.sign — a PKCS#7 / PAdES digitally-signed PDF artifact. Extends PdfDocument fields with signature metadata.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","signed","signer_common_name","signed_at"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"signed":{"type":"boolean","const":true,"description":"Whether the PDF has been digitally signed"},"signer_common_name":{"type":"string","description":"CN extracted from the signing certificate."},"signed_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the PDF was signed"},"reason":{"type":["string","null"],"description":"Reason for the current state or action"},"location":{"type":["string","null"],"description":"Location where the PDF was signed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/sign \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/sign\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample', 'cert_pem': 'sample', 'key_pem': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/sign\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/sign\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/sign\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/sign\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\", \\\"key_pem\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/sign\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\", \\\"key_pem\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/sign\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\", \\\"key_pem\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/sign\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/sign\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\", \"cert_pem\": \"sample\", \"key_pem\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample","cert_pem":"sample","key_pem":"sample"}}},{"id":"pdf.split","module":"pdf","namespace":"pdf","action":"split","method":"POST","path":"/v1/pdf/split","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Split a PDF into multiple documents by 1-indexed inclusive page ranges; idempotent write.","request_schema_ref":"pdf/PdfSplitRequest.json","params":{"title":"PdfSplitRequest","description":"Request shape for pdf.split — slice into N documents by N page ranges. Idempotent write: idempotency_key dedups retries. Each range is a 2-element [start,end], 1-indexed inclusive, start>=1, end<=page_count, start<=end. Empty / non-binary / out-of-range ranges -> PDF_TEMPLATE_INVALID(param='ranges'). Returns list[PdfDocument](source='mutate').","type":"object","required":["pdf","ranges"],"additionalProperties":false,"properties":{"ranges":{"type":"array","minItems":1,"items":{"type":"array","items":{"type":"integer","minimum":1},"minItems":2,"maxItems":2},"description":"List of [start,end] page ranges, 1-indexed inclusive."},"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/split \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\", \"ranges\": [[1]]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/split\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample', 'ranges': [[1]]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/split\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"ranges\": [[1]]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/split\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\", \"ranges\": [[1]]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\", \"ranges\": [[1]]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/split\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/split\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\", \\\"ranges\\\": [[1]]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/split\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\", \\\"ranges\\\": [[1]]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/split\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\", \\\"ranges\\\": [[1]]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/split\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\", \"ranges\": [[1]]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/split\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\", \"ranges\": [[1]]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample","ranges":[[1]]}}},{"id":"pdf.template.create","module":"pdf","namespace":"pdf","action":"template.create","method":"POST","path":"/v1/pdf/template/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create a reusable HTML PDF template; idempotent write.","request_schema_ref":"pdf/PdfTemplateCreateRequest.json","params":{"title":"PdfTemplateCreateRequest","description":"Request shape for pdf.template.create — store a reusable HTML template. Idempotent write: idempotency_key dedups retries. Returns PdfTemplate.","type":"object","required":["name","html"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"Human-readable name for this resource"},"html":{"type":"string","description":"Template HTML with double-brace var placeholders."},"vars_schema":{"type":["object","null"],"description":"JSON-Schema describing required template variables."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"pdf/PdfTemplate.json","response":{"title":"PdfTemplate","description":"HTML template for pdf.generate_from_template.","type":"object","required":["template_id","name","html","created_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","description":"Identifier of the template used for rendering"},"name":{"type":"string","description":"Human-readable name for this resource"},"html":{"type":"string","description":"HTML body of the email"},"vars_schema":{"type":["object","null"],"description":"JSON-Schema describing required template variables."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/template/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/template/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example', 'html': '<h1>Hello from infrai</h1>'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/template/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/template/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/template/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/template/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\", \\\"html\\\": \\\"<h1>Hello from infrai</h1>\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/template/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/template/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\", \"html\": \"<h1>Hello from infrai</h1>\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","html":"<h1>Hello from infrai</h1>"}}},{"id":"pdf.verify","module":"pdf","namespace":"pdf","action":"verify","method":"POST","path":"/v1/pdf/verify","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Verify a signed PDF's signature validity against a certificate; read-only, no side effects.","request_schema_ref":"pdf/PdfVerifyRequest.json","params":{"title":"PdfVerifyRequest","description":"Request shape for pdf.verify — validate a signed PDF against a certificate. Non-idempotent read (no side effects). cert_pem required. Returns SignatureVerification.","type":"object","required":["signed_pdf","cert_pem"],"additionalProperties":false,"properties":{"signed_pdf":{"type":"string","description":"Signed PDF input: URL, base64 data, or stored pdf_id."},"cert_pem":{"type":"string","description":"Certificate to verify against, PEM-encoded."}}},"response_schema_ref":"pdf/SignatureVerification.json","response":{"title":"SignatureVerification","description":"Result of pdf.verify — whether the signed PDF's signature(s) validate against the supplied certificate.","type":"object","required":["valid","signatures"],"additionalProperties":false,"properties":{"valid":{"type":"boolean","description":"True iff every signature validates against cert_pem and the document is intact."},"signatures":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["signer_common_name","valid","intact"],"properties":{"signer_common_name":{"type":"string"},"valid":{"type":"boolean","description":"Signature cryptographically valid."},"intact":{"type":"boolean","description":"Document unmodified since this signature."},"signed_at":{"type":["string","null"],"format":"date-time"},"reason":{"type":["string","null"]}}},"description":"Digital signature verification results"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'signed_pdf': 'sample', 'cert_pem': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"signed_pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"signed_pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"signed_pdf\\\": \\\"sample\\\", \\\"cert_pem\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"signed_pdf\": \"sample\", \"cert_pem\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"signed_pdf":"sample","cert_pem":"sample"}}},{"id":"pdf.watermark","module":"pdf","namespace":"pdf","action":"watermark","method":"POST","path":"/v1/pdf/watermark","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Stamp a text and/or image watermark onto a PDF; idempotent write.","request_schema_ref":"pdf/PdfWatermarkRequest.json","params":{"title":"PdfWatermarkRequest","description":"Request shape for pdf.watermark — stamp text and/or image watermark. Idempotent write: idempotency_key dedups retries. text and image both empty -> PDF_TEMPLATE_INVALID. Returns PdfDocument(source='mutate').","type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","description":"PDF input: URL, base64 data, or stored pdf_id."},"text":{"type":["string","null"],"description":"Text watermark; one of text/image required."},"image":{"type":["string","null"],"description":"Image watermark input (URL/base64); one of text/image required."},"opacity":{"type":"number","minimum":0,"maximum":1,"default":0.3,"description":"Watermark opacity (0.0 to 1.0)"},"position":{"enum":["center","top-left","top-right","bottom-left","bottom-right"],"default":"center","description":"Position for the watermark (e.g. top-left, center)"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced PDF in Infrai's own store (default false = stateless passthrough: produce, return inline, keep nothing). When true, Infrai persists the document, bills a self-hosted storage line item and applies a retention TTL — and only then do pdf.list/get/delete see it."}}},"response_schema_ref":"pdf/PdfDocument.json","response":{"title":"PdfDocument","description":"A stored PDF artifact (output of generate/parse/mutate). See docs/phase2/P2_03_New_Modules.md §10.2.","type":"object","required":["pdf_id","url","size_bytes","page_count","sha256","created_at","source"],"additionalProperties":false,"properties":{"pdf_id":{"type":"string","pattern":"^pdf_[A-Za-z0-9]{20,}$","description":"Unique identifier for this PDF document"},"url":{"type":"string","description":"URL for this resource or endpoint"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"page_count":{"type":"integer","minimum":1,"description":"Number of pages in the document"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 hash of the resource content"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"source":{"enum":["html","markdown","template","ocr","mutate","convert","compress","encrypt","redact","form"],"description":"Source of the PDF (upload, url, html)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","PDF_BUDGET_EXCEEDED","PDF_CONVERT_UNSUPPORTED","PDF_DECRYPT_FAILED","PDF_GENERATE_FAILED","PDF_INPUT_TOO_LARGE","PDF_LIVE_DISABLED","PDF_NOT_FOUND","PDF_OCR_LANG_NOT_SUPPORTED","PDF_OCR_LANG_UNSUPPORTED","PDF_PARSE_FAILED","PDF_PARSE_PASSWORD_REQUIRED","PDF_SIGN_CERT_INVALID","PDF_TEMPLATE_INVALID","PDF_TEMPLATE_NOT_FOUND","PDF_TEMPLATE_VAR_MISSING","PDF_TOO_MANY_PAGES","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/pdf/watermark \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"pdf\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/pdf/watermark\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'pdf': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/watermark\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/pdf/watermark\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"pdf\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"pdf\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/pdf/watermark\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/pdf/watermark\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"pdf\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/pdf/watermark\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"pdf\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/pdf/watermark\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"pdf\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/pdf/watermark\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"pdf\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/pdf/watermark\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"pdf\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"pdf":"sample"}}},{"id":"queue.ack","module":"scheduling","namespace":"queue","action":"ack","method":"POST","path":"/v1/queue/ack","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Acknowledge (ack) a consumed message to remove it from the queue.","request_schema_ref":"scheduling/QueueAckRequest.json","params":{"title":"QueueAckRequest","description":"Request shape for queue.ack — confirm successful processing of a leased message (at-least-once delivery). See REVIEW Scheduling §3.B.","type":"object","required":["queue","message_id"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueueMessage.json","response":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/ack \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\", \"message_id\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/ack\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample', 'message_id': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/ack\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"message_id\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/ack\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"message_id\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\", \"message_id\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/ack\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/ack\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/ack\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/ack\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/ack\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\", \"message_id\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/ack\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\", \"message_id\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample","message_id":"hello"}}},{"id":"queue.consume","module":"scheduling","namespace":"queue","action":"consume","method":"POST","path":"/v1/queue/consume","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Pull a batch of messages from a queue for processing.","request_schema_ref":"scheduling/QueueConsumeRequest.json","params":{"title":"QueueConsumeRequest","description":"Request shape for queue.consume — lease-based pull (maps module poll). Non-idempotent: each call leases a different batch. See REVIEW Scheduling §3.B.","type":"object","required":["queue"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"max_messages":{"type":"integer","minimum":1,"maximum":10,"default":10,"description":"Maximum number of messages to consume in one batch"},"visibility_timeout":{"type":["integer","null"],"minimum":0,"maximum":43200,"description":"Lease seconds; defaults to queue's visibility_timeout_default."}}},"response_schema_ref":"scheduling/QueueMessageList.json","response":{"title":"QueueMessageList","description":"Result for queue.consume and queue.dlq.list — array of QueueMessage rows. consume uses lease semantics (no cursor); dlq.list uses cursor pagination. See REVIEW Scheduling §3.B.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/consume \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/consume\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/consume\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/consume\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/consume\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/consume\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/consume\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/consume\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/consume\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/consume\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample"}}},{"id":"queue.create","module":"scheduling","namespace":"queue","action":"create","method":"POST","path":"/v1/queue/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create a message queue (standard or FIFO, with optional dead-letter queue).","request_schema_ref":"scheduling/QueueCreateRequest.json","params":{"title":"QueueCreateRequest","description":"Request shape for queue.create — declarative queue provisioning (standard/fifo + DLQ). See REVIEW Scheduling §3.B. Returns a Queue.","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9._-]+$","description":"Human-readable name for this resource"},"type":{"default":"standard","description":"Type discriminator for this resource","type":"string","enum":["standard","fifo"]},"dead_letter_queue":{"type":["string","null"],"description":"Name of an existing queue to receive failed messages."},"max_retries":{"type":["integer","null"],"minimum":1,"description":"Nack count before moving to DLQ."},"message_retention_days":{"type":["integer","null"],"minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"visibility_timeout_default":{"type":["integer","null"],"minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds"},"delivery_delay_seconds":{"type":["integer","null"],"minimum":0,"maximum":604800,"description":"Default delay applied when a published message omits delay_seconds."},"enable_priority":{"type":["boolean","null"],"description":"Whether priority-based delivery is enabled"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/Queue.json","response":{"title":"Queue","description":"A user-created queue resource. See docs/Infrai_SDK_Scheduling.md §2.8 and enums/queue_type.yaml.","type":"object","required":["name","type","account_id","message_retention_days","max_message_size_kb","visibility_timeout_default","delivery_delay_seconds","enable_priority","max_receive_count","created_at","updated_at"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9._-]+$","description":"Human-readable name for this resource"},"type":{"enum":["standard","fifo"],"description":"Type discriminator for this resource"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"message_retention_days":{"type":"integer","minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"max_message_size_kb":{"type":"integer","minimum":1,"maximum":256,"description":"Maximum message size in kilobytes"},"visibility_timeout_default":{"type":"integer","minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds."},"delivery_delay_seconds":{"type":"integer","minimum":0,"maximum":900,"description":"Delay before message delivery in seconds"},"enable_priority":{"type":"boolean","description":"Whether priority-based delivery is enabled"},"dlq_name":{"type":["string","null"],"description":"Name of the dead-letter queue"},"max_receive_count":{"type":"integer","minimum":1,"description":"Nack count after which message moves to DLQ."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"queue.delete","module":"scheduling","namespace":"queue","action":"delete","method":"DELETE","path":"/v1/queue/delete/{queue}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a message queue and discard all of its pending messages (use queue.purge to keep the queue); idempotent.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/QueueDeleteResult.json","response":{"title":"QueueDeleteResult","type":"object","description":"Result of deleting a queue.","required":["queue","deleted"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Name of the (attempted) deleted queue"},"deleted":{"type":"boolean","description":"Whether the queue was deleted"},"status":{"type":["string","null"],"enum":["not_found",null],"description":"Set to 'not_found' when the queue did not exist (deleted=false)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/queue/delete/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/queue/delete/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/delete/QUEUE\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/delete/QUEUE\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/queue/delete/QUEUE\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/delete/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/queue/delete/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/delete/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/delete/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/queue/delete/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.dlq.list","module":"scheduling","namespace":"queue","action":"dlq.list","method":"GET","path":"/v1/queue/dlq/list/{queue}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List messages in a queue's dead-letter queue (DLQ) with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/QueueMessageList.json","response":{"title":"QueueMessageList","description":"Result for queue.consume and queue.dlq.list — array of QueueMessage rows. consume uses lease semantics (no cursor); dlq.list uses cursor pagination. See REVIEW Scheduling §3.B.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/queue/dlq/list/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/queue/dlq/list/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.dlq.redrive","module":"scheduling","namespace":"queue","action":"dlq.redrive","method":"POST","path":"/v1/queue/dlq/redrive/{queue}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Redrive dead-letter messages back to the source queue, individually or in bulk.","request_schema_ref":"scheduling/QueueDlqRedriveRequest.json","params":{"title":"QueueDlqRedriveRequest","description":"Request shape for queue.dlq.redrive — re-deliver dead-lettered messages. Single message (message_id) or bulk (since). See REVIEW Scheduling §3.B.","type":"object","required":["queue"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"message_id":{"type":["string","null"],"pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Redrive a single message; omit for bulk."},"since":{"type":["string","null"],"format":"date-time","description":"Bulk redrive all DLQ messages dead-lettered at/after this time."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueueDlqRedriveResult.json","response":{"title":"QueueDlqRedriveResult","type":"object","description":"Result of redriving messages from the dead-letter queue.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the redrive was initiated"},"redriven_count":{"type":["integer","null"],"description":"Number of messages redriven"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/dlq/redrive/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample"}}},{"id":"queue.get","module":"scheduling","namespace":"queue","action":"get","method":"GET","path":"/v1/queue/get/{queue}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Retrieve a queue's configuration details.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/Queue.json","response":{"title":"Queue","description":"A user-created queue resource. See docs/Infrai_SDK_Scheduling.md §2.8 and enums/queue_type.yaml.","type":"object","required":["name","type","account_id","message_retention_days","max_message_size_kb","visibility_timeout_default","delivery_delay_seconds","enable_priority","max_receive_count","created_at","updated_at"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9._-]+$","description":"Human-readable name for this resource"},"type":{"enum":["standard","fifo"],"description":"Type discriminator for this resource"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"message_retention_days":{"type":"integer","minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"max_message_size_kb":{"type":"integer","minimum":1,"maximum":256,"description":"Maximum message size in kilobytes"},"visibility_timeout_default":{"type":"integer","minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds."},"delivery_delay_seconds":{"type":"integer","minimum":0,"maximum":900,"description":"Delay before message delivery in seconds"},"enable_priority":{"type":"boolean","description":"Whether priority-based delivery is enabled"},"dlq_name":{"type":["string","null"],"description":"Name of the dead-letter queue"},"max_receive_count":{"type":"integer","minimum":1,"description":"Nack count after which message moves to DLQ."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/queue/get/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/queue/get/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/get/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/get/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/queue/get/QUEUE\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/get/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/queue/get/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/get/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/get/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/queue/get/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.list","module":"scheduling","namespace":"queue","action":"list","method":"GET","path":"/v1/queue/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List all message queues with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/QueueList.json","response":{"title":"QueueList","description":"Paginated result for queue.list — array of Queue rows. See REVIEW Scheduling §3.B.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"Queue","description":"A user-created queue resource. See docs/Infrai_SDK_Scheduling.md §2.8 and enums/queue_type.yaml.","type":"object","required":["name","type","account_id","message_retention_days","max_message_size_kb","visibility_timeout_default","delivery_delay_seconds","enable_priority","max_receive_count","created_at","updated_at"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9._-]+$","description":"Human-readable name for this resource"},"type":{"enum":["standard","fifo"],"description":"Type discriminator for this resource"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"message_retention_days":{"type":"integer","minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"max_message_size_kb":{"type":"integer","minimum":1,"maximum":256,"description":"Maximum message size in kilobytes"},"visibility_timeout_default":{"type":"integer","minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds."},"delivery_delay_seconds":{"type":"integer","minimum":0,"maximum":900,"description":"Delay before message delivery in seconds"},"enable_priority":{"type":"boolean","description":"Whether priority-based delivery is enabled"},"dlq_name":{"type":["string","null"],"description":"Name of the dead-letter queue"},"max_receive_count":{"type":"integer","minimum":1,"description":"Nack count after which message moves to DLQ."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/queue/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/queue/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/queue/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/queue/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/queue/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.nack","module":"scheduling","namespace":"queue","action":"nack","method":"POST","path":"/v1/queue/nack","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Negatively acknowledge (nack) a message to requeue it or route it to the DLQ.","request_schema_ref":"scheduling/QueueNackRequest.json","params":{"title":"QueueNackRequest","description":"Request shape for queue.nack — negative-acknowledge a leased message; requeue for retry or send to DLQ. See REVIEW Scheduling §3.B.","type":"object","required":["queue","message_id"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"requeue":{"type":"boolean","default":true,"description":"false → straight to DLQ."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueueMessage.json","response":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/nack \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\", \"message_id\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/nack\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample', 'message_id': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/nack\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"message_id\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/nack\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"message_id\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\", \"message_id\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/nack\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/nack\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/nack\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/nack\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\", \\\"message_id\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/nack\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\", \"message_id\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/nack\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\", \"message_id\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample","message_id":"hello"}}},{"id":"queue.publish","module":"scheduling","namespace":"queue","action":"publish","method":"POST","path":"/v1/queue/publish","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Publish a single message to a queue (idempotent).","request_schema_ref":"scheduling/QueuePublishRequest.json","params":{"title":"QueuePublishRequest","description":"Request shape for queue.publish — preserves delay/priority/FIFO group/dedup/headers. See REVIEW Scheduling §3 modify_existing.","type":"object","required":["queue","payload"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"payload":{"type":"object","description":"Payload data for the message or request body"},"delay_seconds":{"type":"integer","minimum":0,"maximum":604800,"default":0,"description":"0..604800 (7 days)."},"priority":{"type":"integer","minimum":0,"maximum":9,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueueMessage.json","response":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/publish \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\", \"payload\": {}}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/publish\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample', 'payload': {}},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/publish\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"payload\": {}}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/publish\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"payload\": {}}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\", \"payload\": {}}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/publish\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/publish\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\", \\\"payload\\\": {}}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/publish\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\", \\\"payload\\\": {}}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/publish\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\", \\\"payload\\\": {}}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/publish\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\", \"payload\": {}}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/publish\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\", \"payload\": {}}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample","payload":{}}}},{"id":"queue.publish_batch","module":"scheduling","namespace":"queue","action":"publish_batch","method":"POST","path":"/v1/queue/publish_batch","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Publish multiple messages to a queue in a single batch.","request_schema_ref":"scheduling/QueuePublishBatchRequest.json","params":{"title":"QueuePublishBatchRequest","description":"Request shape for queue.publish_batch — enqueue up to 100 messages in one call (high-throughput fan-out). See REVIEW Scheduling §3.B.","type":"object","required":["queue","messages"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"messages":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["payload"],"additionalProperties":false,"properties":{"payload":{"type":"object"},"delay_seconds":{"type":"integer","minimum":0,"maximum":604800,"default":0},"priority":{"type":"integer","minimum":0,"maximum":9,"default":0},"message_group_id":{"type":["string","null"]},"deduplication_id":{"type":["string","null"]},"headers":{"type":["object","null"]}}},"description":"List of messages to publish or process"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueueMessageList.json","response":{"title":"QueueMessageList","description":"Result for queue.consume and queue.dlq.list — array of QueueMessage rows. consume uses lease semantics (no cursor); dlq.list uses cursor pagination. See REVIEW Scheduling §3.B.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"QueueMessage","type":"object","description":"Superset shape: full message (queue.publish / queue.consume / queue.dlq.list) plus the thin ack/nack confirmation (queue.ack / queue.nack only return message_id + acked/nacked[+requeue]).","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^qmsg_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"acked":{"type":"boolean","description":"Whether the message was acknowledged (queue.ack response)"},"nacked":{"type":"boolean","description":"Whether the message was rejected (queue.nack response)"},"requeue":{"type":"boolean","description":"Whether the rejected message was requeued (queue.nack response)"},"account_id":{"type":"string","description":"Account identifier that owns this resource"},"payload":{"type":"object","description":"Payload data for the message or request body"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"status":{"enum":["available","in_flight","deleted","dlq"],"description":"Current status of this resource"},"delivery_count":{"type":"integer","minimum":0,"description":"Number of delivery attempts for this message"},"visibility_timeout_expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when visibility timeout expires"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"available_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the message becomes available for consumption"},"priority":{"type":"integer","minimum":0,"maximum":10,"default":0,"description":"Priority for MX or SRV records"},"message_group_id":{"type":["string","null"],"description":"FIFO only."},"deduplication_id":{"type":["string","null"],"description":"FIFO only; 5-min dedup window."}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/publish_batch \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/publish_batch\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample', 'messages': [{'payload': {}}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/publish_batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/publish_batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/publish_batch\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/publish_batch\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\", \\\"messages\\\": [{\\\"payload\\\": {}}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/publish_batch\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\", \\\"messages\\\": [{\\\"payload\\\": {}}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/publish_batch\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\", \\\"messages\\\": [{\\\"payload\\\": {}}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/publish_batch\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/publish_batch\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\", \"messages\": [{\"payload\": {}}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample","messages":[{"payload":{}}]}}},{"id":"queue.purge","module":"scheduling","namespace":"queue","action":"purge","method":"POST","path":"/v1/queue/purge/{queue}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Purge all messages from a queue.","request_schema_ref":"scheduling/QueuePurgeRequest.json","params":{"title":"QueuePurgeRequest","description":"Request shape for queue.purge — drop all pending messages from a queue. Returns queue + purged count.","type":"object","required":["queue"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Name of the queue to purge."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/QueuePurgeResult.json","response":{"title":"QueuePurgeResult","type":"object","description":"Result of purging a queue.","required":["queue"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Name of the (attempted) purged queue"},"purged":{"type":["integer","null"],"description":"Number of messages purged"},"found":{"type":"boolean","description":"Set to false when the queue did not exist (purged omitted)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/purge/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/purge/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/purge/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/purge/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/purge/QUEUE\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/purge/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/purge/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/purge/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/purge/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/purge/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample"}}},{"id":"queue.push_subscribe","module":"scheduling","namespace":"queue","action":"push_subscribe","method":"POST","path":"/v1/queue/push_subscribe/{queue}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Configure a push subscription to deliver queue messages to a callback URL.","request_schema_ref":"scheduling/QueuePushSubscribeRequest.json","params":{"title":"QueuePushSubscribeRequest","description":"Request shape for queue.push_subscribe — register a remote URL that the queue pushes messages to (serverless consume; maps module subscribe_webhook). Returns a Subscription. Distinct from the local in-proc queue.subscribe worker, which is SDK-local and not a gateway capability. See REVIEW Scheduling §3.B / §4.","type":"object","required":["queue","url"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"url":{"type":"string","format":"uri","description":"https:// push target; SSRF-validated."},"secret":{"type":["string","null"],"description":"HMAC signing secret for pushed deliveries."},"max_retries":{"type":["integer","null"],"minimum":0,"description":"Maximum number of delivery retries"},"visibility_timeout":{"type":["integer","null"],"minimum":0,"maximum":43200,"description":"Visibility timeout in seconds"},"dead_letter_queue":{"type":["string","null"],"description":"Dead-letter queue name for failed messages"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/Subscription.json","response":{"title":"Subscription","description":"Handle returned by infra.queue.subscribe — represents a long-running local worker consuming from a queue. See docs/Infrai_SDK_Scheduling.md §2.3.2.","type":"object","required":["subscription_id","queue","account_id","concurrency","max_retries","active","started_at"],"additionalProperties":false,"properties":{"subscription_id":{"type":"string","pattern":"^sub_[A-Za-z0-9]{20,}$","description":"Unique identifier for this subscription"},"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"concurrency":{"type":"integer","minimum":1,"description":"Number of concurrent consumers for push subscriptions"},"max_retries":{"type":"integer","minimum":0,"description":"Maximum number of delivery retries"},"dead_letter_queue":{"type":["string","null"],"description":"Dead-letter queue name for failed messages"},"active":{"type":"boolean","description":"Whether this resource is currently active"},"started_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when execution started"},"stopped_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the subscription was stopped"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/queue/push_subscribe/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'queue': 'sample', 'url': 'https://example.com/callback'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"queue\\\": \\\"sample\\\", \\\"url\\\": \\\"https://example.com/callback\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"queue\\\": \\\"sample\\\", \\\"url\\\": \\\"https://example.com/callback\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"queue\\\": \\\"sample\\\", \\\"url\\\": \\\"https://example.com/callback\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/queue/push_subscribe/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"queue\": \"sample\", \"url\": \"https://example.com/callback\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"queue":"sample","url":"https://example.com/callback"}}},{"id":"queue.push_subscription.delete","module":"scheduling","namespace":"queue","action":"push_subscription.delete","method":"DELETE","path":"/v1/queue/push_subscription/delete/{queue}/{subscription_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a queue webhook push subscription.","request_schema_ref":null,"params":{},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/queue/push_subscription/delete/QUEUE/SUBSCRIPTION_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.push_subscription.list","module":"scheduling","namespace":"queue","action":"push_subscription.list","method":"GET","path":"/v1/queue/push_subscription/list/{queue}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List webhook push subscriptions for a queue.","request_schema_ref":null,"params":{},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/queue/push_subscription/list/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.stats","module":"scheduling","namespace":"queue","action":"stats","method":"GET","path":"/v1/queue/stats/{queue}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Retrieve queue metrics: available, in-flight, and dead-lettered message counts.","request_schema_ref":null,"params":{},"response_schema_ref":"scheduling/QueueStats.json","response":{"title":"QueueStats","description":"Real-time stats snapshot for a queue. See docs/Infrai_SDK_Scheduling.md §2.8.","type":"object","required":["queue","message_count","available_count","in_flight_count","delayed_count","dlq_count","oldest_message_age_seconds"],"additionalProperties":false,"properties":{"queue":{"type":"string","description":"Queue name this message or subscription belongs to"},"message_count":{"type":"integer","minimum":0,"description":"available + in_flight."},"available_count":{"type":"integer","minimum":0,"description":"Number of messages available for consumption"},"in_flight_count":{"type":"integer","minimum":0,"description":"Number of messages currently being processed"},"delayed_count":{"type":"integer","minimum":0,"description":"Number of delayed messages"},"dlq_count":{"type":"integer","minimum":0,"description":"Number of messages in the dead-letter queue"},"oldest_message_age_seconds":{"type":"integer","minimum":0,"description":"Age of the oldest message in the queue in seconds"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/queue/stats/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/queue/stats/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/stats/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/stats/QUEUE\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/queue/stats/QUEUE\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/stats/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/queue/stats/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/stats/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/stats/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/queue/stats/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"queue.update","module":"scheduling","namespace":"queue","action":"update","method":"PATCH","path":"/v1/queue/update/{queue}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Update a queue's DLQ, retry, and retention settings.","request_schema_ref":"scheduling/QueueUpdateRequest.json","params":{"title":"QueueUpdateRequest","description":"Request shape for queue.update — change max_retries / DLQ / retention. See REVIEW Scheduling §3.B. Returns a Queue.","type":"object","additionalProperties":false,"properties":{"dead_letter_queue":{"type":["string","null"],"description":"Dead-letter queue name for failed messages"},"max_retries":{"type":["integer","null"],"minimum":1,"description":"Maximum number of delivery retries"},"message_retention_days":{"type":["integer","null"],"minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"visibility_timeout_default":{"type":["integer","null"],"minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds"},"delivery_delay_seconds":{"type":["integer","null"],"minimum":0,"maximum":604800,"description":"Default delay applied when a published message omits delay_seconds."},"enable_priority":{"type":["boolean","null"],"description":"Whether priority-based delivery is enabled"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"scheduling/Queue.json","response":{"title":"Queue","description":"A user-created queue resource. See docs/Infrai_SDK_Scheduling.md §2.8 and enums/queue_type.yaml.","type":"object","required":["name","type","account_id","message_retention_days","max_message_size_kb","visibility_timeout_default","delivery_delay_seconds","enable_priority","max_receive_count","created_at","updated_at"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9._-]+$","description":"Human-readable name for this resource"},"type":{"enum":["standard","fifo"],"description":"Type discriminator for this resource"},"account_id":{"type":"string","pattern":"^acct_(anon|email)_[A-Za-z0-9_]{8,}$","description":"Account identifier that owns this resource"},"message_retention_days":{"type":"integer","minimum":1,"maximum":30,"description":"Number of days to retain queue messages"},"max_message_size_kb":{"type":"integer","minimum":1,"maximum":256,"description":"Maximum message size in kilobytes"},"visibility_timeout_default":{"type":"integer","minimum":0,"maximum":43200,"description":"Default visibility timeout in seconds."},"delivery_delay_seconds":{"type":"integer","minimum":0,"maximum":900,"description":"Delay before message delivery in seconds"},"enable_priority":{"type":"boolean","description":"Whether priority-based delivery is enabled"},"dlq_name":{"type":["string","null"],"description":"Name of the dead-letter queue"},"max_receive_count":{"type":"integer","minimum":1,"description":"Nack count after which message moves to DLQ."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","CRON_EXPR_INVALID","CRON_JOB_NOT_FOUND","CRON_MAX_RUNS_REACHED","CRON_MISSED_SCHEDULE","CRON_OVERLAP_SKIPPED","CRON_RUN_FAILED","CRON_RUN_TIMEOUT","CRON_TASK_5XX","CRON_TASK_URL_UNREACHABLE","CRON_TIMEOUT","CRON_TIMEZONE_INVALID","DEDUPLICATION_ID_MISSING","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","MESSAGE_GROUP_ID_MISSING","NETWORK_ERROR","QUEUE_ALREADY_EXISTS","QUEUE_DELAY_INVALID","QUEUE_FIFO_CONFLICT","QUEUE_HEADERS_TOO_LARGE","QUEUE_MESSAGE_NOT_FOUND","QUEUE_MESSAGE_NOT_IN_FLIGHT","QUEUE_MESSAGE_TOO_LARGE","QUEUE_NOT_FOUND","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED","WEBHOOK_DELIVERY_NOT_FOUND","WEBHOOK_ENDPOINT_NOT_FOUND","WEBHOOK_PAYLOAD_TOO_LARGE","WEBHOOK_TARGET_4XX","WEBHOOK_TARGET_5XX","WEBHOOK_TARGET_TIMEOUT","WEBHOOK_TIMESTAMP_EXPIRED","WEBHOOK_URL_INVALID","WEBHOOK_VERIFY_FAILED"],"examples":{"curl":"curl -X PATCH https://api.infrai.cc/v1/queue/update/QUEUE \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.patch(\n    \"https://api.infrai.cc/v1/queue/update/QUEUE\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/update/QUEUE\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/queue/update/QUEUE\",\n  {\n    method: \"PATCH\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"PATCH\", \"https://api.infrai.cc/v1/queue/update/QUEUE\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/queue/update/QUEUE\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PATCH\"), \"https://api.infrai.cc/v1/queue/update/QUEUE\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/queue/update/QUEUE\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/queue/update/QUEUE\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Patch.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .patch(\"https://api.infrai.cc/v1/queue/update/QUEUE\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"realtime.channel.create","module":"realtime","namespace":"realtime","action":"channel.create","method":"POST","path":"/v1/realtime/channel/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create a realtime pub/sub channel; idempotent.","request_schema_ref":"realtime/ChannelCreateRequest.json","params":{"title":"ChannelCreateRequest","description":"Request shape for realtime.channel.create — declare a realtime channel. Returns channel + channel_id + vendor.","type":"object","required":["channel"],"additionalProperties":false,"properties":{"channel":{"type":"string","description":"Channel name to create."},"type":{"type":"string","default":"public","description":"Channel type (e.g. public, private, presence)."},"vendor":{"type":["string","null"],"description":"Pin to a specific fan-out vendor; falls back to the registry default."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/Channel.json","response":{"title":"Channel","description":"A realtime pub/sub channel. See docs/phase2/P2_03_New_Modules.md §7.2.","type":"object","required":["channel_id","name","type","vendor","created_at"],"additionalProperties":false,"properties":{"channel_id":{"type":"string","description":"Unique identifier for this channel"},"name":{"type":"string","description":"Human-readable name for this resource"},"type":{"description":"Type discriminator for this resource","type":"string","enum":["public","private","presence"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"member_count":{"type":["integer","null"],"minimum":0,"description":"Number of members in the channel"},"last_published_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last published event"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/channel/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"channel\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/channel/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'channel': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"channel\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"channel\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"channel\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/channel/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/channel/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"channel\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/channel/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"channel\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/channel/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"channel\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/channel/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"channel\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/channel/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"channel\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"channel":"sample"}}},{"id":"realtime.channel.delete","module":"realtime","namespace":"realtime","action":"channel.delete","method":"DELETE","path":"/v1/realtime/channel/delete/{channel}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a realtime channel and disconnect its subscribers.","request_schema_ref":null,"params":{},"response_schema_ref":"realtime/ChannelDeleteResult.json","response":{"title":"ChannelDeleteResult","description":"Result of realtime.channel.delete (DELETE /v1/realtime/channels/{channel}, idempotent:true). Channel is locally managed, so this is a real op: an unknown channel honestly returns deleted=false, status=not_found.","type":"object","required":["channel","deleted","status"],"additionalProperties":false,"properties":{"channel":{"type":"string","description":"Channel name or identifier"},"deleted":{"type":"boolean","description":"Whether the resource was successfully deleted"},"status":{"enum":["deleted","not_found"],"description":"Current status of this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/realtime/channel/delete/CHANNEL\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"realtime.channel.get","module":"realtime","namespace":"realtime","action":"channel.get","method":"GET","path":"/v1/realtime/channel/get/{channel}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get a single realtime channel's details (type, vendor, online count, etc.).","request_schema_ref":null,"params":{},"response_schema_ref":"realtime/Channel.json","response":{"title":"Channel","description":"A realtime pub/sub channel. See docs/phase2/P2_03_New_Modules.md §7.2.","type":"object","required":["channel_id","name","type","vendor","created_at"],"additionalProperties":false,"properties":{"channel_id":{"type":"string","description":"Unique identifier for this channel"},"name":{"type":"string","description":"Human-readable name for this resource"},"type":{"description":"Type discriminator for this resource","type":"string","enum":["public","private","presence"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"member_count":{"type":["integer","null"],"minimum":0,"description":"Number of members in the channel"},"last_published_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last published event"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/realtime/channel/get/CHANNEL \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/realtime/channel/get/CHANNEL\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"realtime.channel.list","module":"realtime","namespace":"realtime","action":"channel.list","method":"GET","path":"/v1/realtime/channel/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_consistency","availability":"ga","regions":["western","china"],"summary":"List the account's realtime channels with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"realtime/ChannelListResult.json","response":{"title":"ChannelListResult","description":"Result of realtime.channel.list (GET /v1/realtime/channels): cursor-paginated list of channels. Query params: cursor (opaque, pass back for next page), limit (default 50), and optional filter on type/vendor.","type":"object","required":["channels"],"additionalProperties":false,"properties":{"channels":{"type":"array","items":{"title":"Channel","description":"A realtime pub/sub channel. See docs/phase2/P2_03_New_Modules.md §7.2.","type":"object","required":["channel_id","name","type","vendor","created_at"],"additionalProperties":false,"properties":{"channel_id":{"type":"string","description":"Unique identifier for this channel"},"name":{"type":"string","description":"Human-readable name for this resource"},"type":{"description":"Type discriminator for this resource","type":"string","enum":["public","private","presence"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"member_count":{"type":["integer","null"],"minimum":0,"description":"Number of members in the channel"},"last_published_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the last published event"}}},"description":"List of channel names the token grants access to"},"next_cursor":{"type":["string","null"],"description":"Pass back into channel.list() to fetch the next page; null on last page."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/realtime/channel/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/realtime/channel/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/channel/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/realtime/channel/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/channel/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/realtime/channel/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/channel/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/channel/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/realtime/channel/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"realtime.event.types","module":"realtime","namespace":"realtime","action":"event.types","method":"GET","path":"/v1/realtime/event/types","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"List the closed set of subscribable realtime event types.","request_schema_ref":null,"params":{},"response_schema_ref":"realtime/EventTypesResult.json","response":{"title":"EventTypesResult","description":"Result of realtime.event.types (GET /v1/realtime/event-types): self-discovery of the subscribable webhook event types (the RealtimeEventType SSOT closed set). Serves SDK Conventions §13.5.","type":"object","required":["types"],"additionalProperties":false,"properties":{"types":{"type":"array","items":{"type":"string","enum":["channel.opened","channel.closed","message.published","presence.join","presence.leave"],"description":"Webhook event names emitted by infra.realtime control plane."},"description":"List of available event types"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/realtime/event/types \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/realtime/event/types\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/event/types\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/event/types\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/realtime/event/types\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/event/types\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/realtime/event/types\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/event/types\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/event/types\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/realtime/event/types\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"realtime.presence.get","module":"realtime","namespace":"realtime","action":"presence.get","method":"GET","path":"/v1/realtime/presence/get/{channel}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Get the current presence state of members online in a channel.","request_schema_ref":null,"params":{},"response_schema_ref":"realtime/PresenceListResult.json","response":{"title":"PresenceListResult","description":"Result of realtime.presence.get (GET /v1/realtime/channels/{channel}/presence): the online roster, now cursor-paginated to unify with history.get / channel.list. Query params: cursor (opaque, pass back for next page), limit (default 100). MODIFY: previously the route returned {channel, members} with no cursor; next_cursor is added (Pusher caps presence at 100 so it is typically null; Ably needs real paging).","type":"object","required":["channel","members"],"additionalProperties":false,"properties":{"channel":{"type":"string","description":"Channel name or identifier"},"members":{"type":"array","items":{"title":"PresenceMember","description":"A member currently in a presence channel.","type":"object","required":["client_id","joined_at"],"additionalProperties":false,"properties":{"client_id":{"type":"string","description":"Client identifier for the connected user"},"joined_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this member joined"},"user_data":{"type":["object","null"],"description":"Custom data associated with the presence member"}}},"description":"List of presence members in the channel"},"next_cursor":{"type":["string","null"],"description":"Pass back into presence.get() to fetch the next page; null on last page."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/realtime/presence/get/CHANNEL \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/realtime/presence/get/CHANNEL\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"realtime.publish","module":"realtime","namespace":"realtime","action":"publish","method":"POST","path":"/v1/realtime/publish","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Publish an event message to a realtime pub/sub channel.","request_schema_ref":"realtime/PublishRequest.json","params":{"title":"PublishRequest","description":"Request shape for realtime.publish — fan out a single event to a channel via the configured realtime vendor. Returns the event_id. Fail-closed: no configured fan-out vendor yields VENDOR_DOWN.","type":"object","required":["channel"],"additionalProperties":false,"properties":{"channel":{"type":"string","description":"Channel to publish to."},"event":{"type":"string","default":"message","description":"Event name."},"data":{"description":"Event payload (any JSON value)."},"account_id":{"type":["string","null"],"description":"Account identifier that owns this resource"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/PublishResult.json","response":{"title":"PublishResult","description":"Result returned by realtime.publish.","type":"object","required":["event_id","channel","published_at","vendor"],"additionalProperties":false,"properties":{"event_id":{"type":"string","description":"Unique identifier for this event"},"channel":{"type":"string","description":"Channel name or identifier"},"published_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the event was published"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/publish \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"channel\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/publish\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'channel': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/publish\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"channel\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/publish\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"channel\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"channel\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/publish\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/publish\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"channel\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/publish\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"channel\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/publish\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"channel\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/publish\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"channel\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/publish\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"channel\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"channel":"sample"}}},{"id":"realtime.publish.batch","module":"realtime","namespace":"realtime","action":"publish.batch","method":"POST","path":"/v1/realtime/publish/batch","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Publish messages to multiple channels in a single batch call.","request_schema_ref":"realtime/PublishBatchRequest.json","params":{"title":"PublishBatchRequest","description":"Publish multiple messages in one call for realtime.publish.batch (POST /v1/realtime/publish/batch, idempotent:true). Returns PublishBatchResult. Maps to vendor batch endpoints (Ably /messages, Pusher /batch_events). Requires a configured fan-out vendor (none -> REALTIME_VENDOR_DOWN 503).","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["channel","event","data"],"additionalProperties":false,"properties":{"channel":{"type":"string","minLength":1},"event":{"type":"string","minLength":1,"description":"Event name on the channel."},"data":{"description":"Message payload (any JSON)."}}},"description":"List of messages to publish or process"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/PublishBatchResult.json","response":{"title":"PublishBatchResult","description":"Result of realtime.publish.batch: count of messages accepted by the vendor.","type":"object","required":["published"],"additionalProperties":false,"properties":{"published":{"type":"integer","minimum":0,"description":"Number of messages accepted for delivery."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/publish/batch \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/publish/batch\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'channel': 'sample', 'event': 'sample', 'data': 'sample'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/publish/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/publish/batch\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/publish/batch\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/publish/batch\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"channel\\\": \\\"sample\\\", \\\"event\\\": \\\"sample\\\", \\\"data\\\": \\\"sample\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/publish/batch\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"channel\\\": \\\"sample\\\", \\\"event\\\": \\\"sample\\\", \\\"data\\\": \\\"sample\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/publish/batch\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"channel\\\": \\\"sample\\\", \\\"event\\\": \\\"sample\\\", \\\"data\\\": \\\"sample\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/publish/batch\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/publish/batch\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"channel\": \"sample\", \"event\": \"sample\", \"data\": \"sample\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"channel":"sample","event":"sample","data":"sample"}]}}},{"id":"realtime.token.issue","module":"realtime","namespace":"realtime","action":"token.issue","method":"POST","path":"/v1/realtime/token/issue","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Issue a short-lived infrai-HMAC client auth token for pub/sub realtime channels.","request_schema_ref":"realtime/TokenIssueRequest.json","params":{"title":"TokenIssueRequest","description":"Issue a short-lived infrai-HMAC subscription token for realtime.token.issue (POST /v1/realtime/token, idempotent:true). Returns RealtimeToken (tok.to_dict()). CONVERGED: this route means infrai-HMAC signing verified by the Infrai gateway; when a fan-out vendor (Ably/Pusher) is configured it instead mints a vendor-native client token so the client can connect to the same vendor. A denied capability returns REALTIME_CAPABILITY_DENIED 403 (never silently downgraded); missing HMAC signing secret -> REALTIME_VENDOR_DOWN 503. See docs/Infrai_SDK_API.md realtime token.","type":"object","required":["client_id"],"additionalProperties":false,"properties":{"client_id":{"type":"string","minLength":1,"description":"Identity the issued token is bound to."},"channels":{"type":["array","null"],"items":{"type":"string"},"description":"Channels the token may attach to; omit for an account-scoped token."},"capabilities":{"type":["array","null"],"items":{"type":"string","enum":["subscribe","publish","presence","history"],"description":"Per-token capability bits for a client connection."},"description":"Capability bits; constrained to the RealtimeCapability closed set. Defaults to subscribe."},"ttl_seconds":{"type":["integer","null"],"minimum":1,"description":"Requested lifetime; clamped to MAX_TTL_SECONDS (<=0 or invalid -> REALTIME_TOKEN_TTL_INVALID 400)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/RealtimeToken.json","response":{"title":"RealtimeToken","description":"Short-lived client token for browser subscribers.","type":"object","required":["token","jti","channels","capabilities","expires_at"],"additionalProperties":false,"properties":{"token":{"type":"string","description":"Authentication or verification token"},"jti":{"type":"string","description":"JWT ID; used for server-side revocation."},"channels":{"type":"array","items":{"type":"string"},"description":"List of channel names the token grants access to"},"capabilities":{"type":"array","items":{"type":"string","enum":["subscribe","publish","presence","history"],"description":"Per-token capability bits for a client connection."},"description":"List of capability permissions (publish, subscribe)"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/token/issue \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/token/issue\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'client_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/token/issue\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"client_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/token/issue\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"client_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"client_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/token/issue\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/token/issue\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/token/issue\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"client_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/token/issue\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/token/issue\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"client_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/token/issue\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"client_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"client_id":"sample"}}},{"id":"realtime.token.revoke","module":"realtime","namespace":"realtime","action":"token.revoke","method":"POST","path":"/v1/realtime/token/revoke","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Revoke a previously issued subscription token (e.g., on logout or ban).","request_schema_ref":"realtime/TokenRevokeRequest.json","params":{"title":"TokenRevokeRequest","description":"Revoke a previously issued token for realtime.token.revoke (POST /v1/realtime/token/revoke, idempotent:true). Returns TokenRevokeResult. Used on logout/ban; the token jti is added to the revocation list (subsequent use -> REALTIME_TOKEN_REVOKED 401).","type":"object","required":["token_or_jti"],"additionalProperties":false,"properties":{"token_or_jti":{"type":"string","minLength":1,"description":"Either the full token or its jti."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/TokenRevokeResult.json","response":{"title":"TokenRevokeResult","description":"Result of realtime.token.revoke.","type":"object","required":["revoked"],"additionalProperties":false,"properties":{"revoked":{"type":"boolean","description":"Whether the token was successfully revoked"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/token/revoke \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"token_or_jti\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/token/revoke\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'token_or_jti': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/token/revoke\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"token_or_jti\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/token/revoke\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"token_or_jti\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"token_or_jti\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/token/revoke\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/token/revoke\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"token_or_jti\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/token/revoke\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"token_or_jti\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/token/revoke\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"token_or_jti\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/token/revoke\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"token_or_jti\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/token/revoke\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"token_or_jti\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"token_or_jti":"sample"}}},{"id":"realtime.user.disconnect","module":"realtime","namespace":"realtime","action":"user.disconnect","method":"POST","path":"/v1/realtime/user/disconnect","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Forcibly disconnect a client, optionally scoped to a single channel.","request_schema_ref":"realtime/UserDisconnectRequest.json","params":{"title":"UserDisconnectRequest","description":"Force a client offline for realtime.user.disconnect (POST /v1/realtime/users/disconnect, idempotent:true). Returns UserDisconnectResult. Optional channel scopes the disconnect to one channel; omit to disconnect everywhere.","type":"object","required":["client_id"],"additionalProperties":false,"properties":{"client_id":{"type":"string","minLength":1,"description":"Client identifier for the connected user"},"channel":{"type":["string","null"],"description":"Restrict the disconnect to this channel; omit for all."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"realtime/UserDisconnectResult.json","response":{"title":"UserDisconnectResult","description":"Result of realtime.user.disconnect.","type":"object","required":["disconnected"],"additionalProperties":false,"properties":{"disconnected":{"type":"boolean","description":"Whether the user was successfully disconnected"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","REALTIME_CAPABILITY_DENIED","REALTIME_CHANNEL_LIMIT","REALTIME_CHANNEL_NOT_FOUND","REALTIME_INVALID_CHANNEL_TYPE","REALTIME_INVALID_MODE","REALTIME_INVALID_PRESENCE_STATE","REALTIME_MESSAGE_TOO_LARGE","REALTIME_PRESENCE_LIMIT_EXCEEDED","REALTIME_PRESENCE_MEMBER_NOT_FOUND","REALTIME_PRESENCE_NOT_ALLOWED","REALTIME_RATE_LIMIT","REALTIME_TOKEN_EXPIRED","REALTIME_TOKEN_INVALID","REALTIME_TOKEN_REVOKED","REALTIME_TOKEN_TTL_INVALID","REALTIME_VENDOR_DOWN","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/realtime/user/disconnect \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/realtime/user/disconnect\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'client_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/user/disconnect\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"client_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/realtime/user/disconnect\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"client_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"client_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/realtime/user/disconnect\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/realtime/user/disconnect\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"client_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/realtime/user/disconnect\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"client_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/realtime/user/disconnect\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"client_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/realtime/user/disconnect\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"client_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/realtime/user/disconnect\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"client_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"client_id":"sample"}}},{"id":"rtc.participant.kick","module":"rtc","namespace":"rtc","action":"participant.kick","method":"POST","path":"/v1/rtc/participant/kick/{room}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Forcibly remove (kick) a participant from a room.","request_schema_ref":"rtc/ParticipantKickRequest.json","params":{"title":"ParticipantKickRequest","description":"Request for rtc.participant.kick — remove a participant from a room (path room).","type":"object","required":["room","identity"],"additionalProperties":false,"properties":{"room":{"type":"string","minLength":1,"description":"Path param; the room name."},"identity":{"type":"string","minLength":1,"description":"Participant identity / uid to remove."},"vendor":{"type":["string","null"],"enum":["livekit","agora","tencent_rtc","zego",null],"description":"Vendor that handled or will handle this request"}}},"response_schema_ref":"rtc/ParticipantKickResult.json","response":{"title":"ParticipantKickResult","type":"object","description":"Result of kicking a participant from a room.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the participant was kicked"},"identity":{"type":["string","null"],"description":"Identity of the kicked participant"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/rtc/participant/kick/ROOM \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"room\": \"sample\", \"identity\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'room': 'sample', 'identity': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"room\": \"sample\", \"identity\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"room\": \"sample\", \"identity\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"room\": \"sample\", \"identity\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"room\": \"sample\", \"identity\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/rtc/participant/kick/ROOM\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"room\": \"sample\", \"identity\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"room":"sample","identity":"sample"}}},{"id":"rtc.participant.list","module":"rtc","namespace":"rtc","action":"participant.list","method":"GET","path":"/v1/rtc/participant/list/{room}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List participants currently in a room.","request_schema_ref":null,"params":{},"response_schema_ref":"rtc/RtcParticipant.json","response":{"title":"RtcParticipant","description":"One participant in a room (rtc.participant.list element).","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","description":"Participants currently in the room (empty when the vendor has no roster read, e.g. tencent_rtc)","items":{"type":"object","required":["identity","state"],"additionalProperties":false,"properties":{"identity":{"type":"string","description":"Identity string for the participant"},"joined_at":{"type":["string","null"],"description":"ISO 8601 timestamp when this member joined"},"state":{"type":"string","enum":["active","joining","disconnected"],"description":"Current lifecycle state of this resource"},"is_publisher":{"type":"boolean","default":false,"description":"Whether the participant is publishing media"},"display_name":{"type":["string","null"],"description":"Human-readable display name"}}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/rtc/participant/list/ROOM \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/rtc/participant/list/ROOM\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/participant/list/ROOM\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/participant/list/ROOM\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/rtc/participant/list/ROOM\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/participant/list/ROOM\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/rtc/participant/list/ROOM\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/participant/list/ROOM\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/participant/list/ROOM\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/rtc/participant/list/ROOM\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"rtc.room.create","module":"rtc","namespace":"rtc","action":"room.create","method":"POST","path":"/v1/rtc/room/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Create a live audio/video room on the selected RTC vendor. Some vendors (Agora/Zego) have no persistent room object — the room materializes on first join and the record is synthesized.","request_schema_ref":"rtc/RoomCreateRequest.json","params":{"title":"RoomCreateRequest","description":"Request for rtc.room.create.","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"description":"Room name (unique per account)."},"max_participants":{"type":["integer","null"],"minimum":1,"description":"Maximum number of participants allowed in the room"},"empty_timeout_s":{"type":["integer","null"],"minimum":0,"description":"Auto-close after this many seconds empty."},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"vendor":{"type":["string","null"],"enum":["livekit","agora","tencent_rtc","zego",null],"description":"Vendor that handled or will handle this request"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"rtc/RtcRoom.json","response":{"title":"RtcRoom","description":"A live audio/video room. Some vendors (agora/zego) have no persistent room object; the record is synthesized client-side.","type":"object","required":["room_id","name","vendor","state"],"additionalProperties":false,"properties":{"room_id":{"type":"string","description":"Vendor room SID or the room name when there is no SID."},"name":{"type":"string","minLength":1,"description":"Human-readable name for this resource"},"vendor":{"type":"string","enum":["livekit","agora","tencent_rtc","zego"],"description":"Vendor that handled or will handle this request"},"state":{"type":"string","enum":["active","closed"],"description":"Current lifecycle state of this resource"},"max_participants":{"type":["integer","null"],"minimum":0,"description":"Maximum number of participants allowed in the room"},"num_participants":{"type":"integer","minimum":0,"default":0,"description":"Current number of participants in the room"},"created_at":{"type":["string","null"],"description":"ISO 8601 timestamp when this resource was created"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/rtc/room/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/rtc/room/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/rtc/room/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/room/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/rtc/room/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/room/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/room/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/rtc/room/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"rtc.room.delete","module":"rtc","namespace":"rtc","action":"room.delete","method":"DELETE","path":"/v1/rtc/room/delete/{room}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Close an RTC room (vendors without a delete API auto-close when empty).","request_schema_ref":null,"params":{},"response_schema_ref":"rtc/RtcRoomDeleteResult.json","response":{"title":"RtcRoomDeleteResult","type":"object","description":"Result of deleting an RTC room.","required":["room_id","name","vendor","state"],"additionalProperties":false,"properties":{"room_id":{"type":"string","description":"Vendor room SID or the room name when there is no SID."},"name":{"type":"string","minLength":1,"description":"Name of the deleted room"},"vendor":{"type":"string","enum":["livekit","agora","tencent_rtc","zego"],"description":"Vendor that handled the request"},"state":{"type":"string","enum":["active","closed"],"description":"Lifecycle state after deletion (always \"closed\"; vendors without a delete API auto-close when empty)"},"max_participants":{"type":["integer","null"],"minimum":0,"description":"Maximum number of participants allowed in the room"},"num_participants":{"type":"integer","minimum":0,"default":0,"description":"Current number of participants in the room"},"created_at":{"type":["string","null"],"description":"ISO 8601 timestamp when this resource was created"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/rtc/room/delete/ROOM \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/rtc/room/delete/ROOM\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/delete/ROOM\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/delete/ROOM\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/rtc/room/delete/ROOM\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/room/delete/ROOM\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/rtc/room/delete/ROOM\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/room/delete/ROOM\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/room/delete/ROOM\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/rtc/room/delete/ROOM\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"rtc.room.get","module":"rtc","namespace":"rtc","action":"room.get","method":"GET","path":"/v1/rtc/room/get/{room}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Fetch a single RTC room's state and live occupancy.","request_schema_ref":null,"params":{},"response_schema_ref":"rtc/RtcRoom.json","response":{"title":"RtcRoom","description":"A live audio/video room. Some vendors (agora/zego) have no persistent room object; the record is synthesized client-side.","type":"object","required":["room_id","name","vendor","state"],"additionalProperties":false,"properties":{"room_id":{"type":"string","description":"Vendor room SID or the room name when there is no SID."},"name":{"type":"string","minLength":1,"description":"Human-readable name for this resource"},"vendor":{"type":"string","enum":["livekit","agora","tencent_rtc","zego"],"description":"Vendor that handled or will handle this request"},"state":{"type":"string","enum":["active","closed"],"description":"Current lifecycle state of this resource"},"max_participants":{"type":["integer","null"],"minimum":0,"description":"Maximum number of participants allowed in the room"},"num_participants":{"type":"integer","minimum":0,"default":0,"description":"Current number of participants in the room"},"created_at":{"type":["string","null"],"description":"ISO 8601 timestamp when this resource was created"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/rtc/room/get/ROOM \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/rtc/room/get/ROOM\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/get/ROOM\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/get/ROOM\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/rtc/room/get/ROOM\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/room/get/ROOM\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/rtc/room/get/ROOM\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/room/get/ROOM\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/room/get/ROOM\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/rtc/room/get/ROOM\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"rtc.room.list","module":"rtc","namespace":"rtc","action":"room.list","method":"GET","path":"/v1/rtc/room/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_consistency","availability":"ga","regions":["western","china"],"summary":"List active RTC rooms / channels for the account.","request_schema_ref":null,"params":{},"response_schema_ref":"rtc/RtcRoomListResult.json","response":{"title":"RtcRoomListResult","type":"object","description":"Paginated list of RTC rooms.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of RTC room records"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/rtc/room/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/rtc/room/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/room/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/rtc/room/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/room/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/rtc/room/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/room/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/room/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/rtc/room/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"rtc.token.issue","module":"rtc","namespace":"rtc","action":"token.issue","method":"POST","path":"/v1/rtc/token/issue","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Mint a per-participant join token (vendor-native JWT/AccessToken2/token04, signed locally). Prepaid by the token validity window in whole participant-minutes; bandwidth/egress floored at cost.","request_schema_ref":"rtc/TokenIssueRequest.json","params":{"title":"TokenIssueRequest","description":"Request for rtc.token.issue — mint a per-participant join token (billed per participant-minute conceptually).","type":"object","required":["room","identity"],"additionalProperties":false,"properties":{"room":{"type":"string","minLength":1,"description":"Room name or identifier"},"identity":{"type":"string","minLength":1,"description":"Unique per-participant identity / uid."},"display_name":{"type":["string","null"],"description":"Human-readable display name"},"ttl_s":{"type":"integer","minimum":1,"default":3600,"description":"Time-to-live in seconds for the token. Billing reserves ceil(ttl_s / 60) participant-minutes when the token is issued."},"can_publish":{"type":"boolean","default":true,"description":"Whether the token grants publish permission"},"can_subscribe":{"type":"boolean","default":true,"description":"Whether the token grants subscribe permission"},"can_publish_data":{"type":"boolean","default":true,"description":"Whether the token grants data channel publish permission"},"is_admin":{"type":"boolean","default":false,"description":"Whether the token grants admin privileges"},"vendor":{"type":["string","null"],"enum":["livekit","agora","tencent_rtc","zego",null],"description":"Vendor that handled or will handle this request"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"}}},"response_schema_ref":"rtc/RtcToken.json","response":{"title":"RtcToken","description":"Result of rtc.token.issue. `token` is the vendor-native access token/JWT the client uses to join.","type":"object","required":["token","room","identity","vendor"],"additionalProperties":false,"properties":{"token":{"type":"string","minLength":1,"description":"Authentication or verification token"},"room":{"type":"string","description":"Room name or identifier"},"identity":{"type":"string","description":"Identity string for the participant"},"vendor":{"type":"string","enum":["livekit","agora","tencent_rtc","zego"],"description":"Vendor that handled or will handle this request"},"expires_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"ws_url":{"type":["string","null"],"description":"Vendor WebSocket / signalling URL the client connects to."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/rtc/token/issue \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"room\": \"sample\", \"identity\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/rtc/token/issue\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'room': 'sample', 'identity': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/token/issue\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"room\": \"sample\", \"identity\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/rtc/token/issue\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"room\": \"sample\", \"identity\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"room\": \"sample\", \"identity\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/rtc/token/issue\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/rtc/token/issue\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/rtc/token/issue\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/rtc/token/issue\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"room\\\": \\\"sample\\\", \\\"identity\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/rtc/token/issue\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"room\": \"sample\", \"identity\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/rtc/token/issue\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"room\": \"sample\", \"identity\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"room":"sample","identity":"sample"}}},{"id":"sms.batch.send","module":"sms","namespace":"sms","action":"batch.send","method":"POST","path":"/v1/sms/batch/send","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Send a heterogeneous batch of SMS (each a full request) under one idempotency key, billed per message.","request_schema_ref":"sms/SmsBatchSendRequest.json","params":{"title":"SmsBatchSendRequest","description":"Heterogeneous batch send: each item is a full SmsSendRequest (distinct body / recipients / template). One idempotency_key for the whole batch; per-message charges are not double-billed (batch passthrough).","type":"object","required":["messages"],"additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"maxItems":100,"items":{"title":"SmsSendRequest","description":"Request shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["to"],"additionalProperties":false,"properties":{"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"E.164 phone number or array of."},"body":{"type":["string","null"],"description":"Plain text body of the message"},"from":{"type":["string","null"],"description":"Sender ID, phone number, or approved sign name to use when the vendor path supports it."},"template_id":{"type":["string","null"],"description":"Identifier of the template used for rendering"},"template_vars":{"type":["object","null"],"description":"Variables to substitute in the template"},"vendor":{"type":["string","null"],"description":"Pin to a specific vendor."},"mode":{"enum":["default_vendor"],"default":"default_vendor","description":"Delivery mode or operation mode"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the resource is scheduled to activate"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for categorization and filtering"},"route_class":{"enum":["transactional","otp","marketing"],"default":"transactional","description":"SMS route class for delivery optimization"},"opt_in_proof_url":{"type":["string","null"],"description":"Required when route_class=marketing.","format":"uri"}}},"description":"Up to 100 SmsSendRequest items."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsBatchSendResult.json","response":{"title":"SmsBatchSendResult","description":"Per-message outcome of a batch send. results[i] aligns positionally with the request messages[i].","type":"object","required":["results"],"additionalProperties":false,"properties":{"results":{"type":"array","items":{"type":"object","required":["index"],"additionalProperties":false,"properties":{"index":{"type":"integer","minimum":0,"description":"Position in the request messages array."},"result":{"oneOf":[{"title":"SmsSendResult","description":"Response shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["message_id","state","vendor","segments","created_at"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"segments":{"type":"integer","minimum":1,"description":"Long SMS multi-part billing count."},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},{"type":"null"}],"description":"Send result when this item succeeded."},"error":{"oneOf":[{"title":"ErrorInfo","description":"Machine + human readable error. `code` MUST come from errors/registry.yaml.","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},{"type":"null"}],"description":"Error when this item failed; result is null."}}},"description":"List of individual results from a batch operation"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/batch/send \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"messages\": [{\"to\": \"sample\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/batch/send\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'messages': [{'to': 'sample'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/batch/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"to\": \"sample\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/batch/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"messages\": [{\"to\": \"sample\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"messages\": [{\"to\": \"sample\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/batch/send\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/batch/send\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/batch/send\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/batch/send\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"messages\\\": [{\\\"to\\\": \\\"sample\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/batch/send\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"messages\": [{\"to\": \"sample\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/batch/send\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"messages\": [{\"to\": \"sample\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"messages":[{"to":"sample"}]}}},{"id":"sms.cancel","module":"sms","namespace":"sms","action":"cancel","method":"POST","path":"/v1/sms/cancel/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Cancel a scheduled or queued SMS that has not yet been dispatched.","request_schema_ref":"sms/SmsCancelRequest.json","params":{"title":"SmsCancelRequest","description":"Request shape for sms.cancel — attempt to recall a queued SMS message. Returns SmsCancelResult (cancelled=false when the message had already left).","type":"object","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Id of the SMS message to cancel."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsCancelResult.json","response":{"title":"SmsCancelResult","description":"Result of sms.cancel. cancelled=false when the message had already left (sent/delivered) and could not be recalled; state reflects the post-attempt lifecycle state.","type":"object","required":["message_id","cancelled","state"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"cancelled":{"type":"boolean","description":"Whether the resource was successfully cancelled"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/cancel/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"message_id\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/cancel/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'message_id': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"message_id\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"message_id\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"message_id\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/cancel/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/cancel/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"message_id\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/cancel/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"message_id\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/cancel/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"message_id\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/cancel/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"message_id\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/cancel/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"message_id\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"message_id":"hello"}}},{"id":"sms.events","module":"sms","namespace":"sms","action":"events","method":"GET","path":"/v1/sms/events/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Retrieve the delivery event timeline for a single SMS message.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsEventList.json","response":{"title":"SmsEventList","description":"Lifecycle event timeline for one SMS message (sms.events) or inbound MO replies (sms.inbound.list). Ordered oldest-first.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SmsEvent","description":"Lifecycle event for a single SMS message. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["type","at","recipient"],"additionalProperties":false,"properties":{"type":{"description":"Type discriminator for this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed","delivery_receipt","inbound"]},"at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"recipient":{"type":"string","description":"E.164 phone number."},"message_id":{"type":["string","null"],"pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"meta":{"type":["object","null"],"description":"Additional metadata for the event"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/events/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/events/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/events/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/events/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/events/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/events/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/events/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/events/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/events/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/events/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.inbound.list","module":"sms","namespace":"sms","action":"inbound.list","method":"GET","path":"/v1/sms/inbound/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List inbound (reply) SMS received on registered sender numbers, with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsEventList.json","response":{"title":"SmsEventList","description":"Lifecycle event timeline for one SMS message (sms.events) or inbound MO replies (sms.inbound.list). Ordered oldest-first.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SmsEvent","description":"Lifecycle event for a single SMS message. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["type","at","recipient"],"additionalProperties":false,"properties":{"type":{"description":"Type discriminator for this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed","delivery_receipt","inbound"]},"at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of the event"},"recipient":{"type":"string","description":"E.164 phone number."},"message_id":{"type":["string","null"],"pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"meta":{"type":["object","null"],"description":"Additional metadata for the event"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/inbound/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/inbound/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/inbound/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/inbound/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/inbound/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/inbound/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/inbound/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/inbound/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/inbound/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/inbound/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.otp","module":"sms","namespace":"sms","action":"otp","method":"POST","path":"/v1/sms/otp","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Send a one-time passcode via SMS with gateway-managed OTP lifecycle.","request_schema_ref":"sms/SmsOtpRequest.json","params":{"title":"SmsOtpRequest","description":"Request shape for sms.otp — issue a one-time code and deliver it via the real SMS vendor. The code itself is NEVER returned; only otp_id + expiry. No usable vendor yields VENDOR_DOWN.","type":"object","required":["to"],"additionalProperties":false,"properties":{"to":{"type":"string","description":"Destination phone number (E.164).","example":"+15555550100"},"phone":{"type":["string","null"],"description":"Legacy alias for to."},"template":{"type":["string","null"],"description":"Message template containing {code}; defaults to 'Your verification code is {code}'."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsSendResult.json","response":{"title":"SmsSendResult","description":"Response shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["message_id","state","vendor","segments","created_at"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"segments":{"type":"integer","minimum":1,"description":"Long SMS multi-part billing count."},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/otp \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"+15555550100\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/otp\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'to': '+15555550100'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/otp\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"+15555550100\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/otp\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"+15555550100\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"to\": \"+15555550100\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/otp\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/otp\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"to\\\": \\\"+15555550100\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/otp\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"to\\\": \\\"+15555550100\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/otp\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"to\\\": \\\"+15555550100\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/otp\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"to\": \"+15555550100\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/otp\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"to\": \"+15555550100\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"to":"+15555550100"}}},{"id":"sms.resend","module":"sms","namespace":"sms","action":"resend","method":"POST","path":"/v1/sms/resend/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Resend an SMS, optionally retrying only the failed recipients.","request_schema_ref":"sms/SmsResendRequest.json","params":{"title":"SmsResendRequest","description":"Resend a prior message. With only_failed=true (default) only recipients still in a failed state are re-dispatched. idempotency_key guards against duplicate resends. Returns SmsSendResult for the resend batch.","type":"object","required":["message_id"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"only_failed":{"type":"boolean","default":true,"description":"Re-dispatch only failed recipients; false resends the whole original recipient set."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsSendResult.json","response":{"title":"SmsSendResult","description":"Response shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["message_id","state","vendor","segments","created_at"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"segments":{"type":"integer","minimum":1,"description":"Long SMS multi-part billing count."},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/resend/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"message_id\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/resend/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'message_id': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/resend/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"message_id\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/resend/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"message_id\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"message_id\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/resend/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/resend/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"message_id\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/resend/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"message_id\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/resend/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"message_id\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/resend/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"message_id\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/resend/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"message_id\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"message_id":"hello"}}},{"id":"sms.send","module":"sms","namespace":"sms","action":"send","method":"POST","path":"/v1/sms/send","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Send an SMS message to one or more recipients (idempotent).","request_schema_ref":"sms/SmsSendRequest.json","params":{"title":"SmsSendRequest","description":"Request shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["to"],"additionalProperties":false,"properties":{"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"E.164 phone number or array of."},"body":{"type":["string","null"],"description":"Plain text body of the message"},"from":{"type":["string","null"],"description":"Sender ID, phone number, or approved sign name to use when the vendor path supports it."},"template_id":{"type":["string","null"],"description":"Identifier of the template used for rendering"},"template_vars":{"type":["object","null"],"description":"Variables to substitute in the template"},"vendor":{"type":["string","null"],"description":"Pin to a specific vendor."},"mode":{"enum":["default_vendor"],"default":"default_vendor","description":"Delivery mode or operation mode"},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the resource is scheduled to activate"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags for categorization and filtering"},"route_class":{"enum":["transactional","otp","marketing"],"default":"transactional","description":"SMS route class for delivery optimization"},"opt_in_proof_url":{"type":["string","null"],"description":"Required when route_class=marketing.","format":"uri"}}},"response_schema_ref":"sms/SmsSendResult.json","response":{"title":"SmsSendResult","description":"Response shape for infra.sms.send. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["message_id","state","vendor","segments","created_at"],"additionalProperties":false,"properties":{"message_id":{"type":"string","pattern":"^sms_[A-Za-z0-9]{20,}$","description":"Unique identifier for this message"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"segments":{"type":"integer","minimum":1,"description":"Long SMS multi-part billing count."},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/send \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/send\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'to': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/send\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"to\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/send\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/send\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"to\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/send\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"to\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/send\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"to\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/send\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"to\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/send\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"to\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"to":"sample"}}},{"id":"sms.signature.create","module":"sms","namespace":"sms","action":"signature.create","method":"POST","path":"/v1/sms/signature/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create an SMS signature (required for China delivery) and submit it for review.","request_schema_ref":"sms/SmsSignatureCreateRequest.json","params":{"title":"SmsSignatureCreateRequest","description":"Register an SMS signature for China vendors. China vendors require a vendor-reviewed signature that prefixes every message; brand signatures need an authorization/business-license proof. review_state is polled via sms.signature.get.","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"Signature text shown as the bracketed prefix, e.g. 'Acme'."},"type":{"enum":["company","app","website","public_account","store","other"],"default":"company","description":"Signature usage scenario required by China vendors."},"proof_url":{"type":["string","null"],"description":"URL to the authorization letter / business-license image required for brand review.","format":"uri"},"remark":{"type":["string","null"],"description":"Note shown to the vendor reviewer."},"vendor":{"type":["string","null"],"description":"Pin the vendor to register at; otherwise the gateway picks per region."}}},"response_schema_ref":"sms/SmsSignature.json","response":{"title":"SmsSignature","description":"SMS signature record for China vendors. Returned by sms.signature.create / .get / .list. China vendors require a vendor-reviewed signature that prefixes every message; review_state is polled via sms.signature.get. The signature text is carried in `name` as the bracketed prefix. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["signature_id","name","type","review_state","created_at"],"additionalProperties":false,"properties":{"signature_id":{"type":"string","description":"Unique identifier for this SMS signature"},"name":{"type":"string","description":"Signature text shown as the bracketed prefix."},"type":{"enum":["company","app","website","public_account","store","other"],"default":"company","description":"Signature usage scenario required by China vendors."},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"pending","description":"China signatures always start 'pending' review; 'n/a' for non-China."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"proof_url":{"type":["string","null"],"description":"URL of the ownership-proof document submitted to the China vendor."},"vendor_sign_id":{"type":["string","null"],"description":"Vendor-assigned sign id (Tencent SignId / Aliyun SignName) remembered after a real submit."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.signature.get; true when the signature exists. (A missing signature should raise a typed 404 once the SMS_SIGNATURE_NOT_FOUND code lands — see module notes.)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/signature/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/signature/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/signature/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/signature/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/signature/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/signature/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/signature/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/signature/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"sms.signature.delete","module":"sms","namespace":"sms","action":"signature.delete","method":"DELETE","path":"/v1/sms/signature/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a registered SMS signature (China-route vendor pre-config); sends referencing it will be rejected.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SignatureDeleteResult.json","response":{"title":"SignatureDeleteResult","type":"object","description":"Result of deleting an SMS signature.","required":["signature_id","deleted","found"],"additionalProperties":false,"properties":{"signature_id":{"type":["string","null"],"description":"Identifier of the deleted signature"},"deleted":{"type":"boolean","description":"Whether the signature was deleted"},"found":{"type":"boolean","description":"Whether a signature with this id existed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/sms/signature/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/sms/signature/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/sms/signature/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/signature/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/sms/signature/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/signature/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/signature/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/sms/signature/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.signature.get","module":"sms","namespace":"sms","action":"signature.get","method":"GET","path":"/v1/sms/signature/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Retrieve a single SMS signature and its review status.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsSignature.json","response":{"title":"SmsSignature","description":"SMS signature record for China vendors. Returned by sms.signature.create / .get / .list. China vendors require a vendor-reviewed signature that prefixes every message; review_state is polled via sms.signature.get. The signature text is carried in `name` as the bracketed prefix. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["signature_id","name","type","review_state","created_at"],"additionalProperties":false,"properties":{"signature_id":{"type":"string","description":"Unique identifier for this SMS signature"},"name":{"type":"string","description":"Signature text shown as the bracketed prefix."},"type":{"enum":["company","app","website","public_account","store","other"],"default":"company","description":"Signature usage scenario required by China vendors."},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"pending","description":"China signatures always start 'pending' review; 'n/a' for non-China."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"proof_url":{"type":["string","null"],"description":"URL of the ownership-proof document submitted to the China vendor."},"vendor_sign_id":{"type":["string","null"],"description":"Vendor-assigned sign id (Tencent SignId / Aliyun SignName) remembered after a real submit."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.signature.get; true when the signature exists. (A missing signature should raise a typed 404 once the SMS_SIGNATURE_NOT_FOUND code lands — see module notes.)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/signature/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/signature/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/signature/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/signature/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/signature/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/signature/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/signature/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/signature/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.signature.list","module":"sms","namespace":"sms","action":"signature.list","method":"GET","path":"/v1/sms/signature/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List SMS signatures with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsSignatureListResult.json","response":{"title":"SmsSignatureListResult","description":"Paginated list of SMS signatures for infra.sms.signature.list.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SmsSignature","description":"SMS signature record for China vendors. Returned by sms.signature.create / .get / .list. China vendors require a vendor-reviewed signature that prefixes every message; review_state is polled via sms.signature.get. The signature text is carried in `name` as the bracketed prefix. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["signature_id","name","type","review_state","created_at"],"additionalProperties":false,"properties":{"signature_id":{"type":"string","description":"Unique identifier for this SMS signature"},"name":{"type":"string","description":"Signature text shown as the bracketed prefix."},"type":{"enum":["company","app","website","public_account","store","other"],"default":"company","description":"Signature usage scenario required by China vendors."},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"pending","description":"China signatures always start 'pending' review; 'n/a' for non-China."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"proof_url":{"type":["string","null"],"description":"URL of the ownership-proof document submitted to the China vendor."},"vendor_sign_id":{"type":["string","null"],"description":"Vendor-assigned sign id (Tencent SignId / Aliyun SignName) remembered after a real submit."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.signature.get; true when the signature exists. (A missing signature should raise a typed 404 once the SMS_SIGNATURE_NOT_FOUND code lands — see module notes.)"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/signature/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/signature/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/signature/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/signature/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/signature/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/signature/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/signature/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/signature/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/signature/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.status","module":"sms","namespace":"sms","action":"status","method":"GET","path":"/v1/sms/status/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Query the delivery status of an SMS message by ID.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsStatus.json","response":{"title":"SmsStatus","description":"Current status of an SMS message, read back from the edge's per-account sent-message archive (sms.status / sms.list). The archive keys the row by `id`; `status` carries the lifecycle state (mirrors enums/SmsState, plus 'not_found' on a missing-id read). 'attempt'/'state'/'last_event' are vendor-delivery-tracking fields not currently populated by the archive and are optional. See docs/phase2/P2_03_New_Modules.md §1.2.","type":"object","required":["id","status"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Message id (send returns e.g. 'sms_…'); the archive stores it under 'id'."},"status":{"type":"string","description":"Lifecycle state: one of enums/SmsState (queued|sending|sent|delivered|failed|deferred|expired|cancelled|auto_suppressed) or 'not_found' when the id is unknown."},"channel":{"type":["string","null"],"enum":["sms","email",null],"description":"Always 'sms' for this capability."},"account_id":{"type":["string","null"],"description":"Account identifier that owns this resource"},"to":{"description":"Recipient(s) as supplied at send time."},"vendor":{"type":["string","null"],"description":"Vendor that handled the send; null on a not-found read."},"vendor_message_id":{"type":["string","null"],"description":"Message identifier assigned by the upstream vendor"},"created_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"found":{"type":"boolean","description":"true when the id resolved to an archived message; false on a miss. (A miss should raise a typed 404 once SMS_MESSAGE_NOT_FOUND lands — see module notes.)"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","sending","sent","delivered","failed","deferred","expired","cancelled","auto_suppressed"]},"attempt":{"type":["integer","null"],"minimum":0,"description":"Current attempt number (for retries)"},"last_event":{"type":["string","null"],"description":"Description of the most recent event"},"delivered_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the message was delivered"},"failed_reason":{"type":["string","null"],"description":"Reason for failure, if the operation failed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/status/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/status/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/status/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/status/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/status/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/status/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/status/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/status/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.suppression.add","module":"sms","namespace":"sms","action":"suppression.add","method":"POST","path":"/v1/sms/suppression/add","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Add a phone number to the suppression (do-not-contact) list.","request_schema_ref":"sms/SmsSuppressRequest.json","params":{"title":"SmsSuppressRequest","description":"Add a phone number to the suppression list (sms.suppression.add). Mirrors email.suppression.add. Returns the created SuppressionRecord.","type":"object","required":["phone"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone."},"reason":{"enum":["user_request","stop_reply","carrier_block","invalid","manual"],"default":"manual","description":"Reason for the current state or action"},"scope":{"enum":["account"],"default":"account","description":"Scope of applicability for this resource"},"notes":{"type":["string","null"],"description":"Free-text notes about this suppression"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SuppressionRecord.json","response":{"title":"SmsSuppressionRecord","description":"Suppression-list entry for one phone number. Mirrors email SuppressionRecord.","type":"object","required":["phone","reason","added_at","scope","attempt_count_blocked"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone."},"reason":{"enum":["user_request","stop_reply","carrier_block","invalid","manual"],"description":"Reason for the current state or action"},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was added"},"scope":{"enum":["account"],"description":"Scope of applicability for this resource"},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the most recent blocked send attempt, if any."},"attempt_count_blocked":{"type":"integer","minimum":0,"description":"Count of send attempts blocked by this suppression entry so far."},"notes":{"type":["string","null"],"description":"Free-form notes attached when the entry was added."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/suppression/add \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\": \"+15555550100\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/suppression/add\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'phone': '+15555550100'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/add\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"phone\": \"+15555550100\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/suppression/add\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/suppression/add\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"phone\\\": \\\"+15555550100\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/suppression/add\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"phone\\\": \\\"+15555550100\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/suppression/add\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"phone\\\": \\\"+15555550100\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/suppression/add\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"phone\": \"+15555550100\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/suppression/add\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"phone\": \"+15555550100\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"phone":"+15555550100"}}},{"id":"sms.suppression.check","module":"sms","namespace":"sms","action":"suppression.check","method":"POST","path":"/v1/sms/suppression/check","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Check whether a phone number is suppressed before sending.","request_schema_ref":"sms/SmsSuppressionCheckRequest.json","params":{"title":"SmsSuppressionCheckRequest","description":"Look up whether a phone is suppressed (sms.suppression.check). Located by phone+scope, not by record id. Returns SmsSuppressionCheckResult.","type":"object","required":["phone"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone."},"scope":{"enum":["account"],"default":"account","description":"Scope of applicability for this resource"}}},"response_schema_ref":"sms/SmsSuppressionCheckResult.json","response":{"title":"SmsSuppressionCheckResult","description":"Result of sms.suppression.check. When suppressed=true the matching SuppressionRecord fields are flattened alongside 'suppressed' (not nested under a 'record' key); when suppressed=false only 'phone'/'suppressed' are present.","type":"object","required":["phone","suppressed"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone that was checked."},"suppressed":{"type":"boolean","description":"Whether the address is currently suppressed"},"reason":{"enum":["user_request","stop_reply","carrier_block","invalid","manual"],"description":"Suppression reason; present only when suppressed=true"},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the entry was added; present only when suppressed=true"},"scope":{"enum":["account"],"description":"Scope of the matching entry; present only when suppressed=true"},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the most recent blocked send attempt, if any"},"attempt_count_blocked":{"type":"integer","minimum":0,"description":"Count of send attempts blocked by this suppression entry so far; present only when suppressed=true"},"notes":{"type":["string","null"],"description":"Free-form notes attached when the entry was added"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/suppression/check \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\": \"+15555550100\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/suppression/check\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'phone': '+15555550100'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/check\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/check\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"phone\": \"+15555550100\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/suppression/check\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/suppression/check\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"phone\\\": \\\"+15555550100\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/suppression/check\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"phone\\\": \\\"+15555550100\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/suppression/check\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"phone\\\": \\\"+15555550100\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/suppression/check\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"phone\": \"+15555550100\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/suppression/check\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"phone\": \"+15555550100\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"phone":"+15555550100"}}},{"id":"sms.suppression.delete","module":"sms","namespace":"sms","action":"suppression.delete","method":"POST","path":"/v1/sms/suppression/delete","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Remove a number from the suppression list to resume sending.","request_schema_ref":"sms/SmsSuppressionDeleteRequest.json","params":{"title":"SmsSuppressionDeleteRequest","description":"Remove a suppression entry (sms.suppression.delete). Located by phone+scope, not by record id. Returns SmsSuppressionRemoveResult { phone, removed }.","type":"object","required":["phone"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone."},"scope":{"enum":["account"],"default":"account","description":"Scope of applicability for this resource"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsSuppressionRemoveResult.json","response":{"title":"SmsSuppressionRemoveResult","description":"Acknowledgement for sms.suppression.delete / sms.suppression.gdpr_remove. deleted=false when no matching entry existed (idempotent no-op); found mirrors deleted.","type":"object","required":["phone","deleted","found"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone targeted."},"deleted":{"type":"boolean","description":"Whether the resource was successfully removed"},"found":{"type":"boolean","description":"Whether a matching entry existed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/suppression/delete \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"phone\": \"+15555550100\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/suppression/delete\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'phone': '+15555550100'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/delete\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/delete\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"phone\": \"+15555550100\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"phone\": \"+15555550100\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/suppression/delete\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/suppression/delete\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"phone\\\": \\\"+15555550100\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/suppression/delete\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"phone\\\": \\\"+15555550100\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/suppression/delete\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"phone\\\": \\\"+15555550100\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/suppression/delete\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"phone\": \"+15555550100\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/suppression/delete\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"phone\": \"+15555550100\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"phone":"+15555550100"}}},{"id":"sms.suppression.list","module":"sms","namespace":"sms","action":"suppression.list","method":"GET","path":"/v1/sms/suppression/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List suppressed phone numbers with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsSuppressionListResult.json","response":{"title":"SmsSuppressionListResult","description":"Paginated suppression list for infra.sms.suppression.list. SDK-normalized to the sms.list shape (items + next_cursor); count carries the backend's total_count.","type":"object","required":["items","count"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SmsSuppressionRecord","description":"Suppression-list entry for one phone number. Mirrors email SuppressionRecord.","type":"object","required":["phone","reason","added_at","scope","attempt_count_blocked"],"additionalProperties":false,"properties":{"phone":{"type":"string","description":"E.164 phone."},"reason":{"enum":["user_request","stop_reply","carrier_block","invalid","manual"],"description":"Reason for the current state or action"},"added_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was added"},"scope":{"enum":["account"],"description":"Scope of applicability for this resource"},"last_attempt_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp of the most recent blocked send attempt, if any."},"attempt_count_blocked":{"type":"integer","minimum":0,"description":"Count of send attempts blocked by this suppression entry so far."},"notes":{"type":["string","null"],"description":"Free-form notes attached when the entry was added."}}},"description":"Array of result items in this page"},"count":{"type":["integer","null"],"minimum":0,"description":"Total number of items across all pages"},"total_count":{"type":["integer","null"],"minimum":0,"description":"Deprecated alias for 'count'; not emitted by the live handler."},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/suppression/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/suppression/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/suppression/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/suppression/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/suppression/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/suppression/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/suppression/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/suppression/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/suppression/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.template.create","module":"sms","namespace":"sms","action":"template.create","method":"POST","path":"/v1/sms/template/create","idempotent":true,"minimum_tier":"pro","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create a reusable SMS template with named variables.","request_schema_ref":"sms/SmsTemplateCreateRequest.json","params":{"title":"SmsTemplateCreateRequest","description":"Register an SMS template. China vendors (Tencent/Aliyun) require template review before a +86 send can reference it; the server submits it and review_state is polled via sms.template.get. Western vendors store it as a convenience.","type":"object","required":["name","body"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"Human label for the template."},"body":{"type":"string","description":"Template text with {{var}} placeholders. Variable names may contain only letters, digits and underscore, and each variable may appear at most once."},"locale":{"type":"string","default":"en","description":"zh/cn locales trigger China-vendor review."},"variables":{"type":"array","items":{"type":"string"},"description":"Declared placeholder names. If provided, it must exactly match the placeholders in body; final order is inferred from first appearance in body."},"vendor":{"type":["string","null"],"description":"Pin the vendor to register at; otherwise the gateway picks per region."},"message_type":{"type":"string","enum":["otp","notification","marketing"],"default":"otp","description":"Template category. Infrai maps this to the vendor-native template type, e.g. Tencent SmsType: otp=3, notification=2, marketing=1."},"international":{"type":"integer","enum":[0,1],"default":1,"description":"Tencent template region flag: 0 mainland China, 1 international/HK/Macau/Taiwan."}}},"response_schema_ref":"sms/Template.json","response":{"title":"SmsTemplate","description":"SMS template — adds review_state for China vendors. See docs/phase2/P2_03_New_Modules.md §1.2. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["template_id","name","body","locale","created_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","description":"Identifier of the template used for rendering"},"name":{"type":"string","description":"Human-readable name for this resource"},"body":{"type":"string","description":"Plain text body of the message"},"locale":{"type":"string","default":"en","description":"Locale code for the template (e.g. en-US, zh-CN)"},"variables":{"type":"array","items":{"type":"string"},"description":"Template variable definitions"},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"n/a","description":"Required for China vendors; n/a otherwise."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"vendor_template_id":{"type":["string","null"],"description":"Vendor-assigned template id remembered after a real submit (polled by query_review_state)."},"scope":{"enum":["account","platform"],"default":"account","description":"Template visibility: account-private or platform-shared."},"vendor":{"type":["string","null"],"description":"SMS vendor that owns the vendor_template_id."},"message_type":{"enum":["otp","notification","marketing",null],"default":"otp","description":"Template category requested at creation time."},"international":{"type":["integer","null"],"enum":[0,1,null],"description":"Tencent template region flag saved for vendor review polling: 0 mainland China, 1 international/HK/Macau/Taiwan."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.template.get; true when the template exists. (A missing template should raise a typed 404 once the SMS_TEMPLATE_NOT_FOUND code lands — see module notes.)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/template/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\", \"body\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/template/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example', 'body': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"body\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\", \"body\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\", \"body\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/template/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/template/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\", \\\"body\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/template/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\", \\\"body\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/template/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\", \\\"body\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/template/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\", \"body\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/template/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\", \"body\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example","body":"hello"}}},{"id":"sms.template.delete","module":"sms","namespace":"sms","action":"template.delete","method":"DELETE","path":"/v1/sms/template/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a registered SMS message template. Vendor-backed templates are deleted upstream first; sends referencing it will be rejected.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/TemplateDeleteResult.json","response":{"title":"TemplateDeleteResult","type":"object","description":"Result of deleting an SMS template. Vendor-backed templates are removed from the configured SMS vendor before Infrai removes its local record.","required":["template_id","deleted","found","vendor_deleted"],"additionalProperties":false,"properties":{"template_id":{"type":["string","null"],"description":"Identifier of the deleted template"},"deleted":{"type":"boolean","description":"Whether the template was deleted"},"found":{"type":"boolean","description":"Whether a template with this id existed"},"vendor_deleted":{"type":"boolean","description":"Whether a vendor-backed template was successfully deleted upstream before the local record was removed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/sms/template/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/sms/template/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/sms/template/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/template/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/sms/template/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/template/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/template/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/sms/template/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.template.get","module":"sms","namespace":"sms","action":"template.get","method":"GET","path":"/v1/sms/template/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Retrieve a single SMS template.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/Template.json","response":{"title":"SmsTemplate","description":"SMS template — adds review_state for China vendors. See docs/phase2/P2_03_New_Modules.md §1.2. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["template_id","name","body","locale","created_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","description":"Identifier of the template used for rendering"},"name":{"type":"string","description":"Human-readable name for this resource"},"body":{"type":"string","description":"Plain text body of the message"},"locale":{"type":"string","default":"en","description":"Locale code for the template (e.g. en-US, zh-CN)"},"variables":{"type":"array","items":{"type":"string"},"description":"Template variable definitions"},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"n/a","description":"Required for China vendors; n/a otherwise."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"vendor_template_id":{"type":["string","null"],"description":"Vendor-assigned template id remembered after a real submit (polled by query_review_state)."},"scope":{"enum":["account","platform"],"default":"account","description":"Template visibility: account-private or platform-shared."},"vendor":{"type":["string","null"],"description":"SMS vendor that owns the vendor_template_id."},"message_type":{"enum":["otp","notification","marketing",null],"default":"otp","description":"Template category requested at creation time."},"international":{"type":["integer","null"],"enum":[0,1,null],"description":"Tencent template region flag saved for vendor review polling: 0 mainland China, 1 international/HK/Macau/Taiwan."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.template.get; true when the template exists. (A missing template should raise a typed 404 once the SMS_TEMPLATE_NOT_FOUND code lands — see module notes.)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/template/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/template/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/template/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/template/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/template/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/template/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/template/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/template/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.template.list","module":"sms","namespace":"sms","action":"template.list","method":"GET","path":"/v1/sms/template/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List SMS templates with pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"sms/SmsTemplateListResult.json","response":{"title":"SmsTemplateListResult","description":"Paginated list of SMS templates for infra.sms.template.list.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"SmsTemplate","description":"SMS template — adds review_state for China vendors. See docs/phase2/P2_03_New_Modules.md §1.2. Optional fields are omitted by the store's to_dict() when null.","type":"object","required":["template_id","name","body","locale","created_at"],"additionalProperties":false,"properties":{"template_id":{"type":"string","description":"Identifier of the template used for rendering"},"name":{"type":"string","description":"Human-readable name for this resource"},"body":{"type":"string","description":"Plain text body of the message"},"locale":{"type":"string","default":"en","description":"Locale code for the template (e.g. en-US, zh-CN)"},"variables":{"type":"array","items":{"type":"string"},"description":"Template variable definitions"},"review_state":{"enum":["pending","approved","rejected","n/a"],"default":"n/a","description":"Required for China vendors; n/a otherwise."},"review_reason":{"type":["string","null"],"description":"Vendor reviewer note when review_state=rejected."},"vendor_template_id":{"type":["string","null"],"description":"Vendor-assigned template id remembered after a real submit (polled by query_review_state)."},"scope":{"enum":["account","platform"],"default":"account","description":"Template visibility: account-private or platform-shared."},"vendor":{"type":["string","null"],"description":"SMS vendor that owns the vendor_template_id."},"message_type":{"enum":["otp","notification","marketing",null],"default":"otp","description":"Template category requested at creation time."},"international":{"type":["integer","null"],"enum":[0,1,null],"description":"Tencent template region flag saved for vendor review polling: 0 mainland China, 1 international/HK/Macau/Taiwan."},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"updated_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when this resource was last updated"},"found":{"type":"boolean","description":"Present on sms.template.get; true when the template exists. (A missing template should raise a typed 404 once the SMS_TEMPLATE_NOT_FOUND code lands — see module notes.)"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"count":{"type":"integer","minimum":0,"description":"Total number of items across all pages"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/sms/template/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/sms/template/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/template/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/sms/template/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/template/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/sms/template/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/template/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/template/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/sms/template/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"sms.verify","module":"sms","namespace":"sms","action":"verify","method":"POST","path":"/v1/sms/verify","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Verify a user-submitted SMS one-time passcode.","request_schema_ref":"sms/SmsVerifyRequest.json","params":{"title":"SmsVerifyRequest","description":"Request shape for sms.verify — check a one-time code against an issued OTP (local; no vendor). Returns verified + reason.","type":"object","required":["to","code"],"additionalProperties":false,"properties":{"to":{"type":"string","description":"Phone number the OTP was issued to (E.164)."},"phone":{"type":["string","null"],"description":"Legacy alias for to."},"code":{"type":"string","description":"The one-time code to verify."},"otp":{"type":["string","null"],"description":"Legacy alias for code."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"sms/SmsVerifyResult.json","response":{"title":"SmsVerifyResult","type":"object","description":"Result of verifying an SMS OTP code.","required":["verified","reason","to"],"additionalProperties":false,"properties":{"verified":{"type":"boolean","description":"Whether the verification succeeded"},"reason":{"enum":["verified","no_code_issued","expired","too_many_attempts","mismatch"],"description":"Outcome reason: 'verified' on success; otherwise why verification failed"},"to":{"type":"string","description":"Phone number that was checked"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","INVALID_PHONE_NUMBER","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","SMS_CONFIRMATION_REQUIRED","SMS_CONTENT_REJECTED","SMS_INBOUND_NOT_SUPPORTED","SMS_INVALID_RETENTION","SMS_MESSAGE_NOT_FOUND","SMS_NOT_CONFIGURED","SMS_RATE_LIMIT","SMS_SEGMENT_LIMIT_EXCEEDED","SMS_SENDER_NOT_REGISTERED","SMS_SEND_FAILED","SMS_SIGNATURE_NOT_FOUND","SMS_SUPPRESSED_RECIPIENT","SMS_TEMPLATE_NOT_APPROVED","SMS_TEMPLATE_NOT_FOUND","SMS_TEMPLATE_REQUIRED","SMS_VENDOR_DOWN","SMS_VENDOR_UNSUPPORTED_OP","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/sms/verify \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"sample\", \"code\": \"123456\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/sms/verify\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'to': 'sample', 'code': '123456'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\", \"code\": \"123456\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/sms/verify\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"to\": \"sample\", \"code\": \"123456\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"to\": \"sample\", \"code\": \"123456\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/sms/verify\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/sms/verify\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"to\\\": \\\"sample\\\", \\\"code\\\": \\\"123456\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/sms/verify\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"to\\\": \\\"sample\\\", \\\"code\\\": \\\"123456\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/sms/verify\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"to\\\": \\\"sample\\\", \\\"code\\\": \\\"123456\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/sms/verify\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"to\": \"sample\", \"code\": \"123456\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/sms/verify\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"to\": \"sample\", \"code\": \"123456\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"to":"sample","code":"123456"}}},{"id":"storage.bucket.create","module":"storage","namespace":"storage","action":"bucket.create","method":"POST","path":"/v1/storage/bucket/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Create an object storage bucket. Bucket names must be 3-63 lowercase letters, digits, dots, or hyphens and start/end with a letter or digit; `region` must be a canonical region code.","request_schema_ref":"storage/BucketCreateRequest.json","params":{"title":"BucketCreateRequest","description":"Request shape for storage.bucket.create — create an object-storage bucket. Bucket names must be 3-63 lowercase letters, digits, dots, or hyphens and must start/end with a letter or digit. Region must be a canonical region code. Returns the Bucket.","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"Bucket name. Length 3-63; lowercase letters, digits, dots, and hyphens only; must start and end with a letter or digit. Example: demo-files."},"bucket":{"type":["string","null"],"description":"Alias for name. Prefer name in new integrations."},"vendor":{"type":["string","null"],"description":"Pin to a specific storage vendor."},"region":{"type":["string","null"],"enum":["us-east-1","us-west-2","eu-west-1","eu-central-1","ap-southeast-1","ap-northeast-1","cn-hangzhou","cn-beijing","auto","ap-singapore","ap-hongkong","ap-tokyo","ap-bangkok","na-siliconvalley",null],"description":"Optional storage region code. Pass a canonical code such as cn-beijing for Beijing or ap-singapore for Singapore; localized city names are rejected."},"acl":{"type":"string","default":"private","description":"Bucket access control. Defaults to private; currently only private and signed-only are supported. public and public-read are not supported."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/Bucket.json","response":{"title":"Bucket","description":"A storage bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","name","vendor","acl","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"description":"Vendor that handled or will handle this request","type":"string","enum":["r2","s3","oss","cos"]},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"acl":{"description":"Access control list for the bucket or object","type":"string","enum":["private","signed-only"]},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"cors_rules":{"type":"array","items":{"type":"object"},"description":"CORS configuration rules for the bucket"},"lifecycle_rules":{"type":"array","items":{"title":"LifecycleRule","description":"Lifecycle rule for a storage bucket. Rules match object keys by prefix. expire_days is the retention window in days and must be at least 1 when provided. Vendor-translated.","type":"object","required":["prefix"],"additionalProperties":false,"properties":{"prefix":{"type":"string","description":"Match objects whose key starts with this.","example":"tmp/"},"expire_days":{"type":["integer","null"],"minimum":1,"description":"Auto-delete matched objects after N days. Minimum is 1 day.","example":1},"transition_class":{"type":["string","null"],"description":"Transition matched objects to a colder storage class when supported by the backend (e.g. \"glacier\")."}}},"description":"Lifecycle management rules for the bucket"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/bucket/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"example\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/bucket/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'name': 'example'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"name\": \"example\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"name\": \"example\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/bucket/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\": \\\"example\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/bucket/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"name\\\": \\\"example\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"name\\\": \\\"example\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"name\": \"example\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/bucket/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"name\": \"example\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"name":"example"}}},{"id":"storage.bucket.delete","module":"storage","namespace":"storage","action":"bucket.delete","method":"DELETE","path":"/v1/storage/bucket/delete/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete an object storage bucket (idempotent). Empty buckets can be deleted directly; non-empty buckets require `force=true`, otherwise the API returns STORAGE_DELETE_NOT_FORCED.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/BucketDeleteResult.json","response":{"title":"BucketDeleteResult","description":"Result of storage.bucket.delete (DELETE /v1/storage/buckets/{bucket}). Empty buckets can be deleted directly. If the bucket still contains objects, pass force=true to delete the bucket together with its objects; otherwise the API returns STORAGE_DELETE_NOT_FORCED. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["deleted"],"additionalProperties":false,"properties":{"deleted":{"type":"boolean","description":"Whether the resource was successfully deleted"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/storage/bucket/delete/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/storage/bucket/delete/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.bucket.get","module":"storage","namespace":"storage","action":"bucket.get","method":"GET","path":"/v1/storage/bucket/get/{bucket}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Retrieve a bucket's metadata (provider, region, ACL, CORS, and lifecycle rules).","request_schema_ref":null,"params":{},"response_schema_ref":"storage/Bucket.json","response":{"title":"Bucket","description":"A storage bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","name","vendor","acl","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"description":"Vendor that handled or will handle this request","type":"string","enum":["r2","s3","oss","cos"]},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"acl":{"description":"Access control list for the bucket or object","type":"string","enum":["private","signed-only"]},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"cors_rules":{"type":"array","items":{"type":"object"},"description":"CORS configuration rules for the bucket"},"lifecycle_rules":{"type":"array","items":{"title":"LifecycleRule","description":"Lifecycle rule for a storage bucket. Rules match object keys by prefix. expire_days is the retention window in days and must be at least 1 when provided. Vendor-translated.","type":"object","required":["prefix"],"additionalProperties":false,"properties":{"prefix":{"type":"string","description":"Match objects whose key starts with this.","example":"tmp/"},"expire_days":{"type":["integer","null"],"minimum":1,"description":"Auto-delete matched objects after N days. Minimum is 1 day.","example":1},"transition_class":{"type":["string","null"],"description":"Transition matched objects to a colder storage class when supported by the backend (e.g. \"glacier\")."}}},"description":"Lifecycle management rules for the bucket"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/bucket/get/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/bucket/get/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.bucket.list","module":"storage","namespace":"storage","action":"bucket.list","method":"GET","path":"/v1/storage/bucket/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List the account's object storage buckets.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/BucketListResult.json","response":{"title":"BucketListResult","description":"Paginated list of Bucket rows.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"Bucket","description":"A storage bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","name","vendor","acl","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"description":"Vendor that handled or will handle this request","type":"string","enum":["r2","s3","oss","cos"]},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"acl":{"description":"Access control list for the bucket or object","type":"string","enum":["private","signed-only"]},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"cors_rules":{"type":"array","items":{"type":"object"},"description":"CORS configuration rules for the bucket"},"lifecycle_rules":{"type":"array","items":{"title":"LifecycleRule","description":"Lifecycle rule for a storage bucket. Rules match object keys by prefix. expire_days is the retention window in days and must be at least 1 when provided. Vendor-translated.","type":"object","required":["prefix"],"additionalProperties":false,"properties":{"prefix":{"type":"string","description":"Match objects whose key starts with this.","example":"tmp/"},"expire_days":{"type":["integer","null"],"minimum":1,"description":"Auto-delete matched objects after N days. Minimum is 1 day.","example":1},"transition_class":{"type":["string","null"],"description":"Transition matched objects to a colder storage class when supported by the backend (e.g. \"glacier\")."}}},"description":"Lifecycle management rules for the bucket"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/bucket/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/bucket/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/bucket/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/bucket/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/bucket/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.bucket.notification.delete","module":"storage","namespace":"storage","action":"bucket.notification.delete","method":"DELETE","path":"/v1/storage/bucket/notification/delete/{bucket}/{subscription_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete an event notification subscription from a storage bucket.","request_schema_ref":null,"params":{},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/storage/bucket/notification/delete/BUCKET/SUBSCRIPTION_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.bucket.notifications","module":"storage","namespace":"storage","action":"bucket.notifications","method":"GET","path":"/v1/storage/bucket/notifications/{bucket}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List event notification subscriptions for a storage bucket.","request_schema_ref":null,"params":{},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/bucket/notifications/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.bucket.set_cors","module":"storage","namespace":"storage","action":"bucket.set_cors","method":"POST","path":"/v1/storage/bucket/set_cors/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Set browser CORS rules for a storage bucket.","request_schema_ref":"storage/BucketSetCorsRequest.json","params":{"title":"BucketSetCorsRequest","description":"Replace the browser CORS rules for a storage bucket. The bucket identifier is supplied as a path parameter.","type":"object","required":["rules"],"additionalProperties":false,"properties":{"rules":{"type":"array","items":{"title":"CorsRule","description":"One CORS rule for a storage bucket (browser direct-upload prerequisite). Vendor-translated. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["allowed_origins","allowed_methods"],"additionalProperties":false,"properties":{"allowed_origins":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Origins permitted (e.g. \"https://app.example.com\" or \"*\")."},"allowed_methods":{"type":"array","items":{"enum":["GET","PUT","POST","DELETE","HEAD"]},"minItems":1,"description":"Allowed HTTP methods for CORS"},"allowed_headers":{"type":["array","null"],"items":{"type":"string"},"description":"Allowed HTTP headers for CORS"},"expose_headers":{"type":["array","null"],"items":{"type":"string"},"description":"Headers exposed to the client for CORS"},"max_age_seconds":{"type":["integer","null"],"minimum":0,"description":"Maximum cache duration for CORS preflight in seconds"}}},"description":"Complete replacement CORS rule set. An empty array clears CORS configuration."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":null,"response":{},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'rules': [{'allowed_origins': ['sample'], 'allowed_methods': ['GET']}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"rules\\\": [{\\\"allowed_origins\\\": [\\\"sample\\\"], \\\"allowed_methods\\\": [\\\"GET\\\"]}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"rules\\\": [{\\\"allowed_origins\\\": [\\\"sample\\\"], \\\"allowed_methods\\\": [\\\"GET\\\"]}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"rules\\\": [{\\\"allowed_origins\\\": [\\\"sample\\\"], \\\"allowed_methods\\\": [\\\"GET\\\"]}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/bucket/set_cors/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"rules\": [{\"allowed_origins\": [\"sample\"], \"allowed_methods\": [\"GET\"]}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"rules":[{"allowed_origins":["sample"],"allowed_methods":["GET"]}]}}},{"id":"storage.bucket.set_lifecycle","module":"storage","namespace":"storage","action":"bucket.set_lifecycle","method":"POST","path":"/v1/storage/bucket/set_lifecycle/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Set bucket lifecycle rules by key prefix; expire_days is measured in days and must be at least 1.","request_schema_ref":"storage/BucketSetLifecycleRequest.json","params":{"title":"BucketSetLifecycleRequest","description":"Set lifecycle rules on a bucket for storage.bucket.set_lifecycle (POST /v1/storage/buckets/{bucket}/lifecycle). A rule matches objects by key prefix, can expire matched objects after expire_days (minimum 1 day), and may request a colder storage transition. The submitted rules replace the bucket's existing lifecycle rule set. Returns the updated Bucket. bucket is a path param.","type":"object","required":["rules"],"additionalProperties":false,"properties":{"rules":{"type":"array","items":{"title":"LifecycleRule","description":"Lifecycle rule for a storage bucket. Rules match object keys by prefix. expire_days is the retention window in days and must be at least 1 when provided. Vendor-translated.","type":"object","required":["prefix"],"additionalProperties":false,"properties":{"prefix":{"type":"string","description":"Match objects whose key starts with this.","example":"tmp/"},"expire_days":{"type":["integer","null"],"minimum":1,"description":"Auto-delete matched objects after N days. Minimum is 1 day.","example":1},"transition_class":{"type":["string","null"],"description":"Transition matched objects to a colder storage class when supported by the backend (e.g. \"glacier\")."}}},"description":"Lifecycle rule set governing object expiration/transition. Each rule supports prefix, expire_days, and transition_class. The whole list replaces the existing rule set.","example":[{"prefix":"tmp/","expire_days":1}]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/Bucket.json","response":{"title":"Bucket","description":"A storage bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","name","vendor","acl","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"name":{"type":"string","description":"Human-readable name for this resource"},"vendor":{"description":"Vendor that handled or will handle this request","type":"string","enum":["r2","s3","oss","cos"]},"region":{"type":["string","null"],"description":"Geographic region where this resource is located or processed"},"acl":{"description":"Access control list for the bucket or object","type":"string","enum":["private","signed-only"]},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"cors_rules":{"type":"array","items":{"type":"object"},"description":"CORS configuration rules for the bucket"},"lifecycle_rules":{"type":"array","items":{"title":"LifecycleRule","description":"Lifecycle rule for a storage bucket. Rules match object keys by prefix. expire_days is the retention window in days and must be at least 1 when provided. Vendor-translated.","type":"object","required":["prefix"],"additionalProperties":false,"properties":{"prefix":{"type":"string","description":"Match objects whose key starts with this.","example":"tmp/"},"expire_days":{"type":["integer","null"],"minimum":1,"description":"Auto-delete matched objects after N days. Minimum is 1 day.","example":1},"transition_class":{"type":["string","null"],"description":"Transition matched objects to a colder storage class when supported by the backend (e.g. \"glacier\")."}}},"description":"Lifecycle management rules for the bucket"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'rules': [{'prefix': 'tmp/', 'expire_days': 1}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"rules\\\": [{\\\"prefix\\\": \\\"tmp/\\\", \\\"expire_days\\\": 1}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"rules\\\": [{\\\"prefix\\\": \\\"tmp/\\\", \\\"expire_days\\\": 1}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"rules\\\": [{\\\"prefix\\\": \\\"tmp/\\\", \\\"expire_days\\\": 1}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/bucket/set_lifecycle/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"rules\": [{\"prefix\": \"tmp/\", \"expire_days\": 1}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"rules":[{"prefix":"tmp/","expire_days":1}]}}},{"id":"storage.bucket.set_notification","module":"storage","namespace":"storage","action":"bucket.set_notification","method":"POST","path":"/v1/storage/bucket/set_notification/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Subscribe storage object events to a callback URL; Infrai sends JSON POST notifications with X-Infrai-Event.","request_schema_ref":"storage/BucketSetNotificationRequest.json","params":{"title":"BucketSetNotificationRequest","description":"Subscribe storage object events to a callback URL for storage.bucket.set_notification (POST /v1/storage/buckets/{bucket}/notification). Pass target.url as a public HTTPS endpoint. When a subscribed event fires, Infrai sends a JSON POST with X-Infrai-Event and event/type fields. Returns BucketSetNotificationResult. bucket is a path param.","type":"object","required":["events","target"],"additionalProperties":false,"properties":{"events":{"type":"array","items":{"type":"string","enum":["object.created","object.deleted","multipart.completed"],"description":"Webhook event names emitted by infra.storage."},"minItems":1,"description":"Event types that trigger a notification. Supported values are object.created, object.deleted, and multipart.completed.","example":["object.created","object.deleted","multipart.completed"]},"target":{"type":"object","additionalProperties":false,"oneOf":[{"required":["webhook_id"]},{"required":["url"]}],"properties":{"webhook_id":{"type":"string","description":"Advanced webhook handle for account webhook integration."},"url":{"type":"string","format":"uri","description":"Public HTTPS callback URL that receives JSON POST notifications."}},"description":"Notification callback target. For public API usage, pass target.url.","example":{"url":"https://example.com/storage-events"}},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/BucketSetNotificationResult.json","response":{"title":"BucketSetNotificationResult","description":"Result of storage.bucket.set_notification: the created event subscription handle. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["subscription_id"],"additionalProperties":false,"properties":{"subscription_id":{"type":"string","description":"Unique identifier for this subscription"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'events': ['object.created', 'object.deleted', 'multipart.completed'], 'target': {'url': 'https://example.com/storage-events'}},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"events\\\": [\\\"object.created\\\", \\\"object.deleted\\\", \\\"multipart.completed\\\"], \\\"target\\\": {\\\"url\\\": \\\"https://example.com/storage-events\\\"}}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"events\\\": [\\\"object.created\\\", \\\"object.deleted\\\", \\\"multipart.completed\\\"], \\\"target\\\": {\\\"url\\\": \\\"https://example.com/storage-events\\\"}}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"events\\\": [\\\"object.created\\\", \\\"object.deleted\\\", \\\"multipart.completed\\\"], \\\"target\\\": {\\\"url\\\": \\\"https://example.com/storage-events\\\"}}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/bucket/set_notification/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"events\": [\"object.created\", \"object.deleted\", \"multipart.completed\"], \"target\": {\"url\": \"https://example.com/storage-events\"}}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"events":["object.created","object.deleted","multipart.completed"],"target":{"url":"https://example.com/storage-events"}}}},{"id":"storage.bucket.usage","module":"storage","namespace":"storage","action":"bucket.usage","method":"GET","path":"/v1/storage/bucket/usage/{bucket}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Query a bucket's usage statistics: object count, bytes stored, and measurement timestamp.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/BucketUsageResult.json","response":{"title":"BucketUsageResult","description":"Bucket-level byte / object counts for storage.bucket.usage (GET /v1/storage/buckets/{bucket}/usage), for quota and billing display. May be aggregated from list or vendor metrics. bucket is a path param. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["byte_count","object_count","as_of"],"additionalProperties":false,"properties":{"byte_count":{"type":"integer","minimum":0,"description":"Total bytes stored in the bucket"},"object_count":{"type":"integer","minimum":0,"description":"Number of objects in the bucket"},"as_of":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the usage was measured"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/bucket/usage/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/bucket/usage/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.multipart.abort","module":"storage","namespace":"storage","action":"multipart.abort","method":"DELETE","path":"/v1/storage/multipart/abort/{upload_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Abort a multipart upload and invalidate the upload_id.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/MultipartAbortResult.json","response":{"title":"MultipartAbortResult","description":"Result of storage.multipart.abort: releases an incomplete upload. After a successful abort, the upload_id is invalid and later presign_part/complete calls return STORAGE_MULTIPART_INCONSISTENT.","type":"object","required":["aborted"],"additionalProperties":false,"properties":{"aborted":{"type":"boolean","description":"Whether the multipart upload was successfully aborted. A successful abort invalidates the upload_id."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/storage/multipart/abort/UPLOAD_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.multipart.complete","module":"storage","namespace":"storage","action":"multipart.complete","method":"POST","path":"/v1/storage/multipart/complete/{upload_id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Complete a multipart upload, assembling parts into the final StorageObject.","request_schema_ref":"storage/MultipartCompleteRequest.json","params":{"title":"MultipartCompleteRequest","description":"Finalize a multipart upload for storage.multipart.complete (POST /v1/storage/multipart/{upload_id}/complete). Returns StorageObject. upload_id is a path param. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["parts"],"additionalProperties":false,"properties":{"parts":{"type":"array","items":{"title":"MultipartPart","description":"One part of a multipart upload.","type":"object","required":["part_number","etag"],"additionalProperties":false,"properties":{"part_number":{"type":"integer","minimum":1,"maximum":10000,"description":"Part number in the multipart upload"},"etag":{"type":"string","description":"ETag hash of the object content"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"}}},"minItems":1,"maxItems":10000,"description":"Uploaded parts (part number + ETag) to assemble into the final object, in order."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/StorageObject.json","response":{"title":"StorageObject","description":"An object inside a bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","key","size_bytes","etag","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":"string","description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'parts': [{'part_number': 1, 'etag': 'sample'}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"parts\\\": [{\\\"part_number\\\": 1, \\\"etag\\\": \\\"sample\\\"}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"parts\\\": [{\\\"part_number\\\": 1, \\\"etag\\\": \\\"sample\\\"}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"parts\\\": [{\\\"part_number\\\": 1, \\\"etag\\\": \\\"sample\\\"}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/multipart/complete/UPLOAD_ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"parts\": [{\"part_number\": 1, \"etag\": \"sample\"}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"parts":[{"part_number":1,"etag":"sample"}]}}},{"id":"storage.multipart.create","module":"storage","namespace":"storage","action":"multipart.create","method":"POST","path":"/v1/storage/multipart/create/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Initiate a multipart upload, returning an upload_id and part size/count limits.","request_schema_ref":"storage/MultipartCreateRequest.json","params":{"title":"MultipartCreateRequest","description":"Start a multipart upload for storage.multipart.create (POST /v1/storage/buckets/{bucket}/multipart). Returns MultipartUpload. bucket is a path param. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["key"],"additionalProperties":false,"properties":{"key":{"type":"string","description":"Destination object key (path) for the multipart upload."},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/MultipartUpload.json","response":{"title":"MultipartUpload","description":"Active multipart upload handle.","type":"object","required":["upload_id","bucket_id","key","started_at"],"additionalProperties":false,"properties":{"upload_id":{"type":"string","description":"Unique identifier for this multipart upload"},"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"started_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when execution started"},"part_size_min":{"type":["integer","null"],"minimum":5242880,"description":"Vendor minimum part size (≥5 MiB for S3)."},"part_count_max":{"type":["integer","null"],"minimum":1,"maximum":10000,"description":"Maximum number of parts allowed"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/multipart/create/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'key': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"key\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"key\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"key\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"key\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"key\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"key\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/multipart/create/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"key\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"key":"sample"}}},{"id":"storage.multipart.presign_part","module":"storage","namespace":"storage","action":"multipart.presign_part","method":"POST","path":"/v1/storage/multipart/presign_part/{upload_id}/{part_number}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Generate a presigned upload URL for a single part; upload the part binary with the returned method.","request_schema_ref":"storage/MultipartPresignPartRequest.json","params":{"title":"MultipartPresignPartRequest","description":"Request shape for storage.multipart.presign_part — mint a presigned URL for uploading one part of an in-progress multipart upload. Upload the part binary with the returned method and use the returned ETag in multipart.complete.","type":"object","required":["upload_id","part_number"],"additionalProperties":false,"properties":{"upload_id":{"type":"string","description":"Id of the multipart upload."},"part_number":{"type":"integer","minimum":1,"description":"1-based index of the part being uploaded. Except for the final part, S3-compatible multipart uploads usually require each part to be at least 5 MiB."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/MultipartPresignPartResult.json","response":{"title":"MultipartPresignPartResult","description":"Presigned URL for a single multipart upload part. Upload the part binary with the returned method, then pass the upload response ETag with the part_number to multipart.complete.","type":"object","required":["url","method","expires_at"],"additionalProperties":false,"properties":{"url":{"type":"string","description":"URL for this resource or endpoint"},"method":{"enum":["PUT"],"description":"HTTP method to use for the part upload, currently PUT."},"headers":{"type":["object","null"],"description":"Additional headers to include when uploading this part, if any."},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"upload_id\": \"sample\", \"part_number\": 1}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'upload_id': 'sample', 'part_number': 1},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"upload_id\": \"sample\", \"part_number\": 1}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"upload_id\": \"sample\", \"part_number\": 1}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"upload_id\": \"sample\", \"part_number\": 1}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"upload_id\": \"sample\", \"part_number\": 1}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/multipart/presign_part/UPLOAD_ID/PART_NUMBER\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"upload_id\": \"sample\", \"part_number\": 1}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"upload_id":"sample","part_number":1}}},{"id":"storage.multipart.upload_part","module":"storage","namespace":"storage","action":"multipart.upload_part","method":"PUT","path":"/v1/storage/multipart/upload_part/{upload_id}/{part_number}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Upload the bytes of a single part, returning that part's etag.","request_schema_ref":"storage/MultipartUploadPartRequest.json","params":{"title":"MultipartUploadPartRequest","description":"Request shape for storage.multipart.upload_part — upload one part of an in-progress multipart upload. The bytes travel base64-encoded in the JSON envelope. Returns part_number + etag + size_bytes.","type":"object","required":["upload_id","part_number","data_base64"],"additionalProperties":false,"properties":{"upload_id":{"type":"string","description":"Id of the multipart upload."},"part_number":{"type":"integer","minimum":1,"description":"1-based index of this part."},"data_base64":{"type":"string","description":"Base64-encoded part bytes (the part payload — required). Aliases data/file_base64 are also accepted by the server."},"data":{"type":["string","null"],"description":"Base64-encoded part bytes (alias of data_base64/file_base64)."},"file_base64":{"type":["string","null"],"description":"Base64-encoded part bytes (alias)."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/MultipartPart.json","response":{"title":"MultipartPart","description":"One part of a multipart upload.","type":"object","required":["part_number","etag"],"additionalProperties":false,"properties":{"part_number":{"type":"integer","minimum":1,"maximum":10000,"description":"Part number in the multipart upload"},"etag":{"type":"string","description":"ETag hash of the object content"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'upload_id': 'sample', 'part_number': 1, 'data_base64': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1, \\\"data_base64\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1, \\\"data_base64\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"upload_id\\\": \\\"sample\\\", \\\"part_number\\\": 1, \\\"data_base64\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/storage/multipart/upload_part/UPLOAD_ID/PART_NUMBER\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"upload_id\": \"sample\", \"part_number\": 1, \"data_base64\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"upload_id":"sample","part_number":1,"data_base64":"sample"}}},{"id":"storage.object.copy","module":"storage","namespace":"storage","action":"object.copy","method":"POST","path":"/v1/storage/object/copy","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Copy an object within or across buckets, preserving content_type and metadata.","request_schema_ref":"storage/ObjectCopyRequest.json","params":{"title":"ObjectCopyRequest","description":"Copy an object same-bucket / cross-bucket / cross-vendor for storage.object.copy (POST /v1/storage/objects/copy). Cross-vendor copies are bridged server-side via read-then-write; a missing dst bucket returns honest not-found. Returns StorageObject. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["src_bucket","src_key","dst_bucket","dst_key"],"additionalProperties":false,"properties":{"src_bucket":{"type":"string","description":"Source bucket to copy from."},"src_key":{"type":"string","description":"Source object key (path) to copy from."},"dst_bucket":{"type":"string","description":"Destination bucket to copy into."},"dst_key":{"type":"string","description":"Destination object key (path) to write."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/StorageObject.json","response":{"title":"StorageObject","description":"An object inside a bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","key","size_bytes","etag","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":"string","description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/object/copy \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/object/copy\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'src_bucket': 'sample', 'src_key': 'sample', 'dst_bucket': 'sample', 'dst_key': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/copy\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/copy\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/object/copy\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/copy\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"src_bucket\\\": \\\"sample\\\", \\\"src_key\\\": \\\"sample\\\", \\\"dst_bucket\\\": \\\"sample\\\", \\\"dst_key\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/object/copy\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"src_bucket\\\": \\\"sample\\\", \\\"src_key\\\": \\\"sample\\\", \\\"dst_bucket\\\": \\\"sample\\\", \\\"dst_key\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/copy\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"src_bucket\\\": \\\"sample\\\", \\\"src_key\\\": \\\"sample\\\", \\\"dst_bucket\\\": \\\"sample\\\", \\\"dst_key\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/copy\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/object/copy\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"src_bucket\": \"sample\", \"src_key\": \"sample\", \"dst_bucket\": \"sample\", \"dst_key\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"src_bucket":"sample","src_key":"sample","dst_bucket":"sample","dst_key":"sample"}}},{"id":"storage.object.delete","module":"storage","namespace":"storage","action":"object.delete","method":"DELETE","path":"/v1/storage/object/delete/{bucket}/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a storage object (idempotent).","request_schema_ref":null,"params":{},"response_schema_ref":"storage/ObjectDeleteResult.json","response":{"title":"ObjectDeleteResult","type":"object","description":"Result of deleting a storage object.","required":["bucket","key","deleted"],"additionalProperties":false,"properties":{"bucket":{"type":"string","description":"Bucket the object was deleted from"},"key":{"type":"string","description":"Key of the deleted object"},"deleted":{"type":"boolean","description":"Whether the object existed and was deleted"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/storage/object/delete/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.object.delete_batch","module":"storage","namespace":"storage","action":"object.delete_batch","method":"POST","path":"/v1/storage/object/delete_batch/{bucket}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete up to 1000 objects in one call, returning deleted keys plus per-key errors.","request_schema_ref":"storage/ObjectDeleteBatchRequest.json","params":{"title":"ObjectDeleteBatchRequest","description":"Batch-delete up to 1000 objects for storage.object.delete_batch (POST /v1/storage/object/delete_batch/{bucket}). Returns deleted keys plus per-key errors; missing keys are reported as STORAGE_OBJECT_NOT_FOUND. bucket is a path param.","type":"object","required":["keys"],"additionalProperties":false,"properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1000,"description":"Object keys to delete in one batch. Missing keys are returned in errors with code STORAGE_OBJECT_NOT_FOUND."},"idempotency_key":{"type":["string","null"],"description":"Optional; SDK auto-derives from the content_hash of the key set when omitted."}}},"response_schema_ref":"storage/ObjectDeleteBatchResult.json","response":{"title":"ObjectDeleteBatchResult","description":"Partial-success result of storage.object.delete_batch: keys deleted plus per-key errors. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["deleted","errors"],"additionalProperties":false,"properties":{"deleted":{"type":"array","items":{"type":"string"},"description":"Keys successfully deleted."},"errors":{"type":"array","items":{"type":"object","required":["key","code"],"additionalProperties":false,"properties":{"key":{"type":"string"},"code":{"type":"string","description":"Error code from errors/registry.yaml."}}},"description":"Array of per-item errors (for batch operations)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"keys\": [\"sample\"]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'keys': ['sample']},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"keys\": [\"sample\"]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"keys\": [\"sample\"]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"keys\": [\"sample\"]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"keys\\\": [\\\"sample\\\"]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"keys\\\": [\\\"sample\\\"]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"keys\\\": [\\\"sample\\\"]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"keys\": [\"sample\"]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/object/delete_batch/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"keys\": [\"sample\"]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"keys":["sample"]}}},{"id":"storage.object.get","module":"storage","namespace":"storage","action":"object.get","method":"GET","path":"/v1/storage/object/get/{bucket}/{key}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Download an object's contents as JSON metadata plus base64-encoded data_base64.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/PresignedDownload.json","response":{"title":"PresignedDownload","description":"Presigned URL artifact for client-side download.","type":"object","required":["found","status","key"],"additionalProperties":false,"properties":{"found":{"type":"boolean","description":"Whether the object was found"},"status":{"type":"string","description":"\"found\" or \"not_found\""},"key":{"type":"string","description":"Key of the requested object"},"size_bytes":{"type":"integer","description":"Size of the object in bytes (present only when found)"},"data_base64":{"type":"string","description":"Base64-encoded object content (present only when found)"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/object/get/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.object.head","module":"storage","namespace":"storage","action":"object.head","method":"GET","path":"/v1/storage/object/head/{bucket}/{key}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Fetch an object's existence and metadata (size, etag, content_type, metadata) without the body.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/ObjectHeadResult.json","response":{"title":"ObjectHeadResult","description":"Result of storage.object.head (GET /v1/storage/buckets/{bucket}/objects/{key}/head). Returns object metadata when found; an honest {found:false,status:\"not_found\"} (HTTP 200) when absent, so existence probing does not throw 404. See docs/SDK_API_PM_REVIEW.md §Storage.","type":"object","required":["found"],"additionalProperties":false,"properties":{"found":{"type":"boolean","description":"Whether the resource was found"},"status":{"enum":["found","not_found"],"description":"Current status of this resource"},"key":{"type":["string","null"],"description":"Unique identifier key for this resource"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":["string","null"],"description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/object/head/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.object.list","module":"storage","namespace":"storage","action":"object.list","method":"GET","path":"/v1/storage/object/list/{bucket}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"List objects in a bucket, supporting prefix, delimiter, and cursor pagination.","request_schema_ref":null,"params":{},"response_schema_ref":"storage/ObjectListResult.json","response":{"title":"ObjectListResult","description":"Paginated list of StorageObject rows.","type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"title":"StorageObject","description":"An object inside a bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","key","size_bytes","etag","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":"string","description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"description":"Array of result items in this page"},"next_cursor":{"type":["string","null"],"description":"Opaque cursor to fetch the next page; null/absent if this is the last page"},"common_prefixes":{"type":["array","null"],"items":{"type":"string"},"description":"S3-style folder prefixes when a delimiter was supplied to object.list."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/storage/object/list/BUCKET \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/storage/object/list/BUCKET\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/list/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/list/BUCKET\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/storage/object/list/BUCKET\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/list/BUCKET\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/storage/object/list/BUCKET\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/list/BUCKET\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/list/BUCKET\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/storage/object/list/BUCKET\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"storage.object.presign","module":"storage","namespace":"storage","action":"object.presign","method":"POST","path":"/v1/storage/object/presign/{bucket}/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Generate a presigned URL for direct client upload or download of an object (idempotent). For `op=put`, use the returned URL with its returned method (usually PUT) to upload raw binary bytes directly; do not send the Infrai API key to the presigned URL.","request_schema_ref":"storage/ObjectPresignRequest.json","params":{"title":"ObjectPresignRequest","description":"Generate a presigned upload/download URL for storage.object.presign (POST /v1/storage/buckets/{bucket}/objects/{key}/presign). op selects direction. For op=put, call this API first, then send the file's raw binary bytes to the returned url using the returned method (usually PUT) and any returned headers; do not include the Infrai Authorization header on the presigned URL request. expires_seconds is the canonical outward TTL (edge stays compatible with legacy ttl_seconds). bucket and key are path params. See docs/SDK_API_PM_REVIEW.md §Storage (MODIFY).","type":"object","required":["op"],"additionalProperties":false,"properties":{"op":{"enum":["get","put"],"example":"put","description":"Operation type: get creates a download URL; put creates an upload URL for direct binary upload."},"expires_seconds":{"type":["integer","null"],"minimum":1,"description":"TTL of the presigned URL (defaults: get=3600, put=300)."},"content_type":{"type":["string","null"],"description":"For op=put: constrain the upload content type."},"max_bytes":{"type":["integer","null"],"minimum":0,"description":"For op=put: cap the upload size."},"response_disposition":{"type":["string","null"],"description":"For op=get: Content-Disposition for the download filename."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/PresignedUpload.json","response":{"title":"PresignedUpload","description":"Presigned URL artifact for client-side upload.","type":"object","required":["url","method","expires_at"],"additionalProperties":false,"properties":{"url":{"type":"string","description":"URL for this resource or endpoint"},"method":{"enum":["PUT","POST"],"description":"Authentication method used (e.g. email_otp, oauth, password)"},"headers":{"type":["object","null"],"description":"Custom HTTP headers to include in requests or responses"},"fields":{"type":["object","null"],"description":"For POST form uploads."},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"max_bytes":{"type":["integer","null"],"minimum":0,"description":"Maximum allowed file size in bytes"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"op\": \"put\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'op': 'put'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"op\": \"put\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"op\": \"put\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"op\": \"put\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"op\\\": \\\"put\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"op\\\": \\\"put\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"op\\\": \\\"put\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"op\": \"put\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/object/presign/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"op\": \"put\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"op":"put"}}},{"id":"storage.object.put","module":"storage","namespace":"storage","action":"object.put","method":"PUT","path":"/v1/storage/object/put/{bucket}/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Upload an object server-side with JSON `data_base64`. Base64 upload is intended for small files and is not recommended above 1 MB; use presigned or multipart direct upload for larger files.","request_schema_ref":"storage/ObjectPutRequest.json","params":{"title":"ObjectPutRequest","description":"Server-side direct write for storage.object.put (PUT /v1/storage/object/put/{bucket}/{key}). The object bytes travel base64-encoded in the JSON data_base64 field (aliases: data / file_base64). Base64 upload is intended for small files and is not recommended above 1 MB; use object.presign or multipart.presign_part for larger files. Persistent storage writes cannot be paid by trial-only credit; if the response is 402 INSUFFICIENT_CREDIT with code_detail=trial_restricted, add paid balance and retry.","type":"object","additionalProperties":false,"required":["data_base64"],"properties":{"data_base64":{"type":"string","description":"REQUIRED. The object bytes, base64-encoded as a bare base64 string or data: URL. Intended for small files; not recommended above 1 MB."},"data":{"type":["string","null"],"description":"Alias for data_base64 (base64-encoded object bytes)."},"file_base64":{"type":["string","null"],"description":"Alias for data_base64 (base64-encoded object bytes)."},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary user metadata key/value pairs."},"cache_control":{"type":["string","null"],"description":"Cache-Control header value"},"storage_class":{"type":["string","null"],"default":"standard","description":"Storage class (e.g. standard, infrequent_access)"},"idempotency_key":{"type":["string","null"],"description":"Optional; SDK auto-derives a content-hash key (bucket_id+key+content) when omitted."}}},"response_schema_ref":"storage/StorageObject.json","response":{"title":"StorageObject","description":"An object inside a bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","key","size_bytes","etag","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":"string","description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X PUT https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"data_base64\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.put(\n    \"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'data_base64': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"data_base64\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\",\n  {\n    method: \"PUT\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"data_base64\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"data_base64\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"data_base64\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"PUT\"), \"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"data_base64\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"data_base64\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Put.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"data_base64\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .put(\"https://api.infrai.cc/v1/storage/object/put/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"data_base64\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"data_base64":"sample"}}},{"id":"storage.object.set_acl","module":"storage","namespace":"storage","action":"object.set_acl","method":"POST","path":"/v1/storage/object/set_acl/{bucket}/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Set object access policy. Current supported ACL values are private and signed-only; public/public-read are not supported.","request_schema_ref":"storage/ObjectSetAclRequest.json","params":{"title":"ObjectSetAclRequest","description":"Set a single object access policy for storage.object.set_acl. Current supported values are private and signed-only; public/public-read are rejected. Returns ObjectSetAclResult. bucket and key are path params.","type":"object","required":["acl"],"additionalProperties":false,"properties":{"acl":{"description":"Access policy. Supported values: private, signed-only. public/public-read are not supported; public_url remains null.","type":"string","enum":["private","signed-only"]},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/ObjectSetAclResult.json","response":{"title":"ObjectSetAclResult","description":"Result of storage.object.set_acl. acl ∈ private/signed-only (public-read removed 2026-06-06, secure-by-default). public_url is ALWAYS null — Infrai never mints a permanent public direct link; share via short-TTL presign.","type":"object","required":["acl"],"additionalProperties":false,"properties":{"acl":{"description":"Access control list for the bucket or object","type":"string","enum":["private","signed-only"]},"public_url":{"type":["string","null"],"description":"Always null (public-read removed; no permanent public direct link)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"acl\": \"private\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'acl': 'private'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"acl\": \"private\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"acl\": \"private\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"acl\": \"private\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"acl\\\": \\\"private\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"acl\\\": \\\"private\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"acl\\\": \\\"private\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"acl\": \"private\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/object/set_acl/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"acl\": \"private\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"acl":"private"}}},{"id":"storage.object.set_metadata","module":"storage","namespace":"storage","action":"object.set_metadata","method":"POST","path":"/v1/storage/object/set_metadata/{bucket}/{key}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Update a stored object's content-type, cache-control, and custom metadata; metadata replaces previous metadata.","request_schema_ref":"storage/ObjectSetMetadataRequest.json","params":{"title":"ObjectSetMetadataRequest","description":"Change content-type, cache-control, or custom metadata of an already stored object for storage.object.set_metadata. metadata uses replacement semantics, not merge; omitted fields preserve their existing values. Implemented as copy-to-self on S3/OSS-compatible backends. Returns StorageObject.","type":"object","additionalProperties":false,"properties":{"content_type":{"type":["string","null"],"description":"MIME type of the object"},"cache_control":{"type":["string","null"],"description":"Cache-Control header value"},"metadata":{"type":["object","null"],"description":"Custom metadata key/value pairs. Passing metadata replaces the previous metadata instead of merging with it; omit metadata to preserve the old value."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"storage/StorageObject.json","response":{"title":"StorageObject","description":"An object inside a bucket. See docs/phase2/P2_03_New_Modules.md §4.2.","type":"object","required":["bucket_id","key","size_bytes","etag","created_at"],"additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^bkt_[A-Za-z0-9]{20,}$","description":"Unique identifier for this storage bucket"},"key":{"type":"string","description":"Unique identifier key for this resource"},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the resource in bytes"},"etag":{"type":"string","description":"ETag hash of the object content"},"content_type":{"type":["string","null"],"description":"MIME type of the object"},"metadata":{"type":["object","null"],"description":"Arbitrary key-value metadata attached to this resource"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"last_modified":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the object was last modified"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","STORAGE_ACL_INVALID","STORAGE_BANDWIDTH_EXCEEDED","STORAGE_BUCKET_EXISTS","STORAGE_BUCKET_NAME_TAKEN","STORAGE_BUCKET_NOT_FOUND","STORAGE_CONTENT_BLOCKED","STORAGE_CONTENT_TYPE_BLOCKED","STORAGE_DELETE_NOT_FORCED","STORAGE_INVALID_BUCKET_NAME","STORAGE_INVALID_CORS_RULES","STORAGE_INVALID_DATA","STORAGE_INVALID_LIFECYCLE_RULES","STORAGE_INVALID_MODE","STORAGE_INVALID_OBJECT_KEY","STORAGE_INVALID_REGION","STORAGE_INVALID_TTL","STORAGE_INVALID_VENDOR","STORAGE_MULTIPART_INCONSISTENT","STORAGE_OBJECT_NOT_FOUND","STORAGE_OBJECT_TOO_LARGE","STORAGE_PRESIGN_EXPIRED","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/storage/object/set_metadata/BUCKET/KEY\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{}}},{"id":"vector.collection.create","module":"vector","namespace":"vector","action":"collection.create","method":"POST","path":"/v1/vector/collection/create","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Create a vector collection (namespace) for an embedding dimension and distance metric — the container for RAG vectors. Self-hosted on pgvector by default; free management.","request_schema_ref":"vector/CollectionCreateRequest.json","params":{"title":"CollectionCreateRequest","description":"Create a vector collection (vector.collection.create) — the namespace/container for RAG vectors, fixed to one embedding dimension and distance metric.","type":"object","required":["collection","dimension"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Collection name (unique per account)."},"dimension":{"type":"integer","minimum":1,"description":"Embedding vector dimension (e.g. 1536 for text-embedding-3-small)."},"metric":{"enum":["cosine","euclidean","dotproduct"],"default":"cosine","description":"Distance metric used for similarity search."},"metadata":{"type":["object","null"],"description":"Optional free-form collection metadata."}}},"response_schema_ref":"vector/CollectionResult.json","response":{"title":"CollectionResult","type":"object","description":"Result of a vector collection operation.","required":["collection","dimension","metric","vector_count","state"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Name of the collection"},"dimension":{"type":"integer","description":"Dimension of the vector embeddings"},"metric":{"type":"string","description":"Distance metric for similarity search (cosine, euclidean, dotproduct)"},"vector_count":{"type":"integer","description":"Number of vectors currently stored in the collection"},"state":{"type":"string","description":"Collection lifecycle state (ready, pending, failed)"},"raw_vendor_payload":{"type":"object","description":"Raw vendor-native payload, when the vendor adapter surfaces one"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/vector/collection/create \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"collection\": \"sample\", \"dimension\": 1}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/vector/collection/create\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'collection': 'sample', 'dimension': 1},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"dimension\": 1}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/create\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"dimension\": 1}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"collection\": \"sample\", \"dimension\": 1}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/vector/collection/create\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/collection/create\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collection\\\": \\\"sample\\\", \\\"dimension\\\": 1}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/vector/collection/create\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"collection\\\": \\\"sample\\\", \\\"dimension\\\": 1}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/collection/create\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"collection\\\": \\\"sample\\\", \\\"dimension\\\": 1}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/collection/create\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"collection\": \"sample\", \"dimension\": 1}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/vector/collection/create\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"collection\": \"sample\", \"dimension\": 1}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"collection":"sample","dimension":1}}},{"id":"vector.collection.delete","module":"vector","namespace":"vector","action":"collection.delete","method":"DELETE","path":"/v1/vector/collection/delete","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete a vector collection and all its vectors. Free management (idempotent).","request_schema_ref":null,"params":{},"response_schema_ref":"vector/CollectionDeleteResult.json","response":{"title":"CollectionDeleteResult","type":"object","description":"Result of deleting a vector collection.","required":["collection","deleted"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Name of the deleted collection"},"deleted":{"type":"integer","description":"Number of vectors freed by the collection drop"},"raw_vendor_payload":{"type":"object","description":"Raw vendor-native payload, when the vendor adapter surfaces one"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/vector/collection/delete \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/vector/collection/delete\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/delete\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/delete\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/vector/collection/delete\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/collection/delete\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/vector/collection/delete\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/collection/delete\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/collection/delete\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/vector/collection/delete\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"vector.collection.get","module":"vector","namespace":"vector","action":"collection.get","method":"GET","path":"/v1/vector/collection/get","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Fetch a vector collection's configuration (dimension, metric, vector count). Free management read.","request_schema_ref":null,"params":{},"response_schema_ref":"vector/CollectionResult.json","response":{"title":"CollectionResult","type":"object","description":"Result of a vector collection operation.","required":["collection","dimension","metric","vector_count","state"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Name of the collection"},"dimension":{"type":"integer","description":"Dimension of the vector embeddings"},"metric":{"type":"string","description":"Distance metric for similarity search (cosine, euclidean, dotproduct)"},"vector_count":{"type":"integer","description":"Number of vectors currently stored in the collection"},"state":{"type":"string","description":"Collection lifecycle state (ready, pending, failed)"},"raw_vendor_payload":{"type":"object","description":"Raw vendor-native payload, when the vendor adapter surfaces one"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/vector/collection/get \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/vector/collection/get\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/get\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/vector/collection/get\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/collection/get\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/vector/collection/get\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/collection/get\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/collection/get\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/vector/collection/get\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"vector.collection.list","module":"vector","namespace":"vector","action":"collection.list","method":"GET","path":"/v1/vector/collection/list","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"List the account's vector collections. Free management read.","request_schema_ref":null,"params":{},"response_schema_ref":"vector/CollectionListResult.json","response":{"title":"CollectionListResult","type":"object","description":"List of vector collections.","required":["collections"],"additionalProperties":false,"properties":{"collections":{"type":"array","items":{"title":"CollectionResult","type":"object","description":"Result of a vector collection operation.","required":["collection","dimension","metric","vector_count","state"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Name of the collection"},"dimension":{"type":"integer","description":"Dimension of the vector embeddings"},"metric":{"type":"string","description":"Distance metric for similarity search (cosine, euclidean, dotproduct)"},"vector_count":{"type":"integer","description":"Number of vectors currently stored in the collection"},"state":{"type":"string","description":"Collection lifecycle state (ready, pending, failed)"},"raw_vendor_payload":{"type":"object","description":"Raw vendor-native payload, when the vendor adapter surfaces one"}}},"description":"List of collection records"},"raw_vendor_payload":{"type":"object","description":"Raw vendor-native payload, when the vendor adapter surfaces one"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/vector/collection/list \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/vector/collection/list\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/collection/list\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/vector/collection/list\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/collection/list\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/vector/collection/list\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/collection/list\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/collection/list\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/vector/collection/list\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"vector.delete","module":"vector","namespace":"vector","action":"delete","method":"DELETE","path":"/v1/vector/delete","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Delete specific vectors by id from a collection. Free management.","request_schema_ref":"vector/VectorDeleteRequest.json","params":{"title":"VectorDeleteRequest","description":"Delete vectors by id from a collection (vector.delete); idempotent.","type":"object","required":["collection","ids"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Collection containing the vectors."},"ids":{"type":"array","minItems":1,"items":{"type":"string"},"description":"Vector ids to delete."}}},"response_schema_ref":"vector/VectorDeleteResult.json","response":{"title":"VectorDeleteResult","type":"object","description":"Result of deleting a vector.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the vector was deleted"},"id":{"type":["string","null"],"description":"Identifier of the deleted vector"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/vector/delete?collection=sample&ids=sample\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"collection":"sample","ids":["sample"]}}},{"id":"vector.query","module":"vector","namespace":"vector","action":"query","method":"POST","path":"/v1/vector/query","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Run an approximate nearest-neighbor (ANN) similarity search over a collection, returning the top-k closest vectors with scores and metadata. Billable work-action.","request_schema_ref":"vector/QueryRequest.json","params":{"title":"QueryRequest","description":"Similarity-search a collection (vector.query): returns the top_k nearest vectors to the query embedding, optionally filtered by metadata.","type":"object","required":["collection","embedding"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Collection to search."},"embedding":{"type":"array","items":{"type":"number"},"description":"Query embedding; length must equal the collection dimension."},"top_k":{"type":"integer","minimum":1,"default":10,"description":"Number of nearest neighbors to return."},"filter":{"type":["object","null"],"description":"Optional metadata filter (exact-match keys, e.g. source= \"docs\")."},"include_metadata":{"type":"boolean","default":true,"description":"Include each match's stored metadata in the result."}}},"response_schema_ref":"vector/VectorQueryResult.json","response":{"title":"VectorQueryResult","type":"object","description":"Result of a vector similarity search.","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","items":{"type":"object"},"description":"List of matching vectors with scores"},"next_cursor":{"type":["string","null"],"description":"Cursor for next page; null if last page"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/vector/query \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"collection\": \"sample\", \"embedding\": [1.0]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/vector/query\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'collection': 'sample', 'embedding': [1.0]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/query\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"embedding\": [1.0]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/query\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"embedding\": [1.0]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"collection\": \"sample\", \"embedding\": [1.0]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/vector/query\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/query\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collection\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/vector/query\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"collection\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/query\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"collection\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/query\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"collection\": \"sample\", \"embedding\": [1.0]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/vector/query\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"collection\": \"sample\", \"embedding\": [1.0]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"collection":"sample","embedding":[1]}}},{"id":"vector.upsert","module":"vector","namespace":"vector","action":"upsert","method":"POST","path":"/v1/vector/upsert","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"infrai_native","availability":"ga","regions":["western","china"],"summary":"Insert or update vectors (id + embedding + metadata) into a collection. Pair ai.embed → vector.upsert for one-stop RAG ingestion. Billable work-action.","request_schema_ref":"vector/UpsertRequest.json","params":{"title":"UpsertRequest","description":"Insert or update vectors in a collection (vector.upsert). Each item carries an id, its embedding, and optional metadata for filtered retrieval.","type":"object","required":["collection","vectors"],"additionalProperties":false,"properties":{"collection":{"type":"string","description":"Target collection name."},"vectors":{"type":"array","minItems":1,"description":"Vectors to upsert (same id overwrites).","items":{"type":"object","required":["id","embedding"],"additionalProperties":false,"properties":{"id":{"type":"string","description":"Stable vector id (your document/chunk id)."},"embedding":{"type":"array","items":{"type":"number"},"description":"Embedding values; length must equal the collection dimension."},"metadata":{"type":["object","null"],"description":"Optional metadata for query-time filtering (e.g. source= \"docs\")."}}}}}},"response_schema_ref":"vector/VectorUpsertResult.json","response":{"title":"VectorUpsertResult","type":"object","description":"Result of upserting a vector.","required":["ok"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","description":"Whether the upsert succeeded"},"id":{"type":["string","null"],"description":"Identifier of the upserted vector"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/vector/upsert \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/vector/upsert\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'collection': 'sample', 'vectors': [{'id': 'sample', 'embedding': [1.0]}]},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/upsert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/vector/upsert\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/vector/upsert\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/vector/upsert\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collection\\\": \\\"sample\\\", \\\"vectors\\\": [{\\\"id\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}]}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/vector/upsert\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"collection\\\": \\\"sample\\\", \\\"vectors\\\": [{\\\"id\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}]}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/vector/upsert\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"collection\\\": \\\"sample\\\", \\\"vectors\\\": [{\\\"id\\\": \\\"sample\\\", \\\"embedding\\\": [1.0]}]}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/vector/upsert\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/vector/upsert\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"collection\": \"sample\", \"vectors\": [{\"id\": \"sample\", \"embedding\": [1.0]}]}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"collection":"sample","vectors":[{"id":"sample","embedding":[1]}]}}},{"id":"video.cancel","module":"ai-video","namespace":"video","action":"cancel","method":"POST","path":"/v1/video/cancel/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Cancel an in-progress video generation job.","request_schema_ref":"ai-runtime/VideoCancelRequest.json","params":{"title":"VideoCancelRequest","description":"Request shape for video.cancel — cancel a running video-generation job. Returns job_id + state.","type":"object","required":["job_id"],"additionalProperties":false,"properties":{"job_id":{"type":"string","description":"Id of the video job to cancel."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"}}},"response_schema_ref":"ai-runtime/VideoJob.json","response":{"title":"VideoJob","description":"A video-generation job result. See docs/phase2/P2_03_New_Modules.md §8.2.","type":"object","required":["job_id","state","model","vendor","prompt","duration_seconds","aspect_ratio","created_at"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","running","succeeded","failed","cancelled","expired"]},"model":{"type":"string","description":"Model identifier to use for generation"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"prompt":{"type":"string","description":"Text prompt for content generation"},"duration_seconds":{"type":"integer","minimum":1,"description":"Duration of generated video in seconds"},"aspect_ratio":{"description":"Aspect ratio for generated images or video (e.g. 16:9)","type":"string","enum":["16:9","9:16","1:1","4:3","3:4","21:9"]},"video_url":{"type":["string","null"],"description":"URL to the generated video file"},"thumbnail_url":{"type":["string","null"],"description":"URL to the video thumbnail image"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"finished_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the job finished"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"parent_job_id":{"type":["string","null"],"pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Source job this one was derived from via video.extend / video.upscale / webhook re-run; null for original generate jobs."},"error":{"description":"Vendor/gateway error detail; present only when state is failed.","title":"ErrorInfo","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},"metadata":{"description":"Cost/vendor/model disclosure for this generation (cost-transparency contract surface); present once a vendor has been selected.","title":"ResultMetadata","type":"object","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string","description":"UUID v7."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"latency_ms":{"type":"integer","minimum":0,"description":"Latency of the operation in milliseconds"},"entry_form":{"description":"Entry point format (rest, mcp, sdk)"},"cost_usd":{"type":"number","minimum":0,"description":"Cost of this operation in USD"},"cost_cny":{"type":"number","minimum":0,"description":"Cost in CNY for this request"},"vendor":{"type":"string","description":"Adapter name; references VendorRegistry."},"vendor_region":{"enum":["china","western"],"description":"Vendor region where the request was processed"},"markup_pct":{"type":"number","enum":[0,0.05],"description":"Markup percentage applied on top of vendor cost"},"cache_layer":{"enum":["none","l1_hit","l1_miss","l2_hit","batch"],"description":"Cache layer that served the response"},"failover_info":{"description":"Failover details when a different vendor was used","title":"FailoverInfo","type":"object","required":["primary_vendor","actual_vendor","failover_reason"],"additionalProperties":false,"properties":{"primary_vendor":{"type":"string","description":"Primary vendor that was attempted"},"actual_vendor":{"type":"string","description":"Vendor that actually handled the request (after failover)"},"primary_model":{"type":"string","description":"Primary model that was attempted"},"actual_model":{"type":"string","description":"Model that actually handled the request (after failover)"},"cost_at_primary":{"type":"number","minimum":0,"description":"Cost at the primary vendor in USD"},"cost_at_actual":{"type":"number","minimum":0,"description":"Cost at the actual vendor in USD"},"cost_multiplier":{"type":"number","minimum":0,"description":"Cost multiplier due to failover"},"failover_reason":{"type":"string","enum":["VENDOR_TIMEOUT","VENDOR_DOWN","RATE_LIMIT_VENDOR","VENDOR_AUTH_ERROR"],"description":"Reason for the failover"},"fallback_chain_depth":{"type":"integer","minimum":1,"description":"Depth of the failover chain traversed"}}},"edge_pop":{"type":"string","description":"Geographic PoP that served this request."},"worker_id":{"type":"string","description":"Worker process identifier that handled the request"},"idempotent_replay":{"type":"boolean","description":"true when this write was served from an earlier idempotent result (Idempotency-Key replay). Gateway-set; SDKs MUST read it from metadata, not a header."}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/video/cancel/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"job_id\": \"sample\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/video/cancel/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'job_id': 'sample'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"job_id\": \"sample\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/cancel/ID\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"job_id\": \"sample\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"job_id\": \"sample\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/video/cancel/ID\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/cancel/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"job_id\\\": \\\"sample\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/video/cancel/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"job_id\\\": \\\"sample\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/cancel/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"job_id\\\": \\\"sample\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/cancel/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"job_id\": \"sample\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/video/cancel/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"job_id\": \"sample\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"job_id":"sample"}}},{"id":"video.capabilities","module":"ai-video","namespace":"video","action":"capabilities","method":"GET","path":"/v1/video/capabilities","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Query each video provider's supported models, resolutions, max duration, and extend/upscale capabilities.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VideoCapabilitiesResult.json","response":{"title":"VideoCapabilitiesResult","description":"Result of ai.video.capabilities — the served-model catalog for video generation plus the resolution-multiplier price axis. One 'models' entry per priced (vendor, model) row, each enriched with the vendor adapter's REAL constraints (max_seconds, image_to_video) which the generation impl ENFORCES at submit; 'resolutions' = supported resolution keys; 'resolution_multiplier' = the per-resolution cost-axis multiplier. Free public read.","type":"object","required":["models","resolutions","resolution_multiplier"],"additionalProperties":false,"properties":{"models":{"type":"array","description":"Served video models, one per priced (vendor, model) row.","items":{"type":"object","required":["vendor","model"],"additionalProperties":false,"properties":{"vendor":{"type":"string"},"model":{"type":"string"},"region":{"type":["string","null"]},"max_seconds":{"type":["integer","null"],"minimum":1,"description":"Max generation duration the vendor adapter enforces (DURATION_EXCEEDED above this); null if the adapter is absent."},"image_to_video":{"type":["boolean","null"],"description":"Whether the vendor supports image-to-video; null if the adapter is absent."}}}},"resolutions":{"type":"array","description":"Supported resolution keys (also the keys of resolution_multiplier).","items":{"type":"string","enum":["720p","1080p","4k"],"description":"Output resolution for ai.video.generate (the \"spec axis\" for video, alongside"}},"resolution_multiplier":{"type":"object","description":"Per-resolution cost-axis multiplier (e.g. 720p=1.0,\"1080p\":2.0,\"4k\":4.0).","additionalProperties":{"type":"number"}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/video/capabilities \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/video/capabilities\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/capabilities\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/capabilities\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/video/capabilities\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/capabilities\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/video/capabilities\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/capabilities\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/capabilities\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/video/capabilities\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"video.delete","module":"ai-video","namespace":"video","action":"delete","method":"DELETE","path":"/v1/video/delete/{id}","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Delete a video job and its artifacts (idempotent write).","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VideoLifecycleResult.json","response":{"title":"VideoLifecycleResult","description":"Result payload for ai.video lifecycle ops (delete / delete_all / set_retention). The transport deconstructs the underlying _LifecycleResult into the kernel Result envelope (ok->Result.ok, error->Result.error); this schema describes the residual data carried under Result.data — the affected job_id (null for delete_all).","type":"object","required":["job_id"],"additionalProperties":false,"properties":{"job_id":{"type":["string","null"],"pattern":"^vid_[A-Za-z0-9]{20,}$","description":"The job affected; null for bulk ops (delete_all)."}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X DELETE https://api.infrai.cc/v1/video/delete/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.delete(\n    \"https://api.infrai.cc/v1/video/delete/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/delete/ID\",\n  {\n    method: \"DELETE\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"DELETE\", \"https://api.infrai.cc/v1/video/delete/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/delete/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"DELETE\"), \"https://api.infrai.cc/v1/video/delete/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/delete/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/delete/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Delete.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .delete(\"https://api.infrai.cc/v1/video/delete/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"video.download_url","module":"ai-video","namespace":"video","action":"download_url","method":"GET","path":"/v1/video/download_url/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Issue a time-limited, expiring download URL for a video job's output.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VideoDownloadUrlResult.json","response":{"title":"VideoDownloadUrlResult","description":"Result of ai.video.download_url — an Infrai-hosted signed URL for the job artifact with a controlled expiry (replaces the vendor's short-lived URL). Mirrors VideoState.expired semantics.","type":"object","required":["job_id","url","expires_at"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"url":{"type":"string","format":"uri","description":"Signed, time-limited download URL hosted by Infrai."},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource or token expires"},"size_bytes":{"type":["integer","null"],"minimum":0,"description":"Size of the resource in bytes"},"content_type":{"type":["string","null"],"description":"MIME type of the object"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/video/download_url/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/video/download_url/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/download_url/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/download_url/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/video/download_url/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/download_url/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/video/download_url/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/download_url/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/download_url/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/video/download_url/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"video.generate","module":"ai-video","namespace":"video","action":"generate","method":"POST","path":"/v1/video/generate","idempotent":true,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Generate a video from a text or image prompt asynchronously (idempotent).","request_schema_ref":"ai-runtime/VideoGenerateRequest.json","params":{"title":"VideoGenerateRequest","description":"Request shape for ai.video.generate (mirrors ImageGenerateRequest). See docs/phase2/P2_03_New_Modules.md §8.2.","type":"object","required":["prompt"],"additionalProperties":false,"properties":{"prompt":{"type":"string","description":"Text prompt for content generation"},"model":{"description":"Model to use — either a routing MODE (infrai picks the model) or a concrete video model id to pin. Modes resolve against the vendors that hold a live key: 'cheapest' takes the lowest USD/s, 'smartest' the flagship, 'auto' leaves default routing. To pin instead, pass a model id ('wan-t2v', 'kling-v2.1'); a vendor-name token in the id ('kling', 'veo', 'hunyuan') pins that vendor too. Null or omitted behaves as 'auto'.","anyOf":[{"description":"Routing mode — infrai selects the model.","type":"string","enum":["auto","cheapest","smartest"]},{"type":"string","description":"Concrete video model id; a vendor-name token pins that vendor."},{"type":"null","description":"Same as 'auto'."}],"default":null},"resolution":{"enum":["720p","1080p","4k"],"default":"720p","description":"Output resolution spec axis. Gated per-vendor. (SSOT: enums/VideoResolution)"},"duration_seconds":{"type":"integer","minimum":1,"maximum":60,"default":5,"description":"Duration of generated video in seconds"},"aspect_ratio":{"default":"16:9","description":"Aspect ratio for generated images or video (e.g. 16:9)","type":"string","enum":["16:9","9:16","1:1","4:3","3:4","21:9"]},"seed":{"type":["integer","null"],"description":"Random seed for deterministic generation"},"negative_prompt":{"type":["string","null"],"description":"Negative prompt for excluding unwanted content"},"reference_image":{"type":["string","null"],"description":"URL or base64 for image-to-video."},"vendor":{"type":["string","null"],"description":"Vendor that handled or will handle this request"},"webhook_url":{"type":["string","null"],"format":"uri","description":"Optional callback URL; declares an async delivery target at submit time (events from VideoEventType). Equivalent to a video.webhook.subscribe for this job."},"idempotency_key":{"type":["string","null"],"description":"Client-provided idempotency key; prevents duplicate execution on retry"},"store":{"type":"boolean","default":false,"description":"Opt in to RETAIN the produced asset/record in Infrai's own store (default false = stateless passthrough: process, return inline, keep nothing). When true, Infrai persists the asset, bills a self-hosted storage line item and applies a retention TTL — and only then do the *.list/get/delete read caps see it."}}},"response_schema_ref":"ai-runtime/VideoJob.json","response":{"title":"VideoJob","description":"A video-generation job result. See docs/phase2/P2_03_New_Modules.md §8.2.","type":"object","required":["job_id","state","model","vendor","prompt","duration_seconds","aspect_ratio","created_at"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","running","succeeded","failed","cancelled","expired"]},"model":{"type":"string","description":"Model identifier to use for generation"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"prompt":{"type":"string","description":"Text prompt for content generation"},"duration_seconds":{"type":"integer","minimum":1,"description":"Duration of generated video in seconds"},"aspect_ratio":{"description":"Aspect ratio for generated images or video (e.g. 16:9)","type":"string","enum":["16:9","9:16","1:1","4:3","3:4","21:9"]},"video_url":{"type":["string","null"],"description":"URL to the generated video file"},"thumbnail_url":{"type":["string","null"],"description":"URL to the video thumbnail image"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"finished_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the job finished"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"parent_job_id":{"type":["string","null"],"pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Source job this one was derived from via video.extend / video.upscale / webhook re-run; null for original generate jobs."},"error":{"description":"Vendor/gateway error detail; present only when state is failed.","title":"ErrorInfo","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},"metadata":{"description":"Cost/vendor/model disclosure for this generation (cost-transparency contract surface); present once a vendor has been selected.","title":"ResultMetadata","type":"object","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string","description":"UUID v7."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"latency_ms":{"type":"integer","minimum":0,"description":"Latency of the operation in milliseconds"},"entry_form":{"description":"Entry point format (rest, mcp, sdk)"},"cost_usd":{"type":"number","minimum":0,"description":"Cost of this operation in USD"},"cost_cny":{"type":"number","minimum":0,"description":"Cost in CNY for this request"},"vendor":{"type":"string","description":"Adapter name; references VendorRegistry."},"vendor_region":{"enum":["china","western"],"description":"Vendor region where the request was processed"},"markup_pct":{"type":"number","enum":[0,0.05],"description":"Markup percentage applied on top of vendor cost"},"cache_layer":{"enum":["none","l1_hit","l1_miss","l2_hit","batch"],"description":"Cache layer that served the response"},"failover_info":{"description":"Failover details when a different vendor was used","title":"FailoverInfo","type":"object","required":["primary_vendor","actual_vendor","failover_reason"],"additionalProperties":false,"properties":{"primary_vendor":{"type":"string","description":"Primary vendor that was attempted"},"actual_vendor":{"type":"string","description":"Vendor that actually handled the request (after failover)"},"primary_model":{"type":"string","description":"Primary model that was attempted"},"actual_model":{"type":"string","description":"Model that actually handled the request (after failover)"},"cost_at_primary":{"type":"number","minimum":0,"description":"Cost at the primary vendor in USD"},"cost_at_actual":{"type":"number","minimum":0,"description":"Cost at the actual vendor in USD"},"cost_multiplier":{"type":"number","minimum":0,"description":"Cost multiplier due to failover"},"failover_reason":{"type":"string","enum":["VENDOR_TIMEOUT","VENDOR_DOWN","RATE_LIMIT_VENDOR","VENDOR_AUTH_ERROR"],"description":"Reason for the failover"},"fallback_chain_depth":{"type":"integer","minimum":1,"description":"Depth of the failover chain traversed"}}},"edge_pop":{"type":"string","description":"Geographic PoP that served this request."},"worker_id":{"type":"string","description":"Worker process identifier that handled the request"},"idempotent_replay":{"type":"boolean","description":"true when this write was served from an earlier idempotent result (Idempotency-Key replay). Gateway-set; SDKs MUST read it from metadata, not a header."}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/video/generate \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/video/generate\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'prompt': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/generate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"prompt\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/generate\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"prompt\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"prompt\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/video/generate\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/generate\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"prompt\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/video/generate\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"prompt\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/generate\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"prompt\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/generate\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"prompt\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/video/generate\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"prompt\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"prompt":"hello"}}},{"id":"video.get","module":"ai-video","namespace":"video","action":"get","method":"GET","path":"/v1/video/get/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Retrieve a video job's full details (status, video URL, duration, resolution, provider, model).","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VideoJob.json","response":{"title":"VideoJob","description":"A video-generation job result. See docs/phase2/P2_03_New_Modules.md §8.2.","type":"object","required":["job_id","state","model","vendor","prompt","duration_seconds","aspect_ratio","created_at"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","running","succeeded","failed","cancelled","expired"]},"model":{"type":"string","description":"Model identifier to use for generation"},"vendor":{"type":"string","description":"Vendor that handled or will handle this request"},"prompt":{"type":"string","description":"Text prompt for content generation"},"duration_seconds":{"type":"integer","minimum":1,"description":"Duration of generated video in seconds"},"aspect_ratio":{"description":"Aspect ratio for generated images or video (e.g. 16:9)","type":"string","enum":["16:9","9:16","1:1","4:3","3:4","21:9"]},"video_url":{"type":["string","null"],"description":"URL to the generated video file"},"thumbnail_url":{"type":["string","null"],"description":"URL to the video thumbnail image"},"cost_usd":{"type":["number","null"],"minimum":0,"description":"Cost of this operation in USD"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when this resource was created"},"finished_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp when the job finished"},"retention_days":{"type":["integer","null"],"minimum":0,"description":"Number of days to retain this resource"},"parent_job_id":{"type":["string","null"],"pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Source job this one was derived from via video.extend / video.upscale / webhook re-run; null for original generate jobs."},"error":{"description":"Vendor/gateway error detail; present only when state is failed.","title":"ErrorInfo","type":"object","required":["code","http_status","message","docs_url"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable identifier from registry.yaml."},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code of the webhook delivery attempt"},"message":{"type":"string","description":"Human-readable hint."},"docs_url":{"type":"string","format":"uri","description":"Documentation URL for this error code"},"code_detail":{"type":"string","description":"Sub-classification (e.g. wallet cap reason)."},"retryable":{"type":"boolean","description":"Whether the error is retryable"},"retry_after_ms":{"type":"integer","minimum":0,"description":"Suggested retry delay in milliseconds"},"param":{"type":"string","description":"Which parameter failed validation, if applicable."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"request_id":{"type":"string","description":"Server-assigned request identifier for tracing"}}},"metadata":{"description":"Cost/vendor/model disclosure for this generation (cost-transparency contract surface); present once a vendor has been selected.","title":"ResultMetadata","type":"object","required":["request_id","timestamp","latency_ms","entry_form"],"additionalProperties":false,"properties":{"request_id":{"type":"string","description":"UUID v7."},"trace_id":{"type":"string","description":"Distributed tracing identifier"},"timestamp":{"type":"string","format":"date-time","description":"Unix timestamp of the data point"},"latency_ms":{"type":"integer","minimum":0,"description":"Latency of the operation in milliseconds"},"entry_form":{"description":"Entry point format (rest, mcp, sdk)"},"cost_usd":{"type":"number","minimum":0,"description":"Cost of this operation in USD"},"cost_cny":{"type":"number","minimum":0,"description":"Cost in CNY for this request"},"vendor":{"type":"string","description":"Adapter name; references VendorRegistry."},"vendor_region":{"enum":["china","western"],"description":"Vendor region where the request was processed"},"markup_pct":{"type":"number","enum":[0,0.05],"description":"Markup percentage applied on top of vendor cost"},"cache_layer":{"enum":["none","l1_hit","l1_miss","l2_hit","batch"],"description":"Cache layer that served the response"},"failover_info":{"description":"Failover details when a different vendor was used","title":"FailoverInfo","type":"object","required":["primary_vendor","actual_vendor","failover_reason"],"additionalProperties":false,"properties":{"primary_vendor":{"type":"string","description":"Primary vendor that was attempted"},"actual_vendor":{"type":"string","description":"Vendor that actually handled the request (after failover)"},"primary_model":{"type":"string","description":"Primary model that was attempted"},"actual_model":{"type":"string","description":"Model that actually handled the request (after failover)"},"cost_at_primary":{"type":"number","minimum":0,"description":"Cost at the primary vendor in USD"},"cost_at_actual":{"type":"number","minimum":0,"description":"Cost at the actual vendor in USD"},"cost_multiplier":{"type":"number","minimum":0,"description":"Cost multiplier due to failover"},"failover_reason":{"type":"string","enum":["VENDOR_TIMEOUT","VENDOR_DOWN","RATE_LIMIT_VENDOR","VENDOR_AUTH_ERROR"],"description":"Reason for the failover"},"fallback_chain_depth":{"type":"integer","minimum":1,"description":"Depth of the failover chain traversed"}}},"edge_pop":{"type":"string","description":"Geographic PoP that served this request."},"worker_id":{"type":"string","description":"Worker process identifier that handled the request"},"idempotent_replay":{"type":"boolean","description":"true when this write was served from an earlier idempotent result (Idempotency-Key replay). Gateway-set; SDKs MUST read it from metadata, not a header."}}}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/video/get/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/video/get/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/get/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/video/get/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/get/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/video/get/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/get/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/get/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/video/get/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"video.status","module":"ai-video","namespace":"video","action":"status","method":"GET","path":"/v1/video/status/{id}","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"sticky_resource","availability":"ga","regions":["western","china"],"summary":"Query a video generation job's status and output URL.","request_schema_ref":null,"params":{},"response_schema_ref":"ai-runtime/VideoJobStatus.json","response":{"title":"VideoJobStatus","description":"Per-job runtime status snapshot for ai.video.","type":"object","required":["job_id","state"],"additionalProperties":false,"properties":{"job_id":{"type":"string","pattern":"^vid_[A-Za-z0-9]{20,}$","description":"Unique identifier for this async job"},"state":{"description":"Current lifecycle state of this resource","type":"string","enum":["queued","running","succeeded","failed","cancelled","expired"]},"progress_pct":{"type":["integer","null"],"minimum":0,"maximum":100,"description":"Progress of the async operation as a percentage (0-100)"},"eta_seconds":{"type":["integer","null"],"minimum":0,"description":"Estimated seconds until completion"},"current_step":{"type":["string","null"],"description":"Description of the current processing step"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","VIDEO_ASPECT_NOT_SUPPORTED","VIDEO_CANCEL_FAILED","VIDEO_CANCEL_NOT_SUPPORTED","VIDEO_CONFIRMATION_REQUIRED","VIDEO_DURATION_EXCEEDED","VIDEO_JOB_TIMEOUT","VIDEO_MODEL_DEPRECATED","VIDEO_NSFW_REJECTED","VIDEO_REFERENCE_IMAGE_INVALID","VIDEO_RESOLUTION_NOT_SUPPORTED","VIDEO_RUNTIME_BUDGET_EXCEEDED","VIDEO_VENDOR_QUOTA","VIDEO_VENDOR_UNSUPPORTED_OP","WALLET_EXPIRED"],"examples":{"curl":"curl -X GET https://api.infrai.cc/v1/video/status/ID \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\"","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.get(\n    \"https://api.infrai.cc/v1/video/status/ID\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/video/status/ID\",\n  {\n    method: \"GET\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n    },\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\treq, _ := http.NewRequest(\"GET\", \"https://api.infrai.cc/v1/video/status/ID\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/video/status/ID\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"GET\"), \"https://api.infrai.cc/v1/video/status/ID\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/video/status/ID\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n]);\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/video/status/ID\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Get.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .get(\"https://api.infrai.cc/v1/video/status/ID\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}"}},{"id":"web.scrape","module":"web","namespace":"web","action":"scrape","method":"POST","path":"/v1/web/scrape","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Fetch and read a single web page, returning clean text/markdown for an LLM to summarize. Read-only and honors robots.txt — no crawl, no paywall bypass. Vendor-backed (Firecrawl). Billable work-action.","request_schema_ref":"web/ScrapeRequest.json","params":{"title":"ScrapeRequest","description":"Scrape a web page (web.scrape): fetch a URL and return its content as clean markdown or plain text. Read-only; honors robots.txt (a blocked page surfaces WEB_BLOCKED_BY_ROBOTS, never bypassed).","type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","description":"Page URL to scrape (http/https)."},"format":{"enum":["markdown","text"],"default":"markdown","description":"Output content format."}}},"response_schema_ref":"web/ScrapeResult.json","response":{"title":"ScrapeResult","type":"object","description":"Result of scraping a web page.","required":["url","title","content","format"],"additionalProperties":false,"properties":{"url":{"type":"string","description":"URL that was scraped"},"title":{"type":"string","description":"Page title (empty string when the vendor does not surface one, e.g. Tavily Extract)"},"content":{"type":"string","description":"Extracted page content, in the requested format"},"format":{"type":"string","enum":["markdown","text"],"description":"Content format of `content`"},"raw_vendor_payload":{"type":["object","null"],"description":"Raw vendor response payload, when available"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/web/scrape \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://example.com/callback\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/web/scrape\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'url': 'https://example.com/callback'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/web/scrape\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"url\": \"https://example.com/callback\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/web/scrape\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"url\": \"https://example.com/callback\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"url\": \"https://example.com/callback\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/web/scrape\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/web/scrape\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"url\\\": \\\"https://example.com/callback\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/web/scrape\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"url\\\": \\\"https://example.com/callback\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/web/scrape\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"url\\\": \\\"https://example.com/callback\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/web/scrape\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"url\": \"https://example.com/callback\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/web/scrape\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"url\": \"https://example.com/callback\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"url":"https://example.com/callback"}}},{"id":"web.search","module":"web","namespace":"web","action":"search","method":"POST","path":"/v1/web/search","idempotent":false,"minimum_tier":"standard","supported_message_classes":null,"failover_policy":"stateless","availability":"ga","regions":["western","china"],"summary":"Search the live web and return ranked results (title, url, snippet) optimized for LLM grounding — adds real-time knowledge to an AI app. Vendor-backed (Tavily). Billable work-action.","request_schema_ref":"web/SearchRequest.json","params":{"title":"SearchRequest","description":"Web search (web.search): query the live web and get ranked results with title, url, and snippet — the standard agent/RAG search tool call.","type":"object","required":["query"],"additionalProperties":false,"properties":{"query":{"type":"string","description":"Search query in natural language or keywords."},"max_results":{"type":"integer","minimum":1,"maximum":20,"default":5,"description":"Maximum number of results to return."},"include_domains":{"type":["array","null"],"items":{"type":"string"},"description":"Restrict results to these domains (e.g. [\"docs.python.org\"])."},"exclude_domains":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude results from these domains."}}},"response_schema_ref":"web/SearchResult.json","response":{"title":"SearchResult","type":"object","description":"Result of a web search.","required":["query","results"],"additionalProperties":false,"properties":{"query":{"type":"string","description":"The search query that was run"},"results":{"type":"array","description":"List of search result hits","items":{"type":"object","required":["title","url","snippet"],"additionalProperties":false,"properties":{"title":{"type":"string","description":"Result title"},"url":{"type":"string","description":"Result URL"},"snippet":{"type":"string","description":"Short excerpt / summary of the result"},"score":{"type":"number","description":"Vendor relevance score, when available"}}}},"raw_vendor_payload":{"type":["object","null"],"description":"Raw vendor response payload, when available"}}},"errors":["ACCOUNT_AUTORECHARGE_LIMIT","ACCOUNT_FROZEN","AUTH_RATE_LIMIT","AUTH_REFRESH_TOO_FREQUENT","IDEMPOTENCY_KEY_CONFLICT","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INVALID_ARGUMENT","KEY_REVOKED","MAINTENANCE","NETWORK_ERROR","RATE_LIMIT_ACCOUNT","RATE_LIMIT_USER","RATE_LIMIT_VENDOR","SCOPE_INSUFFICIENT","UNAUTHORIZED","VENDOR_AUTH_ERROR","VENDOR_DOWN","VENDOR_TIMEOUT","WALLET_EXPIRED"],"examples":{"curl":"curl -X POST https://api.infrai.cc/v1/web/search \\\n  -H \"Authorization: Bearer $INFRAI_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"hello\"}'","python":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport os, requests\n\nresp = requests.post(\n    \"https://api.infrai.cc/v1/web/search\",\n    headers={\n        \"Authorization\": f\"Bearer {os.environ['INFRAI_API_KEY']}\",\n    },\n    json={'query': 'hello'},\n)\nresp.raise_for_status()\nprint(resp.json())","javascript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/web/search\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"query\": \"hello\"}),\n  },\n);\nconsole.log(await resp.json());","typescript":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nconst resp = await fetch(\n  \"https://api.infrai.cc/v1/web/search\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Authorization\": `Bearer ${process.env.INFRAI_API_KEY}`,\n      \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\"query\": \"hello\"}),\n  },\n);\nif (!resp.ok) throw new Error(`infrai ${resp.status}`);\nconst data: unknown = await resp.json();\nconsole.log(data);","go":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbody := []byte(`{\"query\": \"hello\"}`)\n\treq, _ := http.NewRequest(\"POST\", \"https://api.infrai.cc/v1/web/search\", bytes.NewReader(body))\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"INFRAI_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tfmt.Println(resp.Status)\n}","java":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nimport java.net.URI;\nimport java.net.http.*;\n\nHttpRequest req = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.infrai.cc/v1/web/search\"))\n    .header(\"Authorization\", \"Bearer \" + System.getenv(\"INFRAI_API_KEY\"))\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"query\\\": \\\"hello\\\"}\"))\n    .build();\nHttpResponse<String> resp = HttpClient.newHttpClient()\n    .send(req, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(resp.body());","csharp":"// Zero-install REST call — no SDK required (short-term the API is REST-only).\nusing System;\nusing System.Net.Http;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(new HttpMethod(\"POST\"), \"https://api.infrai.cc/v1/web/search\");\nvar key = Environment.GetEnvironmentVariable(\"INFRAI_API_KEY\");\nreq.Headers.Add(\"Authorization\", \"Bearer \" + key);\nreq.Content = new StringContent(\"{\\\"query\\\": \\\"hello\\\"}\", System.Text.Encoding.UTF8, \"application/json\");\nvar resp = await client.SendAsync(req);\nConsole.WriteLine(await resp.Content.ReadAsStringAsync());","php":"<?php\n// Zero-install REST call — no SDK required (short-term the API is REST-only).\n$ch = curl_init(\"https://api.infrai.cc/v1/web/search\");\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    \"Authorization: Bearer \" . getenv(\"INFRAI_API_KEY\"),\n    \"Content-Type: application/json\",\n]);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"{\\\"query\\\": \\\"hello\\\"}\");\n$response = curl_exec($ch);\ncurl_close($ch);\necho $response;","ruby":"# Zero-install REST call — no SDK required (short-term the API is REST-only).\nrequire \"net/http\"\nrequire \"uri\"\n\nuri = URI(\"https://api.infrai.cc/v1/web/search\")\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\nreq = Net::HTTP::Post.new(uri)\nreq[\"Authorization\"] = \"Bearer #{ENV['INFRAI_API_KEY']}\"\nreq[\"Content-Type\"] = \"application/json\"\nreq.body = '{\"query\": \"hello\"}'\nres = http.request(req)\nputs res.body","rust":"// Zero-install REST call — no SDK required (short-term the API is REST-only). (uses the reqwest + tokio crates)\nuse std::env;\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let resp = reqwest::Client::new()\n        .post(\"https://api.infrai.cc/v1/web/search\")\n        .header(\"Authorization\", format!(\"Bearer {}\", env::var(\"INFRAI_API_KEY\")?))\n        .header(\"Content-Type\", \"application/json\")\n        .body(r#\"{\"query\": \"hello\"}\"#)\n        .send()\n        .await?;\n    println!(\"{}\", resp.text().await?);\n    Ok(())\n}","request":{"query":"hello"}}}],"standard_surfaces":[{"id":"openai-compatible","protocol":"openai","title":"OpenAI-compatible AI inference","summary":"AI inference (chat / embeddings / images / speech / transcription / moderation / models) in the exact OpenAI request/response format. Point any OpenAI client at base_url + your infrai key — no new SDK. Smart cross-vendor routing rides the `model` field (\"auto\" / \"cheapest\" / \"smartest\" or a pinned \"vendor/model\"); cost/vendor/model/cache come back in an extra top-level `infrai` object + X-Infrai-* headers.","base_url":{"western":"https://api.infrai.cc/v1","china":"https://api.cn.infrai.cc/v1"},"auth":"Authorization: Bearer <infrai_project_key>","docs_url":"https://docs.infrai.cc/en/openai-compatible","model_routing":{"auto":"Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.","cheapest":"Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.","smartest":"Flagship-tier model — same tier as `prefer: smartest`.","pinned":"any model id a verified vendor serves; \"vendor/model\" pins the vendor too","extra_body":["task","prefer","vendor","vendor_region","cache"]},"infrai_extension":{"response_field":"infrai","fields":["cost_usd","vendor","model","region","cache","request_id"],"headers":["X-Infrai-Request-Id","X-Infrai-Vendor","X-Infrai-Cost-Usd"]},"endpoints":[{"method":"POST","path":"/v1/chat/completions","capability":"ai.chat","summary":"Chat completions — text, vision and tool calls, with streaming.","params":{"type":"object","required":["messages"],"properties":{"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"messages":{"type":"array","description":"OpenAI chat messages: a list of {role, content}.","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"description":"String, or an OpenAI content-part array for multimodal input."}},"additionalProperties":true}},"temperature":{"type":"number"},"max_tokens":{"type":"integer"},"top_p":{"type":"number"},"stream":{"type":"boolean","description":"Server-Sent Events streaming when true."},"tools":{"type":"array","items":{"type":"object","additionalProperties":true}},"response_format":{"type":"object","additionalProperties":true}},"additionalProperties":true}},{"method":"POST","path":"/v1/embeddings","capability":"ai.embed","summary":"Text embeddings for search and RAG.","params":{"type":"object","required":["input"],"properties":{"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"input":{"description":"Text string or array of strings to embed.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"encoding_format":{"type":"string","enum":["float","base64"]},"dimensions":{"type":"integer"}},"additionalProperties":true}},{"method":"POST","path":"/v1/images/generations","capability":"ai.image","summary":"Image generation from a text prompt.","params":{"type":"object","required":["prompt"],"properties":{"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"prompt":{"type":"string","description":"Text prompt describing the image."},"n":{"type":"integer"},"size":{"type":"string","description":"Image size such as '1024x1024'."},"response_format":{"type":"string","enum":["url","b64_json"]}},"additionalProperties":true}},{"method":"POST","path":"/v1/moderations","capability":"ai.moderation","summary":"Classify whether content violates usage policy.","params":{"type":"object","required":["input"],"properties":{"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"input":{"description":"Text string or array of strings to moderate.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"additionalProperties":true}},{"method":"POST","path":"/v1/audio/speech","capability":"ai.tts","summary":"Text-to-speech — synthesize spoken audio (binary body).","params":{"type":"object","required":["input","voice"],"properties":{"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"input":{"type":"string","description":"The text to synthesize."},"voice":{"type":"string","description":"Voice id such as 'alloy'."},"response_format":{"type":"string","description":"Audio format such as 'mp3' or 'wav'."},"speed":{"type":"number"}},"additionalProperties":true}},{"method":"POST","path":"/v1/audio/transcriptions","capability":"ai.asr","summary":"Speech-to-text — transcribe an audio file (multipart or base64 JSON).","params":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file to transcribe when using multipart/form-data."},"model":{"description":"Model to use — either a routing MODE (infrai picks the model for you) or a concrete model id to pin. Modes: 'auto' — Default. Balanced routing across healthy vendors — same tier as `prefer: balanced`.; 'cheapest' — Cheapest healthy model that serves the task — same tier as `prefer: cheapest`.; 'smartest' — Flagship-tier model — same tier as `prefer: smartest`. To pin instead, pass any id a verified vendor serves ('gpt-4o-mini'), or 'vendor/model' ('dashscope/qwen-plus') to pin the vendor too — GET /v1/models returns the live servable set. Omitted or empty behaves as 'auto'.","anyOf":[{"type":"string","enum":["auto","cheapest","smartest"],"description":"Routing mode — infrai selects the model."},{"type":"string","description":"Concrete model id, or 'vendor/model' to also pin the vendor."}],"default":"auto","examples":["auto","cheapest","smartest","openai/gpt-4o-mini"]},"language":{"type":"string","description":"ISO-639-1 language hint."},"response_format":{"type":"string","enum":["json","text","srt","verbose_json","vtt"]}},"additionalProperties":true}},{"method":"GET","path":"/v1/models","capability":"ai.models.list","summary":"List every model a verified, routable vendor serves."},{"method":"GET","path":"/v1/models/{model}","capability":"ai.models.get","summary":"Retrieve one model's details (pricing, context, availability)."}],"note":"Parallel standard surface — NOT listed in `capabilities`. The retired custom /v1/ai/chat|embed|image|tts|asr|vision|moderation shapes are replaced by these OpenAI-standard endpoints."},{"id":"mcp","protocol":"mcp","title":"Model Context Protocol (MCP) server","summary":"Every public capability is exposed as an MCP tool (tools derived 1:1 from this manifest — each capability's params become the tool inputSchema). Connect any MCP client (Claude Desktop, Cursor, Cline, Windsurf) over local stdio (npx @infrai/mcp-server) or the hosted streamable-HTTP endpoint. Auth/wallet/idempotency/routing/billing run exactly as for a REST call.","protocol_version":"2025-06-18","auth":"Authorization: Bearer <infrai_project_key>","docs_url":"https://docs.infrai.cc/en/mcp","well_known":"/.well-known/mcp.json","transports":[{"type":"stdio","command":"npx","args":["-y","@infrai/mcp-server"],"note":"Local: add to the client's MCP config; key via INFRAI_API_KEY env."},{"type":"http","method":"POST","url":"https://api.infrai.cc/mcp","note":"Remote streamable-HTTP; single JSON-RPC response per POST."}],"methods":["initialize","tools/list","tools/call"],"tools_source":"capabilities (this manifest) — params == tool inputSchema","note":"Parallel standard surface — NOT listed in `capabilities`. The tool set IS the capability set; call GET /v1/discovery for the live tools."}],"flows":[{"id":"email_otp_login","module":"auth","name":"Email OTP login (passwordless · signup-on-first-login)","when":"Default for most apps. Lowest friction; verify is the login.","steps":[{"capability":"auth.email.send_code","body":{"email":null},"returns":"{sent}; dev → dev_code"},{"capability":"auth.email.verify","body":{"email":null,"code":null},"returns":"{verified, user_id, created, session_id, access_token, refresh_token, expires_at}","note":"verify == LOGIN. created=true means a new user was just registered. access_token is the session JWT."}]},{"id":"phone_otp_login","module":"auth","name":"Phone (SMS) OTP login (passwordless)","when":"Mobile / China-market apps.","steps":[{"capability":"auth.phone.send_code","body":{"phone":null},"returns":"{sent}; dev → dev_code"},{"capability":"auth.phone.verify","body":{"phone":null,"code":null},"returns":"{verified, user_id, created, session_id, access_token, refresh_token, expires_at}","note":"Same one-call login semantics as email."}]},{"id":"social_login","module":"auth","name":"Third-party login (Google/GitHub/Apple/Meta/X) · unified-brand transit","when":"One-tap social sign-in. infrai operates the provider OAuth apps (no BYOK).","steps":[{"capability":"auth.oauth.authorize_url","body":{"provider":null,"return_to":null},"returns":"{url, state}","note":"Open `url` in the browser. return_to is YOUR app callback (web URL or app deep link; loopback/custom-scheme allowed). After consent, infrai's transit 302s the session JWT back to return_to (#fragment for web, query for deep links)."}]},{"id":"password_signup","module":"auth","name":"Password signup WITH OTP email verification","when":"Apps that want classic email+password but must verify the email first.","steps":[{"capability":"auth.user.create","body":{"email":null,"password":null},"returns":"{user_id, email_verified:false}"},{"capability":"auth.email.send_code","body":{"email":null},"returns":"{sent}; dev → dev_code"},{"capability":"auth.email.verify","body":{"email":null,"code":null},"returns":"{verified, user_id, created:false, access_token, ...}","note":"Converges to the SAME user created in step 1 (created=false), sets email_verified, and logs in. Never creates a duplicate."}]},{"id":"password_login","module":"auth","name":"Password login (email + password)","when":"Returning user with a password.","steps":[{"capability":"auth.session.create","body":{"email":null,"password":null,"method":"password"},"returns":"{session_id, user_id, access_token, refresh_token, expires_at}","note":"argon2id verified. Unknown email and wrong password return the SAME AUTH_INVALID_CREDENTIALS (no account enumeration)."}]},{"id":"password_reset","module":"auth","name":"Password reset (code-style · no plaintext recovery)","when":"Forgot password. Reuses the same 'enter a code' UI as OTP login.","steps":[{"capability":"auth.password.reset_request","body":{"email":null},"returns":"{sent}; dev → dev_code","note":"Always returns sent=true (no user-existence leak)."},{"capability":"auth.password.reset_confirm","body":{"email":null,"code":null,"new_password":null},"returns":"{ok, sessions_revoked}","note":"Verifies the 6-digit code, re-hashes (argon2id), revokes ALL existing sessions. Passwords are never recoverable in plaintext — only reset."}]},{"id":"session_lifecycle","module":"auth","name":"Session lifecycle (refresh / logout / multi-device)","when":"Manage a logged-in user's sessions.","steps":[{"capability":"auth.session.refresh","body":{"refresh_token":null},"returns":"{access_token, refresh_token} (rotated)"},{"capability":"auth.session.list_for_user","body":{"user_id":null},"returns":"{sessions: [...]}","note":"user_id is a path param."},{"capability":"auth.session.revoke","body":{"session_id":null},"returns":"{revoked}","note":"session_id is a path param. revoke_all_for_user logs out every device."}]},{"id":"verify_session_offline","module":"auth","name":"Verify a session JWT offline (zero round-trip)","when":"Your backend validates the session on every request without calling infrai.","steps":[{"capability":"auth.token.jwks","body":{},"returns":"{keys: [{kty:OKP, crv:Ed25519, ...}]}","note":"Cache the JWKS; verify the EdDSA signature of access_token locally. iss=infrai-auth."}]},{"id":"email_send_and_track","module":"comm-email","name":"Send a transactional email and track delivery","when":"Default for receipts, password resets, notifications. The core email loop.","steps":[{"capability":"email.send","body":{"to":null,"from":null,"subject":null,"html":null},"returns":"{message_id, from_used, mode, accepted_recipients, suppressed_recipients}","note":"message_id is the handle for every follow-up. Suppressed recipients come back in suppressed_recipients (not delivered)."},{"capability":"email.get","body":{"id":null},"returns":"{message_id, state, per_recipient_state, counts, first_event_at, last_event_at}","note":"id is a path param. Poll for state (queued→sent→delivered/bounced)."},{"capability":"email.event.list","body":{"message_id":null},"returns":"{records:[{type, recipient, occurred_at}], total_count, next_cursor}","note":"Granular timeline: delivered/bounced/opened/clicked/complained. Use instead of get() when you need open/click analytics."}]},{"id":"email_domain_onboarding","module":"comm-email","name":"Add and verify a sender domain before sending","when":"One-time setup. You CANNOT send from a custom 'from' domain until this passes.","steps":[{"capability":"email.domain.verify","body":{"domain":null},"returns":"{domain, domain_id, status, dns_records, warm_up_state, daily_limit_current, daily_limit_target}","note":"Publish the returned dns_records (SPF/DKIM/DMARC) at your DNS host, then call again until status=verified."},{"capability":"email.domain.get","body":{"domain":null},"returns":"{verification:{status, dns_records}, reputation:{tier, current_daily_cap, used_today, bounce_rate_30d, throttle_risk}}","note":"After verified, respect reputation.current_daily_cap. This is a verified-domain daily cap, not an account-wide daily email limit; sending warms up gradually."}]},{"id":"email_template_send","module":"comm-email","name":"Create a template, preview it, then send by template_id","when":"Reusable transactional emails (welcome, OTP, receipt) with per-send variables.","steps":[{"capability":"email.template.create","body":{"name":null,"subject":null,"html":null,"variables":null},"returns":"{template_id, name, subject, html, variables, default_vars}"},{"capability":"email.template.preview","body":{"id":null,"vars":null},"returns":"{rendered_subject, rendered_html, rendered_text, missing_vars}","note":"Non-empty missing_vars means a variable was not supplied."},{"capability":"email.send","body":{"to":null,"from":null,"template_id":null,"template_vars":null},"returns":"{message_id, from_used, accepted_recipients}","note":"Use template_id + template_vars instead of subject/html, then track with email_send_and_track."}]},{"id":"sms_send_and_track","module":"sms","name":"Send an SMS and track delivery","when":"Default for notifications/alerts (non-OTP). The core SMS loop.","steps":[{"capability":"sms.send","body":{"to":null,"body":null,"from":null},"returns":"{message_id, state, vendor, segments, cost_usd, created_at}","note":"segments = billable message parts (long body = multiple); cost_usd is the per-send price. message_id chains into status/events/cancel/resend."},{"capability":"sms.status","body":{"id":null},"returns":"{message_id, state, vendor, attempt, last_event, delivered_at, failed_reason}","note":"id is a path param. On failure, failed_reason tells you why."},{"capability":"sms.events","body":{"id":null},"returns":"{items:[{type, occurred_at, detail}], next_cursor}","note":"Full event timeline when you need more than the latest status."}]},{"id":"sms_otp_verify","module":"sms","name":"Send and verify a one-time passcode (managed OTP)","when":"Phone verification / 2FA. Prefer this over sms.send — the gateway manages code generation, TTL, and attempt limits.","steps":[{"capability":"sms.otp","body":{"to":null,"template":null},"returns":"{request_id, sent}","note":"Do NOT include the code yourself; the gateway generates and stores it."},{"capability":"sms.verify","body":{"to":null,"code":null},"returns":"{verified}","note":"Submit the user-entered code. Expired / exhausted attempts fail closed."}]},{"id":"sms_china_signature_setup","module":"sms","name":"Register a signature + template for China delivery","when":"REQUIRED before any SMS to China. CN carriers reject unsigned/untemplated messages.","steps":[{"capability":"sms.signature.create","body":{"name":null,"type":null,"proof_url":null},"returns":"{signature_id, text, type, review_state, reject_reason, vendor}","note":"review_state starts pending; CN carrier review can take time."},{"capability":"sms.template.create","body":{"name":null,"body":null,"locale":null,"variables":null},"returns":"{template_id, name, body, locale, variables, review_state}","note":"CN sends must use an approved template_id, not inline body. Wait for review_state=approved."},{"capability":"sms.send","body":{"to":null,"template_id":null,"template_vars":null,"from":null},"returns":"{message_id, state, segments, cost_usd}","note":"Reference the approved signature + template_id, then track with sms_send_and_track."}]},{"id":"tts_select_voice_then_speak","module":"ai-runtime","name":"Pick a voice (per vendor) then synthesize speech","when":"Choosing a NON-default TTS voice. Voices are vendor-specific — a voice only works with its OWN vendor's model — so list the catalog first and keep voice+model on the same vendor.","steps":[{"capability":"ai.tts.voices","body":{},"returns":"{items:[{vendor, voice_id, name, is_default, model}], count}","note":"GET returns the full catalog for the currently keyed/servable TTS vendors on this deployment; filter with ?vendor= for one vendor. Each voice is tagged with its `vendor` AND the `model` to use it with. Coherence rule: the voice you pick and the model in the next step MUST be the same vendor — pass that voice's `model` through."},{"endpoint":"POST /v1/audio/speech","body":{"vendor":null,"model":null,"voice":null,"input":null,"response_format":null},"returns":"binary audio bytes (Content-Type audio/*; mp3 default)","note":"OpenAI-compatible TTS (drop-in: point any OpenAI SDK at api.infrai.cc). For a non-default voice, explicitly pass `vendor` + `voice`, and set `model` to the picked voice's `model` from the catalog. Omit vendor/voice → vendor default. `model:'auto'` lets infrai pick the vendor, so do NOT pair it with a vendor-specific voice."}]},{"id":"ai_batch_submit_poll_fetch","module":"ai-runtime","name":"Batch AI requests (async submit → poll → page results)","when":"Run many chat/embed requests at cost pass-through (no markup). Async; poll then page.","steps":[{"capability":"ai.batch.submit","body":{"requests":null,"batch_timeout":null,"metadata":null,"store":null},"returns":"{batch_id, state, total_count, estimated_eta, estimated_cost_usd}","note":"state starts connecting|queued."},{"capability":"ai.batch.status","body":{},"returns":"{batch_id, state, progress, completed_count, failed_count, total_cost_usd}","note":"id is a path param. Poll until state=completed/partial (or failed/expired/cancelled); partial is terminal and results include per-item errors."},{"capability":"ai.batch.results","body":{},"returns":"{items:[{request_index, ok, result, error}], total_count, next_cursor, download_url}","note":"id is a path param. Page with next_cursor; check ok per item."}]},{"id":"video_generate_poll_fetch","module":"ai-video","name":"Generate a video (async submit → poll → fetch URL)","when":"Any text/image-to-video. Generation is async; you MUST poll (or use webhook_url) — the result is not returned inline.","steps":[{"capability":"video.generate","body":{"prompt":null,"model":null,"resolution":null,"duration_seconds":null,"aspect_ratio":null,"store":null,"webhook_url":null},"returns":"{job_id, state, model, vendor, video_url (null until done), cost_usd, created_at}","note":"Pass webhook_url to be called on completion instead of polling. store:true retains the asset so video.list/get/delete can see it (default false = inline-only)."},{"capability":"video.status","body":{},"returns":"{job_id, state, progress_pct, eta_seconds, current_step}","note":"id is a path param. Poll until state=succeeded (or failed/cancelled/expired)."},{"capability":"video.get","body":{},"returns":"{job_id, state, video_url, thumbnail_url, duration_seconds, vendor, model, cost_usd, finished_at}","note":"id is a path param. Call once state=succeeded to read video_url. For an expiring CDN link use video.download_url."}]},{"id":"video_select_then_generate","module":"ai-video","name":"Check provider capabilities before generating","when":"Before requesting 1080p/4k or long durations — resolutions are gated per-vendor and an unsupported combo fails.","steps":[{"capability":"video.capabilities","body":{},"returns":"{providers:[{model, vendor, resolutions, max_duration_seconds, supports_extend, supports_upscale}]}","note":"Pick a vendor/model that supports your resolution+duration, then pin it via vendor/model in video.generate."},{"capability":"video.generate","body":{"prompt":null,"vendor":null,"model":null,"resolution":null,"duration_seconds":null},"returns":"{job_id, state, ...}","note":"Continue with the video_generate_poll_fetch flow."}]},{"id":"image_upload_process_deliver","module":"image-process","name":"Upload → transform → deliver an image","when":"When you need a persistent asset (image_id/url) to process and re-fetch later, not a one-shot inline transform.","steps":[{"capability":"image.upload","body":{"file":null,"filename":null,"idempotency_key":null},"returns":"{image_id, url, format, width, height, size_bytes}","note":"Stores the source so later ops/reads can reference it by image_id."},{"capability":"image.process","body":{"image":null,"ops":null,"format":null,"store":null},"returns":"{image_id, url, format, width, height, size_bytes, ops_applied, cost_usd}","note":"ops is an ordered pipeline (resize/crop/watermark/...), re-encoded once at the end. store:true for a retained image_id."},{"capability":"image.get","body":{},"returns":"{image_id, url, format, width, height, size_bytes}","note":"id is a path param. Read the stored asset's delivery URL + metadata."}]},{"id":"image_batch_submit_poll","module":"image-process","name":"Batch image processing (async submit → poll → read items)","when":"Process many images in one job; optionally get a webhook callback on completion.","steps":[{"capability":"image.batch.submit","body":{"items":null,"webhook_url":null,"idempotency_key":null,"store":null},"returns":"{job_id, status, total_count}","note":"status starts queued."},{"capability":"image.batch.status","body":{},"returns":"{job_id, status, items:[ProcessedImage|error]}","note":"id is a path param. Poll until status=completed. With webhook_url you can skip polling."}]},{"id":"pdf_generate_then_store","module":"pdf","name":"Generate a PDF from HTML/Markdown/template","when":"Produce invoices/reports/letters. Default is inline-only; opt into storage to fetch the link later.","steps":[{"capability":"pdf.generate","body":{"html_or_markdown_or_template_id":null,"vars":null,"page_size":null,"orientation":null,"store":null},"returns":"{pdf_id, url, size_bytes, page_count, created_at, retention_days, source}","note":"Provide exactly one source: html | markdown | template_html | (template_id + vars). store:true so pdf.list/get/delete see it; default false returns the PDF inline and keeps nothing."}]},{"id":"pdf_parse_for_rag","module":"pdf","name":"Parse a PDF for RAG ingestion","when":"Extract clean text + structure from a PDF to feed embeddings/vector search.","steps":[{"capability":"pdf.parse","body":{"pdf_id_or_source":null},"returns":"{pdf_id, text_per_page, outline, metadata, language}","note":"Read-only. text_per_page is page-aligned text for chunking; outline gives section structure. For scanned/image PDFs use pdf.ocr instead."}]},{"id":"pdf_async_job","module":"pdf","name":"Track an async PDF job","when":"When a PDF op runs asynchronously and returns a job handle instead of a PdfDocument.","steps":[{"capability":"pdf.job.get","body":{},"returns":"{job_id, status, result, error}","note":"job_id is a path param. Poll until status=completed; result then holds the PdfDocument."}]},{"id":"storage_browser_direct_upload","module":"storage","name":"Browser direct upload via presigned URL","when":"A web/app client must upload a file straight to storage without proxying bytes through your server.","steps":[{"capability":"storage.object.presign","body":{"op":"put","expires_seconds":null,"content_type":null,"max_bytes":null},"returns":"{url, method, headers, fields, expires_at, max_bytes}","note":"Client must PUT to url using the returned method and echo every header/field; max_bytes caps the upload."},{"capability":"storage.object.head","body":{},"returns":"{found, size_bytes, etag, content_type, last_modified}","note":"Call after the client PUT to confirm the object landed (found=true)."}]},{"id":"storage_object_lifecycle","module":"storage","name":"Server-side object lifecycle","when":"Your server owns the bytes and you need put → list → download → delete.","steps":[{"capability":"storage.object.put","body":{"content_type":null,"metadata":null},"returns":"{bucket_id, key, size_bytes, etag, content_type}","note":"Raw bytes are the request body; key comes from the path."},{"capability":"storage.object.list","body":{"prefix":null,"delimiter":null,"cursor":null},"returns":"{objects[], next_cursor}","note":"Page with cursor; use prefix to scope a folder."},{"capability":"storage.object.delete","body":{},"returns":"{deleted}","note":"Idempotent; safe to retry."}]},{"id":"storage_large_file_multipart","module":"storage","name":"Large-file multipart upload","when":"Files too large for a single PUT (multi-GB), uploaded in parts.","steps":[{"capability":"storage.multipart.create","body":{"key":null,"content_type":null},"returns":"{upload_id, bucket_id, key, part_size_min, part_count_max}"},{"capability":"storage.multipart.presign_part","body":{},"returns":"{url, method, headers, expires_at}","note":"One presigned URL per part_number; client PUTs each part to its url."},{"capability":"storage.multipart.complete","body":{"parts":null},"returns":"{bucket_id, key, size_bytes, etag}","note":"Pass each part's number + etag to assemble the final object."}]},{"id":"db_provision_and_branch","module":"db","name":"Provision a managed database and branch it","when":"Create a Postgres project, then cut an isolated branch for preview/CI.","steps":[{"capability":"db.project.create","body":{"name":null,"vendor":null,"region":null,"plan":null,"postgres_version":null},"returns":"{db_id, name, vendor, region, plan, state, primary_branch}","note":"state must reach a ready value before the DB is usable."},{"capability":"db.branch.create","body":{"project_id":null,"branch_name":null,"from_branch":null},"returns":"{db_id, branch_name, parent, state}","note":"Copy-on-write branch off primary_branch for previews/tests."}]},{"id":"vector_rag_ingest_and_search","module":"vector","name":"Build a RAG index (create → upsert → query)","when":"Index document chunks for semantic search, then retrieve top-k for a prompt. Pair with ai.embed (OpenAI-compatible /v1/embeddings).","steps":[{"capability":"vector.collection.create","body":{"collection":null,"dimension":null,"metric":null},"returns":"{collection, dimension, metric, vector_count}","note":"dimension must equal your embedding model's size (e.g. 1536); metric default cosine."},{"capability":"vector.upsert","body":{"collection":null,"vectors":null},"returns":"{upserted_count}","note":"Each vector = {id, embedding, metadata}; embedding length must equal collection dimension."},{"capability":"vector.query","body":{"collection":null,"embedding":null,"top_k":null,"filter":null,"include_metadata":null},"returns":"{matches:[{id, score, metadata}]}","note":"Returns top_k nearest neighbors with similarity scores; filter does exact-match on metadata keys."}]},{"id":"captcha_protect_form","module":"captcha","name":"Protect a form with CAPTCHA (create widget → render → verify)","when":"Sign-up / login / contact forms that need bot protection without requiring a separate vendor account or dashboard workflow.","steps":[{"capability":"captcha.widget.create","body":{"name":null,"domains":null,"widget_mode":null},"returns":"{widget_record_id, vendor, sitekey, embed_url, embed_snippet, status}","note":"Call once from your server. Infrai provisions and stores the vendor secret; send only the returned public sitekey/widget_record_id to the browser."},{"capability":"captcha.verify","body":{"widget_record_id":null,"token":null,"ip":null,"action":null,"score_threshold":null,"expected_hostname":null},"returns":"{success, score, hostname, action, challenge_ts, reasons}","note":"Call server-side on form submit with the same widget_record_id. Bind action and expected_hostname; reject unless success=true."}]},{"id":"dns_bind_domain_and_point","module":"dns","name":"Bind a custom domain and point it at your app","when":"Custom-domain onboarding. Create the managed zone, set the registrar's name servers, create records, then verify delegation.","steps":[{"capability":"dns.domain.add","body":{"domain":null,"vendor":null},"returns":"{zone_id, domain, state, name_servers}","note":"Show name_servers to the user — they must set these at their registrar. This is zone binding, NOT domain registration."},{"capability":"dns.record.create","body":{"zone_id":null,"record_type":null,"name":null,"content":null,"ttl":null,"proxied":null},"returns":"{record_id, zone_id, record_type, name, content, ttl, priority, proxied}","note":"e.g. record_type=CNAME name=www content=your-app.example.net."},{"capability":"dns.domain.verify","body":{"domain":null,"zone_id":null},"returns":"{zone_id, domain, state, name_servers}","note":"sticky_resource — must hit the same vendor/zone. Poll until state=active to confirm NS delegation."}]},{"id":"rtc_join_room","module":"rtc","name":"Create a live audio/video room and let a participant join","when":"Video call / live audio / huddle. Create the room once, mint one join token per participant.","steps":[{"capability":"rtc.room.create","body":{"name":null,"max_participants":null,"empty_timeout_s":null,"vendor":null},"returns":"{room_id, name, vendor, state, max_participants, num_participants}"},{"capability":"rtc.token.issue","body":{"room":null,"identity":null,"display_name":null,"ttl_s":null,"can_publish":null,"can_subscribe":null},"returns":"{token, room, identity, vendor, expires_at, ws_url}","note":"Mint one token per participant identity. Client connects to ws_url with token. can_publish=false for view-only (audience)."},{"capability":"rtc.participant.list","body":{"room":null},"returns":"[{identity, joined_at, state, is_publisher, display_name}]","note":"Poll for live occupancy; use rtc.participant.kick to moderate."}]},{"id":"realtime_presence_channel","module":"realtime","name":"Presence channel — authorize client, publish, and read who's online","when":"Live chat / collaborative cursors / 'who's here'. Issue a client token, publish events server-side, read the roster.","steps":[{"capability":"realtime.channel.create","body":{"channel":null,"type":null,"vendor":null},"returns":"{channel_id, name, type, vendor, member_count}","note":"type=presence for an online roster, private for auth-gated, public otherwise."},{"capability":"realtime.token.issue","body":{"client_id":null,"channels":null,"capabilities":null,"ttl_s":null},"returns":"{token, expires_at, vendor}","note":"Mint a scoped, time-limited client token bound to client_id; hand it to the browser/mobile SDK to connect to the presence channel."},{"capability":"realtime.publish","body":{"channel":null,"event":null,"data":null},"returns":"{event_id, channel, published_at, vendor}","note":"Server-side fan-out. Use realtime.publish.batch for multi-channel."},{"capability":"realtime.presence.get","body":{"channel":null},"returns":"{channel, members, next_cursor}","note":"Current online roster. Use realtime.user.disconnect on ban/logout."}]},{"id":"account_onboarding","module":"account-billing","name":"Onboard a new account (identity → key → fund)","when":"First-run setup: confirm who you are, mint a key, add funds.","steps":[{"capability":"account.whoami","body":{},"returns":"{account_id, account_kind, email, tier, current_project_key_id}","note":"Start here. account_kind tells you if this is an unbound device account vs a bound (email/OAuth) account. One account is one project space — isolate apps/environments with separate keys."},{"capability":"account.keys.create","body":{"name":null},"returns":"{key_id, key_secret, status}","note":"key_secret is shown ONLY ONCE — store it now. Mint a separate key per app/env to isolate usage and blast radius."},{"capability":"account.topup","body":{"amount_usd":null,"currency":null},"returns":"{topup_id, checkout_url, checkout_mode, status}","note":"Open checkout_url to pay, then poll account.topup.status with topup_id to confirm the credit."}]},{"id":"account_topup","module":"account-billing","name":"Top up the wallet (create session → pay → confirm credit)","when":"Add prepaid funds. Hosted Stripe checkout; poll the top-up session until the wallet credit lands.","steps":[{"capability":"account.topup","body":{"amount_usd":null,"currency":null},"returns":"{topup_id, checkout_url, checkout_mode, status}","note":"status starts pending. Open checkout_url, then pass topup_id to the status call."},{"capability":"account.topup.status","body":{"topup_id":null},"returns":"{topup_id, status, amount_usd, currency, paid_at}","note":"Poll while status is pending. paid confirms that the wallet credit has posted; failed ends the flow."}]},{"id":"account_webhook_setup","module":"account-billing","name":"Register a webhook (register → test → handle signed events)","when":"Receive async events (top-up completed, payment failed, key compromised) instead of polling.","steps":[{"capability":"account.webhooks.register","body":{"url":null,"events":null},"returns":"{webhook_id, secret, active}","note":"secret is returned ONLY ONCE — store it to verify signatures. url must be public HTTPS (SSRF-validated)."},{"capability":"account.webhooks.test","body":{"id":null},"returns":"{delivered, response_status}","note":"Confirm your endpoint is reachable before relying on it."},{"capability":"account.webhooks.deliveries","body":{"id":null},"returns":"{items:[{delivery_id, event, response_status, attempts}], next_cursor}","note":"Inspect delivery history. Use account.webhooks.retry to re-send a failed one. Verify each payload's signature with the stored secret."}]},{"id":"error_triage","module":"observability","name":"Capture and triage an error (capture → inspect group → resolve)","when":"Report a runtime error, find its aggregated group, and close it out.","steps":[{"capability":"errors.capture","body":{"message":null,"exception":null,"fingerprint":null,"environment":null,"release":null},"returns":"{event_id, fingerprint, error_group_id, is_new_group, dashboard_url}","note":"Errors aggregate into a group by fingerprint. is_new_group=true means a regression; dashboard_url links to the UI."},{"capability":"errors.group_detail","body":{"error_group_id":null},"returns":"{error_group_id, title, count, first_seen, last_seen, status}","note":"Get the aggregated group to see frequency and trend before acting."},{"capability":"errors.resolve","body":{"error_group_id":null},"returns":"{ok}","note":"Mark resolved once fixed. If it recurs, the group auto-unresolves (or use errors.unresolve)."}]},{"id":"cron_lifecycle","module":"scheduling","name":"Schedule a recurring job (create → inspect runs → pause)","when":"Run a job on a schedule and manage its run history. For a one-time job, pass run_at instead of cron_expr in step 1.","steps":[{"capability":"cron.create","body":{"name":null,"cron_expr":null,"task":null,"payload":null,"timezone":null,"overlap_policy":null,"run_at":null},"returns":"{job_id, status, next_run_at}","note":"Recurring: set cron_expr. One-shot: set run_at instead (fires once). next_run_at confirms the schedule is live."},{"capability":"cron.runs.list","body":{"id":null},"returns":"{items:[{run_id, status, fired_at, duration_ms, http_status, error}], next_cursor}","note":"id is a path param. Audit executions; cron.runs.get for one run's full output."},{"capability":"cron.pause","body":{"id":null},"returns":"{status}","note":"Halt future triggers without deleting. cron.resume re-enables; cron.trigger fires an immediate manual run."}]},{"id":"queue_worker","module":"scheduling","name":"Process a message queue (create → publish → consume → ack/DLQ)","when":"Decouple producers and workers with at-least-once delivery and dead-letter handling.","steps":[{"capability":"queue.create","body":{"name":null,"type":null,"dlq":null},"returns":"{name, type, account_id, visibility_timeout_default}","note":"type=standard or fifo. Configure a DLQ to capture poison messages."},{"capability":"queue.publish","body":{"queue":null,"body":null},"returns":"{message_id, status}","note":"Use queue.publish_batch for many at once."},{"capability":"queue.consume","body":{"queue":null,"max_messages":null},"returns":"{items:[{message_id, body, receipt_handle, receive_count}], next_cursor}","note":"Messages become invisible for the visibility timeout. Process, then ack or nack each by receipt_handle."},{"capability":"queue.ack","body":{"queue":null,"receipt_handle":null},"returns":"{acked}","note":"ack removes the message. On failure call queue.nack; recover DLQ messages later with queue.dlq.redrive."}]}],"decision_guides":{"auth":{"title":"Choosing a login mode (pick by app type)","default":"email_otp_login","rules":[{"when":"Most consumer apps (mobile/web), lowest friction, fastest conversion","recommend":["email_otp_login","phone_otp_login","social_login"],"why":"Passwordless: no password to store/reset; verify == login in ONE call; new user auto-registers. Add social for one-tap."},{"when":"Social-first / B2C web where users expect 'Sign in with Google/Apple'","recommend":["social_login","email_otp_login"],"why":"Unified-brand OAuth transit (infrai hosts the provider apps, NO BYOK); session returns to YOUR return_to. OTP as fallback."},{"when":"Tools / dashboards / apps that specifically want a classic password","recommend":["password_signup","password_login","password_reset"],"why":"Email+password, but verify the email via OTP before the account is usable. Reset is code-style (no plaintext recovery)."},{"when":"China-market apps","recommend":["phone_otp_login","social_login"],"why":"Phone OTP is the dominant CN pattern; social via WeChat/Alipay (when configured)."},{"when":"Enterprise / B2B","recommend":["social_login"],"why":"OAuth now; SSO/SAML is Phase-5. Password optional via password_signup."}],"notes":["verify == login: auth.email.verify / auth.phone.verify return the user + a session; a new email/phone auto-registers (created=true).","Always offline-verify the session JWT with auth.token.jwks (zero round-trip) — see the verify_session flow.","OTP codes are dev-echoed as data.dev_code only when INFRAI_OTP_DEV_ECHO=1; in production they are delivered by email/SMS."]},"comm-email":{"title":"Choosing how to send email (inline, template, batch, domain)","default":"email_send_and_track","rules":[{"when":"One-off transactional email with content built at call time","recommend":["email.send"],"why":"Pass inline subject + html. `from` is optional: omit it to use Infrai's default sender; pass a verified custom-domain address to send from your own domain. Returns message_id; track with email_send_and_track."},{"when":"Reusable email (welcome, receipt, OTP) with per-send variables","recommend":["email_template_send"],"why":"Create once with email.template.create, send by template_id + template_vars. Preview catches missing_vars before go-live."},{"when":"Sending from your own domain (custom 'from' address)","recommend":["email_domain_onboarding"],"why":"Verify the domain first, then call email.send with a custom `from` address on that domain. The gateway auto-selects the verified-domain path from `from`; callers do not need a separate mode flag. Publish the returned dns_records (SPF/DKIM/DMARC)."},{"when":"Many personalized emails in one shot (<=100)","recommend":["email.batch.send"],"why":"One idempotency_key, batch passthrough. Returns per-message results."},{"when":"Need to know if a message was delivered/opened/bounced","recommend":["email.get","email.event.list"],"why":"No push webhooks for email yet — poll. email.get for latest state; email.event.list for the open/click/bounce timeline."}],"notes":["message_id from email.send is the handle for email.get / email.cancel / event filtering.","Recipients already on the suppression list come back in suppressed_recipients (not delivered) — check email.suppression.check first for bulk."]},"sms":{"title":"Choosing the right SMS path (OTP vs raw send, region)","default":"sms_send_and_track","rules":[{"when":"Phone verification / 2FA codes","recommend":["sms_otp_verify"],"why":"Use sms.otp + sms.verify, NOT sms.send. The gateway generates the code and manages TTL + attempt limits — never build OTP on raw send."},{"when":"Notifications, alerts, reminders (non-OTP)","recommend":["sms_send_and_track"],"why":"sms.send with inline body. Watch segments (billing) and failed_reason on status."},{"when":"Sending to China","recommend":["sms_china_signature_setup"],"why":"CN carriers REQUIRE a reviewed signature + approved template. Bare sms.send to CN is rejected. Pre-register both; wait for review_state=approved."}],"notes":["message_id from sms.send chains into sms.status / sms.events / sms.cancel / sms.resend."]},"ai-runtime":{"title":"Choosing the right AI-runtime call","default":"OpenAI-compatible /v1/chat/completions for chat","rules":[{"when":"You need chat, embeddings, image generation, TTS, ASR, vision, or moderation","recommend":["/v1/chat/completions","/v1/embeddings","/v1/images/generations","/v1/audio/speech","/v1/audio/transcriptions"],"why":"Served OpenAI-compatible (drop-in: point any OpenAI SDK at api.infrai.cc, stream with stream:true). The native ai.* discovery surface only covers batch/cost/rerank/tokens/voices/upscale — chat/embed/tts/asr are NOT separate native routes."},{"when":"Many requests, latency-tolerant, cost-sensitive","recommend":["ai_batch_submit_poll_fetch"],"why":"ai.batch.* is billed at cost pass-through with NO markup. Async submit->poll->page. Use for backfills/evals, not interactive."},{"when":"Re-rank retrieval candidates for RAG","recommend":["ai.rerank"],"why":"Returns {ranked:[{index, score}]} — reorder YOUR candidate list by the returned original indices."},{"when":"Know the price/token count before committing a call","recommend":["ai.cost.estimate","ai.cost.compare","ai.tokens.count"],"why":"estimate = one model itemized; compare = same request across models; tokens.count = input tokens only. A differentiator OpenAI/Anthropic don't offer."}]},"ai-video":{"title":"Generating video: vendor, resolution, sync model","default":"model=auto, resolution=720p, poll video.status","rules":[{"when":"You don't care which vendor, just want good value","recommend":["model=auto"],"why":"Auto-routes to best value. model=cheapest to minimize cost, model=smartest for top quality. Pin a specific model id only when you need a specific provider."},{"when":"You need 1080p/4k or a long duration","recommend":["video_select_then_generate"],"why":"Resolution is gated per-vendor (720p/1080p/4k) and duration is capped (1-60s, vendor-specific). Check video.capabilities before generate or the combo can fail."},{"when":"You can't keep a polling loop open","recommend":["webhook_url on video.generate"],"why":"Declares an async completion callback so you skip polling video.status entirely."},{"when":"You'll fetch the video later or list past jobs","recommend":["store=true"],"why":"Default store=false is inline-only — video.list/get/delete won't see the job. store=true retains it (with a retention TTL + storage line item)."}]},"image-process":{"title":"Choosing an image operation","default":"image.process pipeline, store=false (inline)","rules":[{"when":"Multiple edits on one image (resize + watermark + convert)","recommend":["image.process"],"why":"One ordered ops pipeline, re-encoded once at the end — cheaper and lossless-intermediate vs chaining single ops."},{"when":"Fit content intelligently to an aspect ratio (thumbnails, social crops)","recommend":["image.smart_crop"],"why":"Saliency/face-aware. Use image.crop only for an exact rectangle, image.resize for fit-mode scaling."},{"when":"Shrink for web delivery","recommend":["image.compress","image.convert"],"why":"compress targets a quality or byte size; convert re-encodes to webp/avif. Combine in image.process for best size."},{"when":"You'll re-fetch or deliver the asset later","recommend":["image_upload_process_deliver"],"why":"image.upload + image.process store=true persists an image_id/url usable by image.get/list/delete; default stateless passthrough keeps nothing."},{"when":"Read content from an image, not edit it","recommend":["image.ocr","image.tag","image.moderate","image.metadata"],"why":"Read-only analysis. image.ocr != pdf.ocr. To GENERATE a new image use OpenAI-compatible /v1/images/generations (not image.*)."}]},"pdf":{"title":"Generating and reading PDFs","default":"pdf.generate from HTML, store=false","rules":[{"when":"One-off document from markup","recommend":["pdf_generate_then_store"],"why":"Inline HTML or Markdown -> PDF. Provide exactly one source: html | markdown | template_html | (template_id + vars)."},{"when":"The same layout rendered repeatedly with data (invoices, certificates)","recommend":["pdf.template.create","pdf.generate"],"why":"Register the HTML template once; render per-request with template_id + vars. Cleaner than re-sending HTML each call."},{"when":"You'll email/download the PDF later","recommend":["store=true"],"why":"Default store=false returns the PDF inline and keeps nothing; store=true persists it so pdf.list/get/delete can fetch it."},{"when":"Ingest a PDF for RAG / search","recommend":["pdf_parse_for_rag"],"why":"pdf.parse returns text_per_page + outline (read-only, cheaper — try first); pdf.ocr handles scanned/image pages returning text_per_page + confidence."}]},"storage":{"title":"Uploading and serving objects (presign vs put, public vs private)","default":"storage_browser_direct_upload","rules":[{"when":"The browser/mobile client holds the bytes (file picker, drag-drop)","recommend":["storage_browser_direct_upload"],"why":"Upload goes client -> vendor directly; your server never proxies bytes. Platform CORS is configured by an administrator."},{"when":"Your backend already has the bytes (generated/processed server-side)","recommend":["storage.object.put"],"why":"Single authenticated call with raw bytes as the body; no CORS or round-trip needed."},{"when":"File is multi-GB or uploaded in chunks/resumable","recommend":["storage_large_file_multipart"],"why":"Single PUT and one-shot presign have size ceilings; multipart parallelizes and resumes."},{"when":"Asset is user-private or sensitive (invoices, PII, paid content)","recommend":["storage.object.presign"],"why":"Keep ACL private and hand out short-lived presigned download URLs (op=get) so links expire."},{"when":"Asset is a public static file (avatars, public images)","recommend":["storage.object.set_acl"],"why":"Set ACL public once and serve the stable public URL; no per-request presign overhead."}],"notes":["Presigned-URL TTL: use a small expires_seconds (300-900s) for an immediate browser upload; longer for an emailed download link, but never permanent for private data — rotate by re-presigning."]},"db":{"title":"Choosing a database vendor and plan","default":"db_provision_and_branch","rules":[{"when":"You need cheap copy-on-write branches for previews/CI","recommend":["db_provision_and_branch"],"why":"Pick a branch-native Postgres (Neon-style); set region near your app and the smallest plan that fits. db.branch.create cuts an isolated branch."},{"when":"Data residency or latency matters","recommend":["db.project.create"],"why":"Set region explicitly at create time; it is fixed for the project's lifetime."}],"notes":["Phase-1 db is control-plane (provision/branch/snapshot). The connection-string + data-plane (query/migration) are a known roadmap gap — see docs/GEO_API_REVIEW_2026-06-17.md."]},"vector":{"title":"Building a vector index (metric, dimension)","default":"vector_rag_ingest_and_search","rules":[{"when":"Using OpenAI / most modern text embeddings (normalized vectors)","recommend":["metric=cosine"],"why":"cosine matches how these models are trained and is the safe default."},{"when":"Embeddings are raw inner-product / not normalized","recommend":["metric=dotproduct"],"why":"Use dotproduct so similarity reflects magnitude as the model intends."},{"when":"Embeddings live in a true geometric space and absolute distance matters","recommend":["metric=euclidean"],"why":"Use euclidean (L2) for spatial/geo-style embeddings."}],"notes":["dimension MUST equal your embedding model's size (text-embedding-3-small/ada-002 = 1536; -3-large = 3072) and is fixed at collection-create time — upsert/query with a different length is rejected."]},"captcha":{"title":"Protecting a form entirely through Infrai","default":"captcha_protect_form","rules":[{"when":"Frictionless protection — most sign-up / login / contact forms","recommend":["widget_mode=managed","score_threshold=0.5"],"why":"Create the widget through Infrai, render the returned sitekey, then verify every token against that widget ID."},{"when":"High-fraud UX needs stricter gating","recommend":["score_threshold=0.7","expected_hostname=<your-domain>"],"why":"Raise the threshold and pin expected_hostname so a token minted for another origin can never pass."}]},"dns":{"title":"Choosing a DNS record type","default":"A record, ttl=300, proxied=false","rules":[{"when":"Point a hostname at an IPv4 / IPv6 address","recommend":["record_type=A","record_type=AAAA"],"why":"Direct address mapping. proxied=true (Cloudflare A/AAAA/CNAME only) routes through the CDN/WAF."},{"when":"Point a hostname at another hostname (SaaS / app target)","recommend":["record_type=CNAME"],"why":"Alias to a target domain. Cannot be used at the zone apex (use an A record there)."},{"when":"Email routing or domain verification","recommend":["record_type=MX","record_type=TXT"],"why":"MX needs priority (lower = preferred). TXT carries SPF/DKIM/DMARC and ownership tokens."}]},"risk":{"title":"Choosing a risk event_type and acting on the disposition","default":"event_type=login, act on disposition","rules":[{"when":"Account-takeover / credential-stuffing defense","recommend":["event_type=login"],"why":"Pass ip + device_fingerprint + email; gate session creation on disposition (accept/review/reject)."},{"when":"Payment / checkout fraud","recommend":["event_type=payment"],"why":"Include amount + currency so the vendor weights monetary risk. reject -> block, review -> step-up (3DS/MFA)."},{"when":"Signup abuse / fake accounts","recommend":["event_type=signup"],"why":"Catches disposable emails and bot rings at registration. Feed outcomes back with risk.event.report to improve future scoring."}]},"rtc":{"title":"Choosing an RTC room shape and participant permissions","default":"rtc_join_room","rules":[{"when":"Voice-only huddle / audio room","recommend":["rtc.room.create","rtc.token.issue"],"why":"Same room object; clients simply don't publish video tracks. No separate audio-room type needed."},{"when":"Webinar / livestream (few speakers, many viewers)","recommend":["can_publish=true for hosts","can_publish=false can_subscribe=true for audience"],"why":"Per-token grants make a participant a publisher (host) or view-only (audience). Cheaper egress for the audience majority."},{"when":"You want a persistent, queryable room object","recommend":["vendor=livekit"],"why":"Agora/Zego have no persistent room — the record is synthesized on first join."}]},"realtime":{"title":"Choosing a realtime channel type and token style","default":"realtime_presence_channel","rules":[{"when":"Broadcast / public feed anyone may subscribe to","recommend":["type=public"],"why":"No per-client auth needed to subscribe; cheapest path."},{"when":"Auth-gated channel (per-user or per-room data)","recommend":["type=private","realtime.token.issue"],"why":"Subscriber must present a token bound to client_id. Use realtime.token.issue to mint a scoped client token before connecting."},{"when":"You need a live online roster (who's here / cursors)","recommend":["type=presence","realtime.presence.get"],"why":"Presence channels track member identity; presence.get returns the live roster."},{"when":"Issuing a client connection token","recommend":["realtime.token.issue"],"why":"token.issue mints a scoped, time-limited client token verified at the infrai gateway — hand it to the browser/mobile SDK to connect."}]},"account-billing":{"title":"Funding, keys, and plan choices for an integration","default":"account_onboarding","rules":[{"when":"Pay-as-you-go, occasional or spiky usage, no commitment","recommend":["account.topup","account.balance","account.budget.set"],"why":"Prepaid wallet top-ups charge only for what you use. Pair with account.budget.set as a hard cap to prevent runaway spend."},{"when":"Steady usage and you want it to never run dry / unattended workloads","recommend":["account.autorecharge.configure","account.payment_method.set_default"],"why":"Auto-recharge refills when the balance crosses a trigger (needs a saved default payment method). Note: a budget hard-cap can still block billable calls even with auto-recharge on."},{"when":"You want bundled entitlements, higher rate limits, or team features","recommend":["account.tier.upgrade","account.subscription.get"],"why":"Tier upgrade is a recurring subscription with quota/feature entitlements — distinct from the pay-per-use wallet. upgrade returns requires_checkout + checkout_url when payment is needed."},{"when":"Multiple apps/environments under one account","recommend":["account.keys.create"],"why":"One account IS one project space; isolate each app/env with its own key. Mint a separate key per app/env to separate usage, rate limits, and blast radius. (Team access is shared via account.members.*.)"},{"when":"A key may be leaked","recommend":["account.keys.suspected_compromise","account.keys.rotate"],"why":"suspected_compromise revokes immediately and reissues; rotate keeps the old secret valid during a grace window for zero-downtime rollover."}]},"analytics":{"title":"Choosing the right analytics query","default":"analytics.query.events","rules":[{"when":"Inspect or debug what actually happened (raw event stream, filtered)","recommend":["analytics.query.events"],"why":"Returns raw events in a time window with attribute filters and cursor pagination — best for debugging instrumentation."},{"when":"Measure whether users come back over time","recommend":["analytics.query.retention"],"why":"Computes a cohort retention matrix from a born event to a return event. Use for stickiness, not conversion ordering."},{"when":"Understand the sequences users take after an action","recommend":["analytics.query.path"],"why":"Builds a path/sequence tree rooted at a start event — discover common journeys and drop-off (closest primitive to a funnel today)."},{"when":"Tie events to a known user and merge anonymous history","recommend":["analytics.identify","analytics.alias"],"why":"identify sets profile traits; alias merges an anonymous old_id into a known new_id (e.g. on signup). Call alias once, at the identity-resolution moment."},{"when":"High-volume client-side instrumentation","recommend":["analytics.batch"],"why":"batch ingests up to 1000 events per call; use single analytics.track only for low-rate or server-side critical events."}]},"observability":{"title":"Errors, logs, metrics, and flags — which surface to use","default":"error_triage","rules":[{"when":"An exception or failure happened and you want it grouped and triaged","recommend":["errors.capture","errors.message"],"why":"capture sends a full error (aggregated by fingerprint into a group); message captures a structured log-style message. Both return error_group_id + dashboard_url."},{"when":"You need searchable, high-cardinality text events","recommend":["logs.ingest","logs.search"],"why":"Logs are free-text/structured records queried by keyword + time — use instead of errors when there's no exception to group."},{"when":"You need numeric time-series (rates, latencies, counts)","recommend":["metrics.report","metrics.query"],"why":"Metrics are counters/gauges/timings with tags — far cheaper than logs for aggregate trends."},{"when":"You want to gate or gradually ship a feature","recommend":["flags.set","flags.rollout","flags.get_value"],"why":"Define a flag, ramp it with a percentage rollout, evaluate per-context at runtime (returns value + variant). Product flagging, not observability data."}]},"scheduling":{"title":"Cron vs one-shot vs queue","default":"cron_lifecycle","rules":[{"when":"Run something on a repeating schedule (daily report, hourly sync)","recommend":["cron_lifecycle"],"why":"cron.create with cron_expr (+ timezone). Pick overlap_policy (skip/queue/allow). next_run_at confirms it's scheduled."},{"when":"Run something exactly once at a future time (delayed task, reminder)","recommend":["cron.create"],"why":"Use cron.create with run_at instead of cron_expr — fires once, no recur. There is no separate one-shot endpoint; one-shots fold into cron."},{"when":"Fan work out to workers with retries and at-least-once delivery","recommend":["queue_worker"],"why":"A queue (standard or FIFO) decouples producers from workers. Configure a DLQ for poison messages; recover with queue.dlq.redrive. Choose queues when work is event-driven and parallel, not time-driven."}]}},"coverage":{"capabilities_total":298,"with_params":183,"with_response":292,"with_any_example":298,"examples":{"curl":298,"python":298,"javascript":298,"typescript":298,"go":298,"java":298,"csharp":298,"php":298,"ruby":298,"rust":298},"flows":38}}
