# モデルの統合方法

{% hint style="info" %}
注：セッションのステータスが RUNNING の場合、Get API Endpoint が有効になります
{% endhint %}

<figure><img src="/files/vGT1ucGgKqLlJRa3iieX" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### 必要な情報を取得する

提供内容：

<table><thead><tr><th width="132.59991455078125">オブジェクト</th><th>説明</th></tr></thead><tbody><tr><td>エンドポイントURL</td><td>アプリケーションがサービスとやり取りするためにリクエストを送信するアドレス。</td></tr><tr><td>ベアラートークン</td><td><p>APIへのアクセス権限を証明する文字列。 </p><p>注意:</p><ul><li>トークンをパブリックなコードやリポジトリに 公開しないでください。</li><li>環境変数やセキュアな保管庫に保管してく ださい。</li></ul></td></tr><tr><td>モデル</td><td>インタラクティブセッションズプラットフォーム上でホストされている特定のAIモデルを一意に識別する識別子。</td></tr><tr><td>サンプルコード</td><td><p>詳細情報（以下を含む）：</p><ul><li>エンドポイントURL</li><li>ベアラートークン</li><li>モデルID</li><li>メッセージ（システム、ユーザー、アシスタント）</li><li>温度</li></ul></td></tr></tbody></table>
{% endstep %}

{% step %}

### 統合プラットフォームを選択

{% endstep %}

{% step %}

### APIにリクエストを送信

Pythonを使用した例：

```json
import requests
url = "https://api.gptcloud.com/aiam/v1/chat/completions"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer pR2vV0zGZ0nP6tQ3gFJk9wXn0"
}
payload = {
    "model": "62d8b2e6-42f9-4c17-95f8-4ca93d74f396",
    "messages": [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ],
    "temperature": 0.7
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-ai-studio/sbisu/moderutesuto-sesshon/chtoriaru/moderuno-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
