Functions Usage
Portkey supports the OpenAI signature to define functions. Pass thetools parameter to models that support function/tool calling.
- NodeJS
- Python
- OpenAI NodeJS
- OpenAI Python
- cURL
API Reference
On completion, the request logs in the Portkey UI where tools and functions are visible. Portkey automatically formats the JSON blocks in the input and output for easier debugging.
Managing Functions and Tools in Prompts
Create prompt templates with function/tool definitions in Portkey’s Prompt Library. Set thetool_choice parameter, and Portkey validates your tool definition on the fly, eliminating syntax errors.

Supported Providers and Models
Portkey provides native function calling support across all major AI providers. If you discover a function-calling capable LLM that isn’t working with Portkey, please let us know on Discord.Cookbook
See the detailed cookbook on function calling.Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us

