Skip to main content

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.

EndpointWhat it does
POST /v1/warehouses/refreshTell Yuki to re-read your warehouses now, for example right after you resize one
POST /v1/snowflake-users/key-pairAdd a Snowflake user to Yuki, or rotate its key, without the Yuki app

Get a Yuki API key​

  1. In the Yuki app, select the account.
  2. Go to Settings → Yuki API. Only company admins see this tab.
  3. 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:

RegionBase URL
UShttps://prod.yukicomputing.com
EUhttps://eu-prod.yukicomputing.com

If you're not sure which region serves your account, ask Yuki support.

Errors​

The endpoints use these status codes:

StatusMeaning
401 UnauthorizedThe Authorization header is missing, isn't Bearer <key>, or the key isn't the account's current key.
400 Bad RequestThe request isn't valid for this account. The response body says why.
5xxYuki couldn't complete the call. It's safe to retry.