API Call
Introduction
Wahoo AI streamlines API requests and responses for OpenAI, Claude, and Gemini by establishing a standardized format. This unified approach greatly simplifies the integration process and makes it easier for third-party clients to work with multiple AI platforms. By providing a consistent interface, Wahoo AI enhances efficiency and minimizes the time and effort developers need to adapt to different systems. This standardization ensures a more seamless user experience, enabling developers to focus on innovation and building applications rather than grappling with compatibility challenges across platforms.
Open AI
Curl Invocation Method
(Please replace the token sk-xxxxxx)
curl https://my.wahooai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Open AI Python Invocation Method
from openai import OpenAI
client = OpenAI(
base_url='https://my.wahooai.com/v1',
api_key='sk-xxxxxx',
)
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Hello",
}
],
model="gpt-4o-mini",
)
Google Gemini
Curl Invocation Method
curl https://my.wahooai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "gemini-1.5-pro",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Anthropic Claude
Curl Invocation Method
curl https://my.wahooai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "claude-3-5-sonnet-20241022",
"messages": [{"role": "user", "content": "Hello!"}]
}'