Skip to content

Troubleshooting ​

Find the error code or what you see, then the fix. Every API error has a request_id. Include it when you contact us.

Sign-in and access ​

What you seeWhyWhat to do
"Workspace suspended"We suspended your workspace.Contact us.
"The sign-in expired or was started in another browser. Please sign in again."The sign-in took too long, or started in another browser.Sign in again from the same browser.
The console asks you to reloadYou signed in as someone else in another tab.Reload the page.

Keys: 401 and 403 ​

code and messageWhat to do
invalid_key, "Send an API key: Authorization: Bearer pwc_live_…"Send the header. Check that the environment variable holding the key is set.
invalid_key, "This API key is not valid"The key is wrong or cut short. Copy it again, or create a new one.
invalid_key, "This API key was revoked"Create a new key.
forbidden, "This API key may not be used here"The key lacks the use this endpoint needs ("Model API", "Sandboxes" or "VMs"). Create a key that has it.
forbidden, "This organization is not active"Your workspace is suspended. See Sign-in and access.

Money ​

codeWhyWhat to do
insufficient_fundsNeither your workspace nor your Yi Labs wallet can cover the hold, or your Yi Labs account has an unpaid balance. The message says which.Top up or choose a paid plan at https://account.theyilabs.com/billing, and pay any unpaid balance there. Free credit doesn't count. Holds are released as calls and resources end. For models, a lower max_tokens makes a smaller hold. For sandboxes, a shorter timeout_s.
key_limit_reachedThe key's spend limit for this period is used up, or the hold doesn't fit in what's left.Wait for the next month if the key's period is monthly, or use another key.
insufficient_funds, "Renew the lease before starting the VM"The VM's lease has ended.Renew, then start it.
503 upstream_unavailable, about the Yi Labs accountYi Cloud couldn't reach your Yi Labs account to take money from your wallet.Try again shortly.

Models ​

What you seeWhat to do
404 not_found, "No such enabled model"Use an id from GET /v1/catalog.
400, "This endpoint does not match the model kind"Chat models go to chat completions, responses or messages. Embedding models go to /v1/embeddings. Image models go to /v1/images/generations.
400, "This model does not support Responses"Use chat completions, or a model with responses_api: true.
400, "Only client-executed function tools are supported"Send only type: "function" tools.
400, "Provider-stored content references are not supported"Send the content itself instead of file_id or item_reference.
400, "Unsupported Messages input; use text, images and custom tools"Remove server tools and document blocks from the Messages request.
400 content_filterThe model refused the content. Change the input.
400 upstream_invalid_requestThe model rejected a parameter or the input, for example input longer than it takes. Check the request.
429 rate_limitedWait the seconds in Retry-After, or use a key with a higher per-minute limit.
502, 503 upstream_capacity, 504No deployment could answer. Try again shortly.
503 upstream_unavailable, "Model API is paused"Try again later.
A stream ends with event: error and incomplete_streamThe stream broke after it started and isn't replayed. Send the request again if you need the full answer.
A request shows "Estimated"The model didn't report its usage, so the cost was estimated. Never more than the hold.

Creating sandboxes and VMs ​

What you seeWhat to do
400 invalid_request about Idempotency-KeySend an Idempotency-Key header of 8 to 120 letters, digits, ., _, : or -. See API reference.
409 conflict, "Idempotency-Key was used with different parameters"Use a new key for a new request. Reuse a key only to retry the same request.
400, "This compute class is unavailable"Use a size id from GET /v1/compute/classes.
503, "No pool is available for this architecture"Use an architecture listed in GET /v1/compute/classes, or leave out pool.
503, "Compute is paused"Try again later.

Sandboxes ​

What you seeWhat to do
409 conflict, "Sandbox is not ready"Wait until state is ready. If it's deleted, see its error_code.
409 conflict, "Sandbox has four commands in progress"Wait for one to finish.
400, "Output exceeds 1 MiB; use stream=true"Run the command with stream: true, or write the output to a file and download it.
400, "Use a byte range of at most 64 KiB"Ask for at most 65,536 bytes per Range.
404, "File is unavailable"Check the path. Relative paths start at /workspace.
400, "Sandboxes have no inbound access"Leave out ssh_public_keys and allowed_cidrs. Use a VM if you need SSH.
Writing outside /workspace, /home/pwc or /tmp failsThe rest of the file system is read-only, and there is no sudo.
A connection out on a port other than 80 or 443 failsOnly HTTP and HTTPS go out. See Quotas and network.

VMs ​

What you seeWhat to do
400, "VMs require SSH public keys and allowed client CIDRs"Send at least one key in ssh_public_keys and one range in allowed_cidrs.
400 about a CIDRUse a range of /8 or narrower for IPv4, /32 or narrower for IPv6.
SSH times outCheck that your address is inside allowed_cidrs and that the VM is running. Read GET /v1/vms/{id}/serial to see how it booted.
SSH refuses the keyLog in as pwc with the private key that matches one in ssh_public_keys.
409 conflict, "Wait for the current operation" or "An operation is already in progress"Let the current action finish.
409 conflict, "Wait until the VM is running"A VM can be renewed only after it has run.
403 forbidden, "Resource is isolated pending review"We closed it off. Only stop and delete work. Contact us.

Quotas: 409 quota_exceeded ​

MessageWhat to do
"Compute quota reached"Delete sandboxes or VMs you don't need. Stopped VMs count too.
"Requested lifetime exceeds the organization quota"Ask for a shorter timeout_s or fewer hours.
"Renewal exceeds the maximum lease"Renew fewer hours.

The quota of each tier is in Quotas and network.

Why a resource ended ​

When Yi Cloud stops or deletes a sandbox or VM, error_code on the resource says why.

error_codeWhat happened
boot_timeoutIt didn't become ready within 10 minutes. Nothing was charged.
capacityNo machine of this size was available. Nothing was charged. Try again later or pick another size.
timeoutThe sandbox reached its timeout_s.
idle_timeoutThe sandbox had no command, file call or keepalive for idle_timeout_s.
agent_lostThe sandbox stopped reporting for more than 2 minutes.
lease_expiredThe VM's lease ended and it was stopped. Renew and start it within 24 hours to keep it.
retention_expiredThe VM was stopped for 24 hours and was deleted.
insufficient_funds, key_limit_reachedThe stopped rate of a VM couldn't be covered, so it was deleted.
action_uncertainA reboot or reinstall was interrupted. The VM was stopped and closed off. Delete it, or contact us.
provider_lost, provider_failedThe machine was lost or failed on our side. Create a new one.
org_inactiveThe workspace was suspended.
compute_pausedWe paused compute.