Ali
Ali2y ago

Hit external APIs ...

I'm new to tRPC, I need to hit an external API (OpenAI) directly from the client-side. Can I still use tRPC for that? If not do I have to wrap my app in Nextjs with React-Query wrapper?
5 Replies
Nick
Nick2y ago
TRPC would be an intermediate layer which can hide things like API keys for external services It’s an API in its own right, so if you don’t need that you’d be best off using react-query with the other service directly
Ali
AliOP2y ago
actually, I need both. I need to perform requests to internal & external APIs
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ali
AliOP2y ago
From the first look, I saw you are missing the organization key in the configuration. the organization key can be skipped if you hit their API from the client-side
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?