Most API endpoints I've tried have browser/CORS support enabled when headers set via dangerouslyAllowBrowser: true, but it appears the Message Batches endpoint does not. I tried making a request and it gave me a CORS error. I ran the same request via copying as curl and it succeeded. I then made a request in the browser to the messages and models API, and both worked, so this appears to be an issue specific to the message batches API.
Access to fetch at 'https://api.anthropic.com/v1/messages/batches' from origin 'http://localhost:5174' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I don't see any documentation about this, so I think it's a misconfiguration on the /v1/messages/batches endpoint.
Most API endpoints I've tried have browser/CORS support enabled when headers set via
dangerouslyAllowBrowser: true, but it appears the Message Batches endpoint does not. I tried making a request and it gave me a CORS error. I ran the same request via copying as curl and it succeeded. I then made a request in the browser to the messages and models API, and both worked, so this appears to be an issue specific to the message batches API.I don't see any documentation about this, so I think it's a misconfiguration on the /v1/messages/batches endpoint.