CDAPI DOCS

ERROR RECOVERY

Identify the failing layer first

Keep the HTTP status, complete error body, request time, and Request ID. Test authentication, path, model, group, quota, and upstream routing in that order.

Choose a failure

Diagnostic order

  1. Save the original status, error body, model ID, time and timezone, and Request ID.
  2. Use the minimal request below to separate client configuration from the CDAPI connection.
  3. Check usage logs. No log usually means the request did not reach CDAPI.
Minimal connection test
curl -i https://ai.bycomet.cc/v1/models \
  -H "Authorization: Bearer $CDAPI_API_KEY"

HTTP 401

Unauthorized

  • Copy the complete key again and remove spaces or extra quotes.
  • Send exactly Authorization: Bearer sk-....
  • Confirm that the key is enabled and has not expired.
  • Restart the process if it may still hold an old environment variable.
Never include the full key in support details

Use a redacted form such as sk-abcd...wxyz.

HTTP 404

Not Found

Client type Correct value Common mistake
OpenAI compatible https://ai.bycomet.cc/v1 Entering the full /v1/chat/completions path
Claude Code https://ai.bycomet.cc Adding /v1 before the client adds it
Direct HTTP Complete resource URL Requesting only the Base URL

Inspect the final URL for /v1/v1/, a duplicated resource path, or a missing /v1.

HTTP 429

Rate limit or quota exceeded

  1. Read the error body to distinguish account balance, key quota, concurrency, and upstream rate limits.
  2. Check for an agent or client loop sending concurrent retries.
  3. Honor Retry-After or use bounded exponential backoff with jitter.
  4. If one model remains limited, choose another currently available model with the required capability.

HTTP 500 / 502 / 503 / 504

Gateway or upstream failure

  1. Keep the Request ID and confirm whether the same request was already retried.
  2. Call /v1/models with the same key to verify the platform connection.
  3. Retry only idempotent or safely repeatable requests, with a hard attempt limit.
  4. For a persistent single-model failure, check Models and switch to a currently available route.
  5. Use https://api-direct.ai.bycomet.cc/v1 for long requests or gateway timeouts.
Do not blindly retry generation tasks

Check the task list or usage logs first to avoid duplicate tasks and charges.

MODEL ROUTING

Model not found or unavailable

  1. Copy the exact ID from Models or the live catalog.
  2. Confirm that the key group appears in the model's available groups.
  3. Match the request route to the model's supported endpoint types.
  4. Clear any model list cached by the client and sync again.

TIMEOUT / CONNECTION

Timeout or disconnect

  1. Use curl -i https://ai.bycomet.cc/v1/models to test DNS, TLS, and authentication.
  2. If there is no usage log, inspect the local network, proxy, and final client URL.
  3. If a log exists, move long-running work to https://api-direct.ai.bycomet.cc/v1.
  4. Increase the client read timeout while keeping bounded retries and a total deadline.
  5. Create video tasks asynchronously and poll their status.

SERVER-SENT EVENTS

Streaming stalls or arrives at once

  1. Set "stream": true.
  2. Consume Content-Type: text/event-stream line by line and parse each data: event.
  3. Disable buffering in local or reverse proxies.
  4. Verify the same model with a non-streaming request before debugging SSE.

Send diagnostic support details

  • Time and timezone
  • HTTP status and complete error body
  • Request ID or task ID
  • Request path and Base URL
  • Model ID and key group
  • A redacted key

Contact [email protected] or the Telegram · 交流群.