> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiid.edu.kg/llms.txt
> Use this file to discover all available pages before exploring further.

# クイックスタート

> API Key を取得し、Base URL を置き換えて最初のリクエストを送信します。

## ステップ1：API Key を取得する

1. [出海营 API コンソール](https://aiid.edu.kg/console) にログインする
2. トークンページに移動し、API Key を作成する
3. 以降は `Authorization: Bearer YOUR_API_KEY` から利用します

## ステップ2：Base URL を設定する

```bash theme={null}
API_BASE_URL="https://api.aiid.edu.kg"
```

既存のクライアントでデフォルトが以下のように記述されている場合：

* `https://api.openai.com`
* `https://api.openai.com/v1`

それぞれ次のように置き換えます：

* `https://api.aiid.edu.kg`
* `https://api.aiid.edu.kg`

## ステップ 3: 最初のリクエストの送信

### Python

```python theme={null}
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

```bash theme={null}
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!"}]
  }'
```

## 導入のアドバイス

* 新規プロジェクトは、まず OpenAI 互換 API から始める
* 画像編集では、`multipart/form-data` とファイルフィールドの要件に必ず注意してください
* 動画タスク API では、先に `task_id` または `operation_name` を保存してから照会してください
* デバッグに失敗した場合は、まず HTTP のステータスコード、`error.code`、および `error.message` を確認する

## 次のステップ

* オンラインデバッグ：`ja/online-debug`を参照
* AI コード生成：`ja/ai-codegen` を参照
* モデルのグループ化と機能：`ja/models` を参照
