Skip to content

FAQ ​

API Key, can you put it at the front end? ​

Not recommended. API Key should be saved in a service-end, environment variable or key management tool. The front-end page, mobile end-package, open warehouse, cut-off chart and log should not appear as a real API Key.

Base URL. Which one should we use? ​

You can choose by the following access scene:

Domain NameRecommended scene
https://moonnexai.comMain call domain name, recommended priority.
https://moonnexai.comThe domestic long request backup.
https://moonnexai.comDomestic accelerated back-up line.

API path and authentication approach are consistent. The Base URL of the OpenAI-compatible client usually requires /v1 after the selected domain name.

Why return to 401? ​

Common causes:

  • Authorization header missing.
  • API Key is either miswritten or invalid.
  • Use <MOONNEXAI_API_KEY> placeholders as real keys.
  • request lost authentication header when passing through the agent or gateway.

Why return to 403? ​

This usually means that the model or capability is not enabled for your account. Check the model ID and account permissions.

Why did you return to 429. ​

The request rate is too high or exceeds your account limits. Reduce concurrency, increase retry intervals and poll asynchronous tasks at a reasonable frequency.

How long do asynchronous tasks take? ​

Processing time varies by capability. Images and audio are usually faster; video, digital human and music tasks may take longer. Your application should handle a processing state and let users refresh the result later.

Can we try again when task fails? ​

Yes, but it is suggested that the reasons for failure be examined first:

  • Invalid parameters: correct the request before resubmitting.
  • media assets is non-compliant or inaccessible: replace media assets.
  • Insufficient: full-time before submission.
  • Temporary anomaly: use of index to avoid re-testing.

It is recommended that a new task be created and that the original task ID and new task ID be recorded in the operating system.

What if we lose Webhook? ​

Do not rely on webhooks as your only source of results. Save the task ID and query the task API for its final state.

And the result is, will the URL remain valid? ​

Result URLs have different lifetimes. Read and save results promptly after success. If a URL expires, query the task again or generate a new result as your application requires.

Can you submit a batch of task? ​

Yes, but limit concurrency. For each task in a batch, record its model, request parameters, business order ID, status and result URL.

How do you confirm that old API is contained in the new document? ​

View Endpoint directory or API Reference. The current OpenAPI has overwrited all API operations in the export file and prevents the missing path by overchecking.