Yuki API
The Yuki API lets your own code call Yuki for one of your accounts: a script, a CI job, or a Snowflake task or alert. Each call carries the account's Yuki API key, and acts only on that account.
| Endpoint | What it does |
|---|---|
POST /v1/warehouses/refresh | Tell Yuki to re-read your warehouses now, for example right after you resize one |
POST /v1/snowflake-users/key-pair | Add a Snowflake user to Yuki, or rotate its key, without the Yuki app |
Get a Yuki API key
- In the Yuki app, select the account.
- Go to Settings → Yuki API. Only company admins see this tab.
- Click Generate Yuki API key and copy the key.
!warning
Yuki shows the key only once, so store it somewhere safe, such as a secrets manager.
Each account has a single key. Generating a new one replaces it right away, and anything still using the old key gets 401 Unauthorized.
Authentication
Send the key with every call, in the Authorization header:
Authorization: Bearer <your Yuki API key>
The key decides which account the call acts on, so requests don't name the account.
Base URL
Use the host of the Yuki region that serves your account:
| Region | Base URL |
|---|---|
| US | https://prod.yukicomputing.com |
| EU | https://eu-prod.yukicomputing.com |
If you're not sure which region serves your account, ask Yuki support.
Errors
The endpoints use these status codes:
| Status | Meaning |
|---|---|
401 Unauthorized | The Authorization header is missing, isn't Bearer <key>, or the key isn't the account's current key. |
400 Bad Request | The request isn't valid for this account. The response body says why. |
5xx | Yuki couldn't complete the call. It's safe to retry. |