API Invocation

Introduction

Wahoo AI standardizes requests and responses by using a unified format to call OpenAI, Claude, and Gemini. This approach greatly simplifies the calling process and facilitates integration for third-party clients. The unified interface not only improves efficiency but also reduces the time and effort developers spend adapting to different AI platforms. Through this standardized method, Wahoo AI provides a smoother and more seamless user experience, allowing developers to focus more on innovation and application development without being troubled by compatibility issues across different platforms.

1. Using the OpenAI SDK

Wahoo AI is fully compatible with the official OpenAI SDKs. You can simply change the base URL and API key to start using our service.

import openai

client = openai.OpenAI(
    api_key="sk-...", # Your Wahoo AI API Key
    base_url="https://api.wahooai.com/v1"
)

response = client.chat.completions.create(
    model="gpt-5-mini",
    messages=[
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

print(response.choices[0].message.content)

2. Using HTTP Requests

You can also communicate directly with the API using standard HTTP requests.

curl https://api.wahooai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-..." \
  -d '{
    "model": "gpt-5-mini",
    "messages": [
      {
        "role": "user",
        "content": "Hello world!"
      }
    ]
  }'

3. Gemini

Wahoo AI provides a native Gemini API and an OpenAI-compatible API.

Google Gemini

curl https://api.wahooai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
    "model": "gemini-3-flash-preview",
    "messages": [
      {
        "role": "user",
        "content": "Hello Gemini!"
      }
    ]
  }'

4. Claude

Wahoo AI provides a native Claude API and an OpenAI-compatible API.

Anthropic Claude

curl https://api.wahooai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
    "model": "claude-3-5-sonnet-20240620",
    "messages": [
      {
        "role": "user",
        "content": "Hello Claude!"
      }
    ]
  }'

5. xAI Grok

xAI Grok

The calling method for xAI models is consistent with Open AI; simply replace the model name.