DeepAnima
Kouri AiApp Integration

Build & Migrate Apps

Kouri Ai is fully compatible with OpenAI API format. You can easily develop your own AI applications or migrate existing OpenAI applications to Kouri Ai.

Migrate Existing Apps

If you already have an application using OpenAI API, simply change the Base URL to:

https://api.kourichat.com

No other code changes needed!

Code Examples

Python

from openai import OpenAI

client = OpenAI(
    api_key="your-kouri-ai-token",
    base_url="https://api.kourichat.com/v1"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

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

JavaScript / Node.js

import OpenAI from 'openai';

const client = new OpenAI({
    apiKey: 'your-kouri-ai-token',
    baseURL: 'https://api.kourichat.com/v1'
});

const response = await client.chat.completions.create({
    model: 'gpt-4o',
    messages: [
        { role: 'user', content: 'Hello!' }
    ]
});

console.log(response.choices[0].message.content);

cURL

curl https://api.kourichat.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-kouri-ai-token" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

More Resources

Kouri Ai is compatible with OpenAI SDK. You can directly use the official OpenAI SDK - just modify the base_url.

On this page