r/opencodeCLI • • 7h ago

Using the opencode API key for Chat Only UI

I have been working on a minimal frontend-only Chat interface for AI (https://github.com/prastavna/aiui).

I was hoping to use the opencode API key for inference. But I am blocked by CORS. Wanted to know if it's possible?

Error:
Access to fetch at 'https://opencode.ai/inference/go/openai/v1/chat/completions' from origin '<redacted> 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.

1 Upvotes

0 comments sorted by