Code Integration
Responses API
This guide explains how to use the OpenAI client to interact with TrueFoundry’s responses endpoint for making inference requests.
Authentication
You’ll need a TrueFoundry API key to authenticate your requests. You can find authentication details from here.
You’ll also need to set the x-tfy-provider-name
header to the name of the provider integration you’re using.
For example, if you’re using an OpenAI provider integration named my-openai-provider
, you’ll set the x-tfy-provider-name
header to my-openai-provider
.
Text Completion
To get a text completion response:
Image Inputs
For tasks involving images:
Managing Responses
Retrieve Response
To fetch a response using its ID:
Delete Response
To delete a response: