{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/api-reference/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["api-container","api-content","endpoint","api-examples","code-group","tabs","tab"]},"redocly_category":"API Reference","searchWeight":120,"type":"markdown"},"seo":{"title":"Get a server's daily cost and uptime","description":"Complete API reference and documentation for Freddy AI-powered backend system by Aitronos","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-a-servers-daily-cost-and-uptime","__idx":0},"children":["Get a server's daily cost and uptime"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns one row per day with what the server was billed and how long it was running, plus this month's total cost and uptime. It feeds the usage and cost chart of a server's detail page."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Costs are read from the same billing ledger as your organization's usage page: the hours the server ran plus, while it is parked, the storage of its saved copy (billed per GB-hour). Nothing is estimated. An hour is billed shortly after it starts, so today's figure can lag by about an hour. Bring-your-own servers are billed by your provider, not by Aitronos: their costs are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A server is visible to the person who created it and to members with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["manage_forge"]},"; anyone else is told it does not exist. Requires a bearer token (or API key) whose principal holds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["use_forge"]}," capability in the acting organization. It works while Forge cloud compute is switched off."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"ApiContent","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET","path":"https://api.aitronos.com/v1/forge/compute/hosts/{host_id}/usage"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"path-parameters","__idx":1},"children":["Path Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["host_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The server's id: the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fchost_"]}," id returned in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", or the UUID sent when the server was created (any letter case, with or without hyphens)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters","__idx":2},"children":["Query Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First day of the period, inclusive, as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," (UTC). Defaults to the first day of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},"'s month; with neither ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," nor ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},", the period is the current calendar month (UTC)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Last day of the period, inclusive, as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," (UTC). Defaults to the last day of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]},"'s month. The period is at most 93 days, both ends counted. It may end in the future; future days are never returned."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["granularity"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The size of one row. Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["day"]}," is supported, and it is the default."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The organization the server belongs to: send its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization.id"]}," (from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-my-hosts"},"children":["List your servers in every organization"]},"). Defaults to your current organization, where a server of another organization is not found. You must be an active member of it, or the request is refused with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 ORGANIZATION_ACCESS_DENIED"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"headers","__idx":3},"children":["Headers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Organization-Id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The same as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization_id"]},", as a header. When both are sent, the query parameter wins."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":4},"children":["Returns"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["host_id"]}]}," string — the server's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fchost_"]}," id."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]}]}," string — the currency of every amount, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CHF"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["period"]}]}," object — the period of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["days"]},", as asked or defaulted: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]}," strings (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]},", inclusive)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["month_to_date"]}]}," string or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," — what the server has cost this calendar month (UTC), two decimals. It is the same value as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["month_to_date"]}," on ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/get-host"},"children":["Get a server"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," for bring-your-own servers."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uptime_seconds_month"]}]}," integer — how many seconds the server was running this calendar month (UTC), up to now."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["days"]}]}," array — one row per day, oldest first, from the later of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," and the day the server was created, to the earliest of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},", today and the day the server was deleted. Days before the server existed and future days are left out; a day with no activity is a row with zero cost and zero uptime. Each row has:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]}]}," string — the day, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," (UTC)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cost"]}]}," string or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," — what the server was billed for that day, two decimals: running hours plus parked storage. Within each month, the days are rounded so that they add up to the month's rounded total; no day differs from its exact amount by a cent or more. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," for bring-your-own servers."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uptime_seconds"]}]}," integer — how many seconds the server was running within that day (UTC), from 0 to 86400."]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A server counts as running from when it starts after being created, or when a resume finishes, until a park finishes, a delete starts, access is revoked, or a step fails. The same periods are listed by ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-host-intervals"},"children":["List a server's running intervals"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"host_id\": \"fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90\",\n  \"currency\": \"CHF\",\n  \"period\": {\"from\": \"2026-10-01\", \"to\": \"2026-10-31\"},\n  \"month_to_date\": \"5.69\",\n  \"uptime_seconds_month\": 29880,\n  \"days\": [\n    {\"date\": \"2026-10-01\", \"cost\": \"1.91\", \"uptime_seconds\": 10800},\n    {\"date\": \"2026-10-02\", \"cost\": \"3.78\", \"uptime_seconds\": 19080}\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors","__idx":5},"children":["Errors"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When"},"children":["When"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTHENTICATION_REQUIRED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No valid credential."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ORGANIZATION_ACCESS_DENIED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization_id"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Organization-Id"]}," names an organization you are not an active member of."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INSUFFICIENT_PERMISSIONS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The caller does not hold ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["use_forge"]}," in the acting organization."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FORGE_COMPUTE_HOST_NOT_FOUND"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No server with this id in the acting organization, or it was created by someone else and the caller does not hold ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["manage_forge"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_DATE_RANGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}," is before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATE_RANGE_TOO_LARGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The period is longer than 93 days."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VALIDATION_ERROR"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}," is not a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]}," date, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["granularity"]}," is not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["day"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_ID_FORMAT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["host_id"]}," is neither a UUID nor ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fchost_<32 hex>"]},"."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ApiExamples","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"dropdown"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl \"https://api.aitronos.com/v1/forge/compute/hosts/fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90/usage?from=2026-10-01&to=2026-10-31\" \\\n  -H \"Authorization: Bearer $ACCESS_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python SDK","header":{"title":"Python SDK","controls":{"copy":{}}},"source":"# pip install aitronos-sdk\n#\n# The Python SDK does not expose a typed `forge_compute` namespace yet, so call\n# the endpoint directly with the same credential you would pass to `Aitronos(...)`\n# — an API key or a bearer token, both sent as `Authorization: Bearer <value>`.\nimport httpx\n\nAPI_KEY = \"your-api-key\"\nurl = \"https://api.aitronos.com/v1/forge/compute/hosts/fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90/usage\"\nusage = httpx.get(url, headers={\"Authorization\": f\"Bearer {API_KEY}\"}).json()\nfor day in usage[\"days\"]:\n    print(day[\"date\"], day[\"cost\"], round(day[\"uptime_seconds\"] / 3600, 1), \"h\")\nprint(\"This month:\", usage[\"month_to_date\"], usage[\"currency\"])\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"import os\nimport requests\n\ntoken = os.environ[\"AITRONOS_TOKEN\"]\nusage = requests.get(\n    \"https://api.aitronos.com/v1/forge/compute/hosts/fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90/usage\",\n    params={\"from\": \"2026-09-01\", \"to\": \"2026-10-31\"},\n    headers={\"Authorization\": f\"Bearer {token}\"},\n).json()\nprint(usage[\"period\"], len(usage[\"days\"]), \"days\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","data-title":"JavaScript","header":{"title":"JavaScript","controls":{"copy":{}}},"source":"const url = new URL(\n  \"https://api.aitronos.com/v1/forge/compute/hosts/fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90/usage\",\n);\nurl.searchParams.set(\"from\", \"2026-10-01\");\nconst response = await fetch(url, {\n  headers: { Authorization: `Bearer ${process.env.AITRONOS_TOKEN}` },\n});\nconst usage = await response.json();\nconsole.log(usage.month_to_date, usage.days.map((d) => d.cost));\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response:"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"200 OK","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"host_id\": \"fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90\",\n  \"currency\": \"CHF\",\n  \"period\": {\"from\": \"2026-10-01\", \"to\": \"2026-10-31\"},\n  \"month_to_date\": \"5.69\",\n  \"uptime_seconds_month\": 29880,\n  \"days\": [\n    {\"date\": \"2026-10-01\", \"cost\": \"1.91\", \"uptime_seconds\": 10800},\n    {\"date\": \"2026-10-02\", \"cost\": \"3.78\", \"uptime_seconds\": 19080}\n  ]\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"200 Own account","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"host_id\": \"fchost_c41f7a2e9b6d4e0a8f3c5b1d7e2a9c60\",\n  \"currency\": \"CHF\",\n  \"period\": {\"from\": \"2026-10-01\", \"to\": \"2026-10-31\"},\n  \"month_to_date\": null,\n  \"uptime_seconds_month\": 109500,\n  \"days\": [\n    {\"date\": \"2026-10-01\", \"cost\": null, \"uptime_seconds\": 64500},\n    {\"date\": \"2026-10-02\", \"cost\": null, \"uptime_seconds\": 45000}\n  ]\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"422 Too long","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"DATE_RANGE_TOO_LARGE\",\n    \"message\": \"Choose a period of at most 93 days.\",\n    \"system_message\": \"window of 94 days exceeds 93\",\n    \"type\": \"validation_error\",\n    \"status\": 422,\n    \"details\": {\"from\": \"2026-07-01\", \"to\": \"2026-10-02\", \"days\": 94, \"max_days\": 93},\n    \"trace_id\": \"3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34\",\n    \"timestamp\": \"2026-10-02T12:30:00Z\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"404 Not Found","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"FORGE_COMPUTE_HOST_NOT_FOUND\",\n    \"message\": \"This server could not be found. It may have been deleted.\",\n    \"system_message\": \"Forge compute host not found\",\n    \"type\": \"client_error\",\n    \"status\": 404,\n    \"details\": {\"resource\": \"forge_compute_host\"},\n    \"trace_id\": \"3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34\",\n    \"timestamp\": \"2026-10-02T12:30:00Z\"\n  }\n}\n","lang":"json"},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":6},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/introduction"},"children":["Forge cloud compute overview"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/get-host"},"children":["Get a server"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-host-intervals"},"children":["List a server's running intervals"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-host-events"},"children":["List a server's event history"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-hosts"},"children":["List servers"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/list-my-hosts"},"children":["List your servers in every organization"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/forge-compute/get-limits"},"children":["Get spend limits"]}]}]}]},"headings":[{"value":"Get a server's daily cost and uptime","id":"get-a-servers-daily-cost-and-uptime","depth":1},{"value":"Path Parameters","id":"path-parameters","depth":4},{"value":"Query Parameters","id":"query-parameters","depth":4},{"value":"Headers","id":"headers","depth":4},{"value":"Returns","id":"returns","depth":2},{"value":"Errors","id":"errors","depth":2},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Get a server's daily cost and uptime","keywords":["forge","cloud compute","servers","usage","cost","uptime"],"seo":{"title":"Get a server's daily cost and uptime"}},"lastModified":"2026-10-26T18:32:31.576Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/forge-compute/get-host-usage","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}