Documentation Index Fetch the complete documentation index at: https://portkey-docs-mintlify-gateway-updates-1774431741.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Quick start
Get started with Latitude AI in under 2 minutes:
Python
Javascript
OpenAI Py
OpenAI JS
cURL
from portkey_ai import Portkey
# 1. Install: pip install portkey-ai
# 2. Add @latitude provider in model catalog
# 3. Use it:
portkey = Portkey( api_key = "PORTKEY_API_KEY" )
response = portkey.chat.completions.create(
model = "@latitude/qwen-2.5-7b" ,
messages = [{ "role" : "user" , "content" : "Hello!" }]
)
print (response.choices[ 0 ].message.content)
Add provider in model catalog
Before making requests, add Latitude AI to your Model Catalog:
Go to Model Catalog → Add Provider
Select Latitude
Enter your Latitude AI API key
Name your provider (e.g., latitude)
Complete Setup Guide See all setup options and detailed configuration instructions
Latitude AI capabilities
Use Latitude AI’s tool calling feature to trigger external functions:
from portkey_ai import Portkey
portkey = Portkey( api_key = "PORTKEY_API_KEY" )
tools = [{
"type" : "function" ,
"function" : {
"name" : "getWeather" ,
"description" : "Get the current weather" ,
"parameters" : {
"type" : "object" ,
"properties" : {
"location" : { "type" : "string" , "description" : "City and state" },
"unit" : { "type" : "string" , "enum" : [ "celsius" , "fahrenheit" ]}
},
"required" : [ "location" ]
}
}
}]
response = portkey.chat.completions.create(
model = "@latitude/qwen-2.5-7b" ,
messages = [
{ "role" : "system" , "content" : "You are a helpful assistant." },
{ "role" : "user" , "content" : "What's the weather like in Delhi?" }
],
tools = tools,
tool_choice = "auto"
)
print (response.choices[ 0 ].finish_reason)
JSON output
Force structured JSON responses from Latitude AI models:
from portkey_ai import Portkey
portkey = Portkey( api_key = "PORTKEY_API_KEY" )
response = portkey.chat.completions.create(
model = "@latitude/qwen-2.5-7b" ,
messages = [
{ "role" : "system" , "content" : "Respond in JSON format with keys: answer, confidence" },
{ "role" : "user" , "content" : "What is the capital of France?" }
],
response_format = { "type" : "json_object" }
)
print (response.choices[ 0 ].message.content)
Supported models
Model Context Features qwen-2.5-7b131K Tools, JSON mode llama-3.1-8b128K Tools, JSON mode qwen3-32b131K Tools, JSON mode gemma-2-27b8K Tools, JSON mode deepseek-r1-distill-14b64K Tools, JSON mode, Reasoning qwen2.5-coder-32b131K Tools, JSON mode qwen-2.5-vl-7b32K Tools, JSON mode, Vision
Latitude AI Models View the complete list of models available on Latitude AI
Next steps
Gateway Configs Add fallbacks, load balancing, and more
Observability Monitor and trace your Latitude AI requests
Prompt Library Manage and version your prompts
Metadata Add custom metadata to requests
For complete SDK documentation:
SDK Reference Complete Portkey SDK documentation