> ## 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.

# Nebius Billing Setup

> Connect Nebius AI Cloud FOCUS 1.2 billing to Costory with a customer-owned Object Storage bucket, a periodic export, and a read-only access key.

Nebius AI Cloud spend sits on its own invoice, separate from AWS, GCP, and Azure. Connect **Nebius** so GPU, storage, and compute lines land in Explorer (Costory's main interface for exploring cloud costs across all connected providers.) with your other [billing datasources](https://docs.costory.io/setup/billing).

This connector reads the **periodic FOCUS 1.2 CSV export** that Nebius writes into an Object Storage bucket **in your tenant**. You give Costory a read-only access key scoped to that bucket. Costory copies the CSVs on ingest and maps them into [Standard Columns](https://docs.costory.io/docs/standard-columns.md).

> [!WARNING]
>
> Use the Nebius **periodic export** into a bucket you own. One-time exports (console download or `download_url`) expire and do not work with this connector. Do not add the Costory service account to the tenant `editors` or `admins` group.

> [!NOTE]
>
> **To confirm before publishing.** Three points on this page are not confirmed yet against the Costory app: the connect URL `/integration/new/nebius/billing`, whether the form has a **Validate** step or saves directly, and the default connection name. They are marked "To confirm" below.

## How the data flows

1. Create an Object Storage bucket in your Nebius project.
2. Turn on **Billing > Export > Periodic export** so FOCUS 1.2 CSVs land in that bucket every hour.
3. Create a dedicated service account with `storage.viewer` on **that bucket only**, then create an access key.
4. In Costory, paste the access key, bucket, region, and optional prefix.
5. Costory copies `*.csv` and `*.csv.gz` files from the prefix and maps them into Explorer.

Costory only **lists and downloads**. It never uploads to or deletes objects in your bucket.

## Prerequisites

* A Costory account.
* Nebius `admin` on the tenant or project, to create the bucket, service account, custom group, and periodic export. See [Nebius periodic export](https://docs.nebius.com/signup-billing/usage/export#periodic-export).
* One free periodic export slot on the contract. Nebius allows **one active periodic export per contract**. Delete an existing export before creating a new one if you need to change the bucket or prefix.

> [tab] Manual setup
>
> **1. Create an Object Storage bucket**
>
> Create the bucket in the **same Nebius project and region** that will receive the export. Object Storage is available in every public region, for example `eu-north1` or `eu-west1`.
>
> In the Nebius console, open **Object Storage > Create bucket**. Use the Standard storage class. Optional: a prefix such as `billing/export`.
>
> Or with the [AWS CLI configured for Nebius](https://docs.nebius.com/object-storage/interfaces/aws-cli#aws-cli-setup-instructions):
>
> ```bash theme={null}
> aws s3 mb s3://costory-nebius-billing-<slug> \
>   --endpoint-url https://storage.<region>.nebius.cloud
> ```
>
> Replace `<region>` with the project region, for example `eu-north1`. Nebius bills you for Object Storage on this bucket.
>
> **2. Create a read-only service account and access key**
>
> Do **not** add a user or service account to the tenant `editors` group (the AWS CLI quickstart does that). For Costory:
>
> * Create a **service account** used only for Costory reads.
>
> * Create a **custom IAM group** (not `editors`, `admins`, or `viewers`).
>
> * Add the service account to that group.
>
> * Grant the group `storage.viewer` (list and download) on **this bucket only** with a [bucket policy](https://docs.nebius.com/object-storage/buckets/bucket-policy).
>
> * Create an [access key](https://docs.nebius.com/iam/service-accounts/access-keys) on that service account.
>
> > [accordion] CLI: service account, group, bucket policy, access key
> >
> > ```bash theme={null}
> > export PROJECT_ID=$(nebius config get parent-id)
> >
> > export SA_ID=$(nebius iam service-account create \
> >   --name costory-billing-reader \
> >   --format jsonpath='{.metadata.id}')
> >
> > export GROUP_ID=$(nebius iam group create \
> >   --parent-id "$PROJECT_ID" \
> >   --name costory-billing-readers \
> >   --format jsonpath='{.metadata.id}')
> >
> > nebius iam group-membership create \
> >   --parent-id "$GROUP_ID" \
> >   --member-id "$SA_ID"
> >
> > # Bucket ID from the bucket page in Object Storage
> > nebius storage bucket update \
> >   --id "<bucket_id>" \
> >   --bucket-policy-rules "[{\"paths\": [\"*\"], \"roles\": [\"storage.viewer\"], \"group_id\": \"$GROUP_ID\"}]"
> >
> > export ACCESS_KEY_ID=$(nebius iam v2 access-key create \
> >   --account-service-account-id "$SA_ID" \
> >   --description 'Costory billing read' \
> >   --format jsonpath='{.metadata.id}')
> >
> > export ACCESS_KEY_AWS_ID=$(nebius iam v2 access-key get \
> >   --id "$ACCESS_KEY_ID" \
> >   --format json | jq -r '.status.aws_access_key_id')
> >
> > export SECRET_ACCESS_KEY=$(nebius iam v2 access-key get \
> >   --id "$ACCESS_KEY_ID" \
> >   --format json | jq -r '.status.secret')
> > ```
> >
> > Give Costory `ACCESS_KEY_AWS_ID` and `SECRET_ACCESS_KEY`, **not** the Nebius resource ID (`access-key-e00...`). Copy the secret immediately.
> >
> > To scope the policy to the export prefix instead of the whole bucket, set `paths` to `["billing/export/*"]`. It must match the prefix you set on the export and in Costory.
>
> Confirm the key can list the prefix:
>
> ```bash theme={null}
> aws s3 ls s3://<bucket>/<prefix> \
>   --endpoint-url https://storage.<region>.nebius.cloud
> ```
>
> **3. Create the periodic FOCUS export**
>
> In the Nebius console, open **Billing > Export > Periodic export > Create export**.
>
> * **Start month:** as far back as you want Costory to have history. Costory ingests every FOCUS CSV already in the prefix on first sync.
> * **Project and bucket:** the bucket from step 1.
> * **Prefix (optional):** the same prefix the access key is scoped to, for example `billing/export`.
>
> Nebius writes hourly FOCUS 1.2 CSVs, with one periodic export per contract. See [periodic export](https://docs.nebius.com/signup-billing/usage/export#periodic-export). Wait until at least one CSV appears in the bucket (up to about an hour after you create the export).
>
> **4. Open Costory**
>
> Go to [Integrations](https://app.costory.io/integration), click **+ Add integration**, then choose **Nebius** under **Billing**.
>
> **To confirm:** the connect URL is expected to be `/integration/new/nebius/billing`.
>
> **5. Enter connection details and save**
>
> Fill **Connection name**, **Access Key ID**, **Secret Access Key**, **Bucket**, and **Region**. **Prefix** is optional. Use the same value as the periodic export, without a leading `/`.
>
> **To confirm:** the default connection name (expected **Nebius**), and whether the form has a **Validate** step before **Save**. If it does, Costory lists objects in the prefix with the access key, and an empty prefix still counts as success when the first hourly file has not landed yet.
>
> On first ingest, Costory copies every `*.csv` and `*.csv.gz` file under the prefix. Check the datasource date range on [Integrations](https://app.costory.io/integration). New data then follows the usual [data refresh](https://docs.costory.io/docs/data-refresh.md) cadence.

> [tab] Terraform
>
> Not supported yet.

## Field reference

| Field | Required | Description |
| - | - | - |
| **Connection name** | Yes | Label in **Integrations**. Default value to confirm. |
| **Access Key ID** | Yes | AWS-style ID from the service account access key (`status.aws_access_key_id`). Not the Nebius `access-key-e00...` resource ID. Stored in Costory's secret manager. |
| **Secret Access Key** | Yes | Access key secret (`status.secret`). Stored in Costory's secret manager. |
| **Bucket** | Yes | Object Storage bucket in your tenant that receives the periodic export. |
| **Region** | Yes | Region of that bucket, for example `eu-north1` or `eu-west1`. Costory calls `https://storage.<region>.nebius.cloud`. |
| **Prefix** | No | Object prefix of the export, for example `billing/export`. Leave empty to read the whole bucket. Do not add a leading `/`. |

## What Costory includes

Costory copies FOCUS 1.2 CSVs from your bucket and maps them into [Standard Columns](https://docs.costory.io/docs/standard-columns.md).

* **Rows:** the hourly usage, commitment, adjustment, and credit rows Nebius writes for that contract, with service, SKU, resource, and region as the export provides them.
* **Grain:** hourly in the files (`ChargePeriodStart`, `ChargePeriodEnd`). Explorer groups by day unless you use [hourly granularity](https://docs.costory.io/use-cases/hourly-cost-granularity.md).
* **Provider:** shows as `Nebius` in Explorer (not the `ProviderName` value `Nebius B.V.`).
* **Project:** maps to Sub account. `x_ContainerName` becomes Sub account id and `x_ContainerId` becomes Sub account identifier. Nebius always uses the latest project name, including on older months if a project was renamed.

**How to analyze Nebius costs**

* Spend by service or SKU: group by Service name or SKU.
* Spend by project: group by Sub account id.
* Spend by region: group by Region.
* Spend next to AWS, GCP, and Azure: filter Provider in Explorer.

**What Costory does not include**

* One-time exports (7-day download links).
* Rows with `ChargeCategory = Tax`, dropped so Explorer tracks usage, not invoice tax.
* Write, overwrite, or delete access to your bucket.
* Nebius Monitoring metrics.

> [!NOTE]
>
> Rotate the access key from **Integrations** when you need a new credential. Bucket, region, and prefix stay the same. Create the new key on the same service account, paste it in Costory, then delete the old key in Nebius.

## Troubleshooting

| Issue | What to check |
| - | - |
| Failed to authenticate | Paste `status.aws_access_key_id` and `status.secret`, not the Nebius access key resource ID. Confirm Region matches the bucket (`eu-north1`, `eu-west1`, ...). |
| Access denied | The key's group needs `storage.viewer` on this bucket (bucket policy or access permit). Do not use an `editors` or `admins` key as a shortcut. Costory only lists and downloads. |
| Bucket not found | Confirm the bucket name and region. The endpoint is `https://storage.<region>.nebius.cloud`. The bucket must live in **your** tenant: periodic export cannot target another tenant. |
| No FOCUS files at this prefix | Use a periodic export, not a one-time download. Confirm **Billing > Export > Periodic export** is Active, the destination bucket and prefix match Costory, and at least one hourly CSV exists. |
| Connected but Explorer is empty | Wait for the first hourly export, then the next Costory ingest. Check the datasource date range on [Integrations](https://app.costory.io/integration). |
| History is shorter than expected | Costory ingests the CSVs in the prefix. Recreate the periodic export with an earlier start month if Nebius still retains that history, or wait for new hours to accumulate. |

## Related pages

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

> [card] [Custom FOCUS (BigQuery)](https://docs.costory.io/setup/billing/focus.md)
>
> Import FOCUS tables from BigQuery instead of Object Storage.

> [card] [Oracle Cloud billing](https://docs.costory.io/setup/billing/oci.md)
>
> Connect native OCI cost reports with an API signing key.

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

Nebius reference docs: [Periodic usage export](https://docs.nebius.com/signup-billing/usage/export#periodic-export), [FOCUS fields](https://docs.nebius.com/signup-billing/usage/focus-fields), [FOCUS conformance](https://docs.nebius.com/signup-billing/usage/focus-conformance), [Access keys](https://docs.nebius.com/iam/service-accounts/access-keys), [Bucket policies](https://docs.nebius.com/object-storage/buckets/bucket-policy).


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