Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
All solutions
    • All solutions for Cloud Functions
    • You see a CORS error when accessing the SpeechKit, Vision, or Translate API from your web application frontend
    • Fixing HTTP 499 errors when working with a cloud function or serverless container
    • How to set up a static IP address

In this article:

  • Issue description
  • Solution
  1. Cloud Functions
  2. You see a CORS error when accessing the SpeechKit, Vision, or Translate API from your web application frontend

You see a CORS error when accessing the SpeechKit, Vision, or Translate API from your web application frontend

Written by
Yandex Cloud
Updated at September 12, 2023
  • Issue description
  • Solution

Issue descriptionIssue description

When you try to access the SpeechKit, Vision, or Translate API, the service returns a CORS error.

E.g.:

Access to XMLHttpRequest at '<https://vision.api.cloud.yandex.net/vision/v1/batchAnalyze>' from origin '...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin'

SolutionSolution

You cannot enable direct interaction between an application running in a frontend environment, and the API. Our AI services (Vision, SpeechKit, or Translate) can't handle cross-domain requests because the APIs of these services have not implemented a response to the OPTIONS request.

You can use Cloud Functions for this. In the service, you'll need to create a cloud function and implement in it an API that will deliver requests to SpeechKit, Vision, or Translate.

Was the article helpful?

Previous
All solutions for Cloud Functions
Next
Fixing HTTP 499 errors when working with a cloud function or serverless container
Yandex project
© 2025 Yandex.Cloud LLC