Skip to main content

Step 1: Obtain the API Key

  1. Log in to the API Console for Overseas Operations
  2. Go to the token page and create a API Key
  3. Then use it via Authorization: Bearer YOUR_API_KEY

Step 2: Configure Base URL

API_BASE_URL="https://api.aiid.edu.kg"
If the existing client default is set to:
  • https://api.openai.com
  • https://api.openai.com/v1
Then replace them with:
  • https://api.aiid.edu.kg
  • https://api.aiid.edu.kg

Step 3: Send your first request

Python

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.aiid.edu.kg",
)

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

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

cURL

curl https://api.aiid.edu.kg/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello world!"}]
  }'

Integration Recommendations

  • For new projects, start with the OpenAI compatible API first
  • For image editing, be sure to pay attention to multipart/form-data and the file field requirements
  • For the video task API, save task_id or operation_name first before querying
  • If debugging fails, first check the HTTP status code, error.code, and error.message

Next Steps

  • Online debugging: see en/online-debug
  • AI-generated calling code: see en/ai-codegen
  • Model groups and capabilities: see en/models