How it Works
- Define tools: Tell the model about available functions and their parameters.
- Generate arguments: The model decides to call a tool and returns the arguments.
- Execute tool: Run the function in your application.
- Final answer: Send the tool output back to the model to generate a natural language response.
Example: Weather Forecast
To get the weather for a specific location:Unified API Support
Portkey supports function calling across different API formats. Use the one that fits your application to call any provider’s model./chat/completions
Standard OpenAI-compatible format used by most providers./messages
Anthropic-compatible format supported by all models through Portkey’s translation./responses
Unified agentic format for multi-provider interoperability.Supported Models
Portkey provides native function calling support for all major providers. If you discover a function-calling capable LLM that isn’t working with Portkey, please let us know at support@portkey.ai.Portkey supports parallel tool calling for models that provide it. This allows the model to trigger multiple functions in a single request.
Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us

