API Documentation

Quick integration guide and complete API reference

Errors

Identify the error type before changing settings

Most integration failures can be narrowed down from the HTTP status code first. For a first debug pass, check the API key, model ID, quota, and request URL before changing multiple settings at once.

If the error response includes a request_id, keep it and include it when contacting us so we can locate the issue.

Start with these checks

401

Authentication failed

Check that Authorization uses the Bearer sk-xxxx format, that the API key was copied completely, and that the key is still valid.

404

Model not found

Check that the model field contains a real callable model ID. Do not use only a vendor name, capability label, or placeholder.

402

Insufficient quota

Check account balance, token quota limits, promotional request benefits, and whether the request exceeds available quota.

429

Too many requests

Reduce concurrency or request frequency. Avoid retry loops that run without a limit.

Find the issue you are seeing

I see authentication failed, unauthorized, or 401. What should I check first?
Confirm the header is Authorization: Bearer sk-xxxx, with one space between Bearer and the key. Then check that the key was copied completely, has not expired, and is actually being sent by the current tool to WEI HUB.
I see model not found or 404. How should I fix it?
Check that the model field contains a real callable model ID from the platform. Do not use a vendor name, broad capability label, or the YOUR_MODEL_ID placeholder. If the token has model restrictions, confirm that this token can access the model.
I see insufficient quota or 402. Where should I look?
Check account balance, token quota limits, promotional request benefits, and whether the selected model or multimodal capability costs more than expected. If needed, run a low-cost text model first just to verify connectivity.
I see too many requests or 429. Should I keep retrying?
Do not retry forever. Lower concurrency and request frequency, and add a max retry count with backoff. For batch jobs, split the queue and record failures so the same model is not hit repeatedly in a short window.
HTTPError TypeDescription
400invalid_request_errorInvalid request parameters or missing required fields.
401authentication_errorToken is missing, invalid, or expired.
402insufficient_quotaQuota is insufficient, or promotional request benefits are exhausted and paid billing cannot continue.
404model_not_foundModel does not exist or currently has no active bound channel.
429rate_limit_errorRate limit exceeded.
500server_errorInternal platform error. Please contact us.