Replace
YOUR_CONTROL_PLANE_URL with your actual TrueFoundry control plane
URL and YOUR_API_KEY with your API key throughout this guide.Add Models
API Overview
Here is the curl command example to add a model as a model account:Request Schema
The Apply API accepts aTrueFoundryApplyRequest object with the following structure:
The manifest object defining the resource to be created or updated. For model
accounts, this should be a
ModelProviderAccount object.When set to
true, performs a dry run without actually creating or updating
the resource. Useful for validation.ModelProviderAccount Schema
For creating model accounts, the manifest should be aModelProviderAccount object. This is a union type that can be one of any of the following model account types:
Supported Model Account Types:
- 🔗 AwsBedrockProviderAccount - AWS Bedrock models
- 🔗 GoogleVertexProviderAccount - Google Vertex AI models
- 🔗 GoogleGeminiProviderAccount - Google Gemini models
- 🔗 AzureOpenAIProviderAccount - Azure OpenAI models
- 🔗 AnthropicProviderAccount - Anthropic Claude models
- 🔗 OpenaiProviderAccount - OpenAI models
- 🔗 CohereProviderAccount - Cohere models
- 🔗 GroqProviderAccount - Groq models
- 🔗 MistralAIProviderAccount - Mistral AI models
- 🔗 TogetherAIProviderAccount - Together AI models
- 🔗 OllamaProviderAccount - Ollama models
- 🔗 SelfHostedModelProviderAccount - Self-hosted models
- For more details, see the ModelProviderAccount type.
The model account type (e.g., “provider-account/openai”,
“provider-account/anthropic”, etc.)
Name of the model account. Must be 3-32 characters, lowercase alphanumeric
with hyphens, cannot start with a number.
Response Schema
Response Fields
Examples
Error Handling
The Apply API may return various error responses. Common scenarios include:- 400 Bad Request: Invalid manifest structure or missing required fields
- 401 Unauthorized: Invalid or missing API key
- 403 Forbidden: Insufficient permissions for the operation
- 404 Not Found: Model account not found
- 409 Conflict: Model account with the same name already exists
- 422 Unprocessable Entity: Invalid provider credentials or configuration
List Models
You can list and retrieve model integrations using the List Provider Integrations API. This allows you to query existing model integrations with filtering and pagination support.API Overview
Here is the curl command example to list model integrations:Query Parameters
Response Schema
Response Fields
Examples
Error Handling
The List API may return various error responses. Common scenarios include:- 400 Bad Request: Invalid query parameters (e.g., both
fqnandidprovided) - 401 Unauthorized: Invalid or missing API key
- 404 Not Found: Integration with specified
idorfqnnot found