Title: API URL bug
Last modified: December 3, 2024

---

# API URL bug

 *  Resolved [nuranto](https://wordpress.org/support/users/nuranto/)
 * (@nuranto)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/api-url-bug/)
 * Hello !
 * Congrats and thanks for your work !
 * Just to let you know about a bug : When using via tinymce (ACF field…), it doesn’t
   work on our configuration probably because our WP is installed into a subdirectory(
   [https://ourdomain.com/blog/](https://ourdomain.com/blog/)).
 * This is probably due to the use of raw URL like this : `fetch('/wp-json/ai-content-
   helper/openai/v1/generated-content', ...`. So we get a 404 when it calls `https://
   ourdomain.com/wp-json/...` instead of `https://ourdomain.com/blog/wp-json/...`
 * A solution would be to use `rest_url` method instead of raw URLs.
    -  This topic was modified 1 year, 6 months ago by [nuranto](https://wordpress.org/support/users/nuranto/).
    -  This topic was modified 1 year, 6 months ago by [nuranto](https://wordpress.org/support/users/nuranto/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [WP Messiah](https://wordpress.org/support/users/wpmessiah/)
 * (@wpmessiah)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18178232)
 * Hello Sir,
   Thank you for bringing this issue to our attention and for your detailed
   explanation. It’s greatly appreciated!We truly value your feedback, and we’ll
   make sure to address this in the next plugin update.
 * Your suggestions not only enhance the product for yourself but also for all our
   users.
 * Best Regards,
   BoomDevs
 *  Thread Starter [nuranto](https://wordpress.org/support/users/nuranto/)
 * (@nuranto)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18192045)
 * Thank you very much !
 * I’ll wait for next release then !
 *  Thread Starter [nuranto](https://wordpress.org/support/users/nuranto/)
 * (@nuranto)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18259044)
 * Here is a quick help for a fix :
 *     ```wp-block-code
       -            const response = await fetch('/wp-json/ai-content-helper/openai/v1/generated-content', {+            const apiEndpoint = wpApiSettings.root + 'ai-content-helper/openai/v1/generated-content';+            const response = await fetch(apiEndpoint, {
       ```
   
 * Of course, you should do the same everywhere the api is called.
 *  Plugin Author [WP Messiah](https://wordpress.org/support/users/wpmessiah/)
 * (@wpmessiah)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18260265)
 * Hello Sir,
   Thank you for reaching out and informing us about the issue. We sincerely
   apologize for the delayed response.Our team had already fixed the issue earlier,
   but the update was not released yet. However, we will be rolling out the updated
   version **today or by tomorrow**. Once it’s available, please update the plugin
   to resolve the problem.If you face any further issues, please don’t hesitate 
   to reach out. We’re always here to help!Best Regards, WP Messiah
 *  Thread Starter [nuranto](https://wordpress.org/support/users/nuranto/)
 * (@nuranto)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18301397)
 * Great, thank you !
 *  Thread Starter [nuranto](https://wordpress.org/support/users/nuranto/)
 * (@nuranto)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18311208)
 * It seems it is not released yet, do you have an ETA ?
 *  Plugin Author [WP Messiah](https://wordpress.org/support/users/wpmessiah/)
 * (@wpmessiah)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18312380)
 * Hello Sir,
   Thank you for your question! The updated version of the plugin will
   be released soon, and you will be notified once it’s available. At this moment,
   we don’t have a specific ETA, as our team is working diligently to finalize the
   update as quickly as possible.
 * In the meantime, if you encounter any issues while using the plugin, please don’t
   hesitate to reach out. We’re always here to help!
 * Let us know if you need any further assistance.
   Best Regards, WP Messiah

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘API URL bug’ is closed to new replies.

 * ![](https://ps.w.org/ai-co-pilot-for-wp/assets/icon.svg?rev=2933471)
 * [WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance](https://wordpress.org/plugins/ai-co-pilot-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-co-pilot-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-co-pilot-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-co-pilot-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-co-pilot-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-co-pilot-for-wp/reviews/)

## Tags

 * [urgent](https://wordpress.org/support/topic-tag/urgent/)

 * 7 replies
 * 2 participants
 * Last reply from: [WP Messiah](https://wordpress.org/support/users/wpmessiah/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/api-url-bug/#post-18312380)
 * Status: resolved