> For the complete documentation index, see [llms.txt](https://docs.archera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archera.ai/api-reference/public-api/savings-estimate.md).

# Savings Estimate

API for estimating savings from uploaded billing files

## Queue a savings estimate for an uploaded billing file

> Queues a completed PDF, CSV, JSON, or text billing upload for parsing and returns an estimate ID immediately. Poll the status/result operation with that ID until status is complete or error. If a queued or processing estimate already exists for this upload, that estimate is returned (200) instead of creating a new one (202).

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Savings Estimate","description":"API for estimating savings from uploaded billing files"}],"paths":{"/v1/org/{org_id}/savings-estimate":{"post":{"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsEstimate"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsEstimateRequest"}}}},"tags":["Savings Estimate"],"summary":"Queue a savings estimate for an uploaded billing file","description":"Queues a completed PDF, CSV, JSON, or text billing upload for parsing and returns an estimate ID immediately. Poll the status/result operation with that ID until status is complete or error. If a queued or processing estimate already exists for this upload, that estimate is returned (200) instead of creating a new one (202)."}}},"components":{"schemas":{"SavingsEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"status":{"readOnly":true,"enum":["queued","processing","complete","error"]},"error":{"type":["string","null"],"readOnly":true},"result":{"readOnly":true,"anyOf":[{"$ref":"#/components/schemas/SavingsEstimateDetail"},{"type":"null"}]}},"required":["id","status"],"additionalProperties":false},"SavingsEstimateDetail":{"type":"object","properties":{"provider":{"type":["string","null"],"enum":["aws","azure","gcp",null]},"source_format":{"type":"string"},"period_start":{"type":["string","null"],"format":"date"},"period_end":{"type":["string","null"],"format":"date"},"account_id":{"type":["string","null"]},"currency":{"type":"string"},"is_projected":{"type":"boolean"},"extraction_status":{"enum":["complete","partial","unverified"]},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostLineItem"}},"total_cost":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"},"total_savings_estimate":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"}},"required":["account_id","currency","extraction_status","is_projected","line_items","period_end","period_start","provider","source_format","total_cost","total_savings_estimate"],"additionalProperties":false},"CostLineItem":{"type":"object","properties":{"service":{"type":"string"},"reservable_service":{"type":["string","null"]},"resource_type":{"type":["string","null"]},"usage_quantity":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]},"usage_unit":{"type":["string","null"]},"cost":{"$ref":"#/components/schemas/ValueRange"},"region":{"type":["string","null"]},"spend_type":{"enum":["on_demand","reserved","unreservable","unknown"]},"savings_estimate":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]}},"required":["cost","region","reservable_service","resource_type","savings_estimate","service","spend_type","usage_quantity","usage_unit"],"additionalProperties":false},"ValueRange":{"type":"object","properties":{"estimate":{"type":"number"},"lower_bound":{"type":["number","null"]},"upper_bound":{"type":["number","null"]}},"required":["estimate","lower_bound","upper_bound"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false},"SavingsEstimateRequest":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"}},"required":["upload_id"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Get a savings estimate's status and result

> Returns the queued/processing/complete/error status for a savings estimate. Clients can poll this endpoint until status is complete or error.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Savings Estimate","description":"API for estimating savings from uploaded billing files"}],"paths":{"/v1/org/{org_id}/savings-estimate/{estimate_id}":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsEstimate"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Savings Estimate"],"summary":"Get a savings estimate's status and result","description":"Returns the queued/processing/complete/error status for a savings estimate. Clients can poll this endpoint until status is complete or error."}}},"components":{"schemas":{"SavingsEstimate":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"status":{"readOnly":true,"enum":["queued","processing","complete","error"]},"error":{"type":["string","null"],"readOnly":true},"result":{"readOnly":true,"anyOf":[{"$ref":"#/components/schemas/SavingsEstimateDetail"},{"type":"null"}]}},"required":["id","status"],"additionalProperties":false},"SavingsEstimateDetail":{"type":"object","properties":{"provider":{"type":["string","null"],"enum":["aws","azure","gcp",null]},"source_format":{"type":"string"},"period_start":{"type":["string","null"],"format":"date"},"period_end":{"type":["string","null"],"format":"date"},"account_id":{"type":["string","null"]},"currency":{"type":"string"},"is_projected":{"type":"boolean"},"extraction_status":{"enum":["complete","partial","unverified"]},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CostLineItem"}},"total_cost":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"},"total_savings_estimate":{"readOnly":true,"$ref":"#/components/schemas/ValueRange"}},"required":["account_id","currency","extraction_status","is_projected","line_items","period_end","period_start","provider","source_format","total_cost","total_savings_estimate"],"additionalProperties":false},"CostLineItem":{"type":"object","properties":{"service":{"type":"string"},"reservable_service":{"type":["string","null"]},"resource_type":{"type":["string","null"]},"usage_quantity":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]},"usage_unit":{"type":["string","null"]},"cost":{"$ref":"#/components/schemas/ValueRange"},"region":{"type":["string","null"]},"spend_type":{"enum":["on_demand","reserved","unreservable","unknown"]},"savings_estimate":{"anyOf":[{"$ref":"#/components/schemas/ValueRange"},{"type":"null"}]}},"required":["cost","region","reservable_service","resource_type","savings_estimate","service","spend_type","usage_quantity","usage_unit"],"additionalProperties":false},"ValueRange":{"type":"object","properties":{"estimate":{"type":"number"},"lower_bound":{"type":["number","null"]},"upper_bound":{"type":["number","null"]}},"required":["estimate","lower_bound","upper_bound"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.archera.ai/api-reference/public-api/savings-estimate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
