Integrations
OpenAI
Calling OpenAI
The standard way to call a third-party endpoint in your workflow is by using context.call
.
However, if you need to call the OpenAI endpoint for text generation (/v1/chat/completions
), you can leverage the type-safe method context.api.openai.call
method:
OpenAI
The SDK provides predefined types for the body field in both the request parameters and the response, simplifying common use cases. If you need to customize these types, you can override them as shown below:
OpenAI Compatible Provider
If you want to call an OpenAI compatible provider, you can do so using the baseURL
parameter:
Was this page helpful?