> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OVHcloud Billing Setup

> Import OVHcloud billing into Costory from the OVHcloud FOCUS export, written daily to an AWS S3 or Google Cloud Storage bucket.

OVHcloud spend arrives on its own invoice, apart from AWS, GCP, and Azure. To see it in Explorer (Costory's main interface for exploring cloud costs across all connected providers.), export OVHcloud billing in FOCUS format to a bucket and let Costory import the newest file every day.

The OVHcloud tile in Costory is a preset of the [Custom FOCUS](https://docs.costory.io/setup/billing/focus.md) bucket import. It fills the provider name, the file path pattern, and the **Take last file** option for the OVHcloud export layout.

## How the data flows

1. OVHcloud writes a FOCUS CSV to your bucket every day, under `<nichandle>/YYYY/MM/DD/focus.csv`.
2. Costory matches every export with `<nichandle>/*/focus.csv`.
3. **Take last file** keeps only the newest export, because each file is a full snapshot. Adding up every daily file would count the same charges several times.
4. Each daily refresh replaces the previous OVHcloud load in Costory with that newest file.

## Prerequisites

* A Costory account with permission to manage integrations.
* An OVHcloud API token allowed to call the `/finops` routes. See the [OVHcloud billing export guide](https://docs.ovhcloud.com/en/guides/manage-and-operate/cost-center/export-billing-data-to-bucket).
* An AWS S3 bucket or a Google Cloud Storage bucket that receives the export. Costory reads OVHcloud files from these two providers.

**1. Create write credentials for OVHcloud**

OVHcloud writes to any S3-compatible bucket with an access key and a secret key. It needs `s3:ListBucket` on the bucket, and `s3:PutObject` and `s3:AbortMultipartUpload` under the export prefix.

* **AWS S3:** create an IAM user with a policy that grants those three actions on the bucket, then create an access key for it. The endpoint is `s3.<region>.amazonaws.com`.
* **Google Cloud Storage:** create a service account with **Storage Object Creator** and **Storage Object Viewer** on the bucket, then create an [HMAC key](https://cloud.google.com/storage/docs/authentication/hmackeys) for it. The endpoint is `storage.googleapis.com`.

Keep these credentials for OVHcloud only. Costory uses its own read access, set up in the next step.

**2. Create the OVHcloud billing export**

Call `POST /finops/bucketExport` on the OVHcloud API (for example `https://api.eu.ovhcloud.com/v2`) with a `targetSpec` that contains `bucketConfiguration`:

```json theme={null}
{
  "targetSpec": {
    "exportHour": 2,
    "filePolicy": "CREATE",
    "period": "DAILY",
    "bucketConfiguration": {
      "bucketName": "my-ovh-billing",
      "endpointURL": "s3.eu-west-1.amazonaws.com",
      "region": "eu-west-1",
      "pathPrefix": "./",
      "accessKey": "<access key>",
      "secretKey": "<secret key>"
    }
  }
}
```

* Keep `period` on `DAILY` and `filePolicy` on `CREATE`, so each day lands in its own dated folder.
* Write `endpointURL` without `https://`.
* `pathPrefix: "./"` writes at the bucket root. With another prefix, add it in front of the path in Costory.

Poll `GET /finops/bucketExport/{id}` until the status is `READY`. Wait for the first `focus.csv` to appear after `exportHour` (UTC).

**3. Grant Costory read access**

* **AWS S3:** create the S3 read policy and the IAM role that trusts Costory. The Costory form shows both JSON documents, prefilled with your bucket name.
* **Google Cloud Storage:** grant **Storage Object Viewer** on the bucket to the **Costory service account** shown in the form.

Costory lists and reads files. It never writes to or deletes from your bucket.

**4. Open the OVHcloud tile**

In Costory, go to [Integrations](https://app.costory.io/integration), click **+ Add integration**, then choose **OVHcloud** under **Billing**.

**5. Enter the bucket path and validate**

Pick the **Storage provider**, then set **File path** to `<bucket>/<nichandle>/*/focus.csv`, for example `my-ovh-billing/ab12345-ovh/*/focus.csv`. Add the **Role ARN** for S3. Leave **Take last file** on and **Provider name** on `OVHcloud`. Click **Validate**, then **Save**.

**6. Map the FOCUS columns**

Costory reads the CSV schema and pre-selects the matching FOCUS columns, since the OVHcloud export already uses FOCUS names. Check that **Billed Cost** and **Charge Period Start** are set, then save the mapping to start the import.

New exports are picked up with the usual [data refresh](https://docs.costory.io/docs/data-refresh.md) cadence. For S3, Costory copies the new day folder to its storage each morning before importing.

## What Costory includes

* Every row of the newest `focus.csv`, with the service, SKU, resource, region, and tags OVHcloud provides, mapped to [Standard Columns](https://docs.costory.io/docs/standard-columns.md).
* **Provider** shows as `OVHcloud` in Explorer.
* Older daily files stay in your bucket. Costory ignores them while **Take last file** is on.

> [!WARNING]
>
> Do not turn **Take last file** off for OVHcloud. Each daily file repeats the charges of the previous ones, so importing every file inflates your costs.

## Troubleshooting

| Issue | What to check |
| - | - |
| OVHcloud export status is `ERROR` | `endpointURL` has a scheme, the bucket name or region is wrong, or the key lacks `s3:ListBucket` or `s3:PutObject`. |
| **Validate** says no file matches | The first export has not run yet, or the path is missing the bucket name or the nichandle folder. With a custom `pathPrefix`, include it in the path. |
| Costs are several times too high | **Take last file** was off when the connection was created. Delete the connection and create it again from the **OVHcloud** tile. |
| Explorer is missing recent days | Check that a new dated folder appears in the bucket every day, then wait for the next Costory refresh. |

## Related pages

> [card] [Custom FOCUS](https://docs.costory.io/setup/billing/focus.md)
>
> All FOCUS sources and the file path options.

> [card] [Billing Data](https://docs.costory.io/setup/billing)
>
> All billing providers and shared setup notes.

> [card] [Nebius billing](https://docs.costory.io/setup/billing/nebius.md)
>
> Another FOCUS export read from a bucket you own.

> [card] [Explorer](https://docs.costory.io/features/cost-explorer.md)
>
> Filter and group OVHcloud spend with the rest of your stack.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.