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 see | Why | What 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 reload | You signed in as someone else in another tab. | Reload the page. |
Keys: 401 and 403
code and message | What 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
code | Why | What to do |
|---|---|---|
insufficient_funds | Neither 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_reached | The 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 account | Yi Cloud couldn't reach your Yi Labs account to take money from your wallet. | Try again shortly. |
Models
| What you see | What 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_filter | The model refused the content. Change the input. |
400 upstream_invalid_request | The model rejected a parameter or the input, for example input longer than it takes. Check the request. |
429 rate_limited | Wait the seconds in Retry-After, or use a key with a higher per-minute limit. |
502, 503 upstream_capacity, 504 | No deployment could answer. Try again shortly. |
503 upstream_unavailable, "Model API is paused" | Try again later. |
A stream ends with event: error and incomplete_stream | The 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 see | What to do |
|---|---|
400 invalid_request about Idempotency-Key | Send 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 see | What 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 fails | The rest of the file system is read-only, and there is no sudo. |
| A connection out on a port other than 80 or 443 fails | Only HTTP and HTTPS go out. See Quotas and network. |
VMs
| What you see | What 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 CIDR | Use a range of /8 or narrower for IPv4, /32 or narrower for IPv6. |
| SSH times out | Check 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 key | Log 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
| Message | What 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_code | What happened |
|---|---|
boot_timeout | It didn't become ready within 10 minutes. Nothing was charged. |
capacity | No machine of this size was available. Nothing was charged. Try again later or pick another size. |
timeout | The sandbox reached its timeout_s. |
idle_timeout | The sandbox had no command, file call or keepalive for idle_timeout_s. |
agent_lost | The sandbox stopped reporting for more than 2 minutes. |
lease_expired | The VM's lease ended and it was stopped. Renew and start it within 24 hours to keep it. |
retention_expired | The VM was stopped for 24 hours and was deleted. |
insufficient_funds, key_limit_reached | The stopped rate of a VM couldn't be covered, so it was deleted. |
action_uncertain | A reboot or reinstall was interrupted. The VM was stopped and closed off. Delete it, or contact us. |
provider_lost, provider_failed | The machine was lost or failed on our side. Create a new one. |
org_inactive | The workspace was suspended. |
compute_paused | We paused compute. |