# CloudTalkAPI

**CloudtalkAPI** は、高性能な会話生成およびタスク処理を提供する API です。複数の AI モデルを活用して、自然な対話生成やタスクの実行が可能です。簡単な入力インターフェースを持ち、幅広いシナリオで活用できます。

***

#### **導入用途**

1. **カスタマーサポートの自動化**\
   サポートボットを通じて、顧客の質問に迅速かつ正確に応答します。
2. **コンテンツ生成の効率化**\
   ジョーク、物語、ブログ記事など、さまざまなコンテンツを自動生成します。
3. **教育アシスタント**\
   質問への回答や課題のサポートを行い、教育現場での利用をサポートします。
4. **会話型アプリケーションの構築**\
   人工知能を活用したチャットボットや仮想アシスタントを作成します。
5. **クリエイティブライティングの補助**\
   執筆支援やアイデアのブレインストーミングに役立ちます。

***

#### **Base URL**

```
https://cloudtalk-mixederapi.mixeder.com/
```

***

#### **Endpoints**

**POST /**

指定されたタスクを処理し、会話の生成または関連タスクの実行を行います。

**Headers**

| ヘッダー名          | 必須 | 説明                 |
| -------------- | -- | ------------------ |
| `Content-Type` | はい | `application/json` |

**Request Body**

| パラメーター名  | 必須  | 説明                                                         |
| -------- | --- | ---------------------------------------------------------- |
| `key`    | はい  | 使用する API キー                                                |
| `system` | いいえ | AI モデルに与えるシステムプロンプト（デフォルト: "You are a helpful assistant."） |
| `user`   | いいえ | ユーザーからの入力メッセージ（デフォルト: "Who won the world series in 2020?"） |

**Response**

* 成功時:\
  **HTTP Status**: 200\
  **Body**:

  ```json
  {
    "message": "API authentication, task processing, and billing completed successfully",
    "username": "user",
    "tasks": [
      {
        "inputs": {
          "messages": [
            {
              "role": "system",
              "content": "You are a helpful assistant."
            },
            {
              "role": "user",
              "content": "Who won the world series in 2020?"
            }
          ]
        },
        "response": {
          "response": "The Los Angeles Dodgers won the World Series in 2020, defeating the Tampa Bay Rays in six games (4-2). It was the Dodgers' first World Series title since 1988!"
        }
      }
    ],
    "billingResponse": "{\"status\":\"success\"}"
  }
  ```
* エラー時:\
  **HTTP Status**: 400 または 500\
  **Body**:

  ```json
  {
    "error": "Error message"
  }
  ```

***

#### **リクエストはすべてGETメゾットで行います。クエリ文字列に変数を代入してください。**
