> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/jp/tong-he/curltohttpwounslothnisuru.md).

# CurlとHTTPをUnslothに接続する

curl（または任意の HTTP クライアント）で Unsloth の API を叩くためのガイド。各エンドポイントと機能に対してコピペ可能なレシピ付きです。

Unsloth は、Unsloth が起動したポートの同じベース URL で、OpenAI／Anthropic 互換のワイヤ形式を3種類提供します。いずれも次の `Authorization: Bearer sk-unsloth-…` ヘッダーを受け取り、 `stream`.

の設定に応じて、JSON または SSE を返します。このページでは、エンドポイント（`/v1/chat/completions`, `/v1/messages`, `/v1/responses`, `/v1/models`, `/v1/embeddings`, `/v1/systemone`）ごとにレシピをまとめ、最後に、すべてのチャットエンドポイントで使える Unsloth 組み込みの **サーバーサイドツール**について共通のセクションを設けています。

{% hint style="info" %}
使用する URL、キー、モデル名がわからない場合は、まず API の概要をお読みください。Unsloth の起動、モデルの読み込み、 `sk-unsloth-…` キーの作成方法を順を追って説明しています。
{% endhint %}

### 🔑 認証

すべてのリクエストに、次の `Authorization` ヘッダーが必要です。

```
Authorization: Bearer sk-unsloth-xxxxxxxxxxxx
```

シェルの履歴にキーを残さないようにするには、キーを一度環境変数に設定し、以降は環境変数を参照します。

```bash
export UNSLOTH_STUDIO_AUTH_TOKEN=sk-unsloth-xxxxxxxxxxxx
```

以下の例では、わかりやすさのためにキーを `sk-unsloth-xxxxxxxxxxxx` として直接記載しています。実際には、 `$UNSLOTH_STUDIO_AUTH_TOKEN`.

### 📋 読み込み済みモデルの一覧

```bash
curl http://localhost:8888/v1/models \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx"
```

レスポンス：

```json
{
  "object": "list",
  "data": [
    {"id": "unsloth/gemma-3-27b-it-GGUF", "object": "model", "owned_by": "local"}
  ]
}
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FgVC1VPkCkUQBVg0HScEc%2FScreenshot%202026-04-22%20at%203.06.57%E2%80%AFAM.png?alt=media&amp;token=6f77cc78-bd0e-4141-b555-b232df1036dc" alt=""><figcaption></figcaption></figure>

リクエストで `id` 値が必要な場合は、このフィールドを使用します。また、opencode などのクライアントで `"model"` の値や **モデル ID**).

### 💬 Chat Completions（`/v1/chat/completions`)

OpenAI Chat Completions 形式です。最も幅広い互換性を備えています。OpenAI SDK、opencode、Cursor、Continue、Cline、Open WebUI、SillyTavern など、OpenAI 互換のほとんどのツールで使用できます。

#### 基本的なリクエスト

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fvy9TyeJZljKrMJAath0L%2FScreenshot%202026-04-22%20at%203.40.35%E2%80%AFAM.png?alt=media&amp;token=98f8d622-83c0-4f55-aa37-d3571f0a38cd" alt=""><figcaption></figcaption></figure>

#### ストリーミング

追加 `"stream": true` を指定すると、レスポンスは Server-Sent Events（`text/event-stream`）に切り替わります。 `curl` には、データが届くたびにフラッシュするよう `--no-buffer` (`-N`):

```bash
curl -N http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "Write a haiku about locally-run LLMs."}],
    "stream": true
  }'
```

レスポンスの各行は次のようになります。 `data: {"choices":[{"delta":{"content":"..."}}]}`そして最後は `data: [DONE]`.

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FsazSu4RpyiEa6HeamYbj%2FScreenshot%202026-04-22%20at%203.42.05%E2%80%AFAM.png?alt=media&amp;token=f62cf129-74cd-4e8e-986a-1755eeb0e048" alt=""><figcaption></figcaption></figure>

#### 画像（ビジョン）

ユーザーメッセージのコンテンツ部分に、 `image_url` として画像を添付します。URLにはHTTPSまたはbase64 `data:` URIを指定できます。

```bash
# ローカルファイルをbase64として埋め込む（簡潔にするため一部省略）
IMG=$(base64 -w 0 test.jpg)

cat > /tmp/request.json <<EOF
{
  "model":"default",
  "messages":[{"role":"user","content":[
    {"type":"text","text":"Describe the image."},
    {"type":"image_url","image_url":{"url":"data:image/jpeg;base64,$IMG"}}
  ]}],
  "max_tokens":200,
  "stream":false
}
EOF

curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d @/tmp/request.json
```

{% hint style="info" %}
読み込んだモデルはマルチモーダルである必要があります。テキスト専用モデルを読み込んだ場合、リクエストの構造上は成功しますが、モデルは画像を処理しません。
{% endhint %}

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F9yO7ersnyaIj3X8UkD5q%2FScreenshot%202026-04-22%20at%203.59.30%E2%80%AFAM.png?alt=media&amp;token=9e0af9e5-d565-4acd-8b4a-020c02d74cd8" alt=""><figcaption></figcaption></figure>

#### 関数呼び出し（OpenAI tools）

OpenAI形式の `tools` と（任意で） `tool_choice`を渡します。クライアント側で各ツール呼び出しを実行し、次のターンでその結果を返します。

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"default",
    "messages":[{"role":"user","content":"What is the weather in Paris?"}],
    "tools":[{
      "type":"function",
      "function":{
        "name":"get_weather",
        "description":"Get current weather for a city.",
        "parameters":{
          "type":"object",
          "properties":{"city":{"type":"string"}},
          "required":["city"]
        }
      }
    }],
    "tool_choice":"required"
  }' | jq '.choices[0].message, .usage'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F39CDJk0Z1WhG5JyaJIfV%2Ftests_codex_pr_2.png?alt=media&amp;token=c3f01286-7dc9-47dd-b7f9-9ee8c2d3cb2f" alt=""><figcaption></figcaption></figure>

### 📨 Anthropic Messages（`/v1/messages`)

Claude Code、Anthropic SDK、OpenClaw、およびMessages APIに対応するすべてのクライアントで使用される、UnslothのAnthropic互換形式です。

#### 基本的なリクエスト

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

{% hint style="warning" %}
`max_tokens` は、 `/v1/messages` では必須です（ `/v1/chat/completions`).
{% endhint %}

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FOz7xeC4dRnDjO5GDAsmC%2FScreenshot%202026-04-22%20at%204.01.52%E2%80%AFAM.png?alt=media&amp;token=b7025ce1-e3a8-46ad-91fa-e87b96a22d6b" alt=""><figcaption></figcaption></figure>

#### ストリーミング

```bash
では省略可能です）。
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Explain LoRA in two sentences."}],
    "stream": true
  }'
```

イベントはAnthropicのSSE形式に従います。 `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop`に加え、サーバー側ツールの出力用にUnsloth独自の `tool_result` イベントもあります。

#### 画像（ビジョン）

Anthropic形式の画像コンテンツでは、base64データを含む `source` ブロックを使用します。

```bash
IMG=$(base64 -w 0 test.jpg)

cat > /tmp/request.json <<EOF
{
  "messages":[{"role":"user","content":[
    {"type":"text","text":"Describe the image."},
    {"type":"image","source":{"type":"base64","media_type":"image/jpeg","data":"$IMG"}}
  ]}],
  "max_tokens":200,
  "stream":true
}
EOF

curl -s http://localhost/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d @/tmp/request.json
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FMkzYMtkw9dt0V7cbqduU%2FScreenshot%202026-04-22%20at%204.03.28%E2%80%AFAM.png?alt=media&amp;token=de854c5a-b399-4736-83bb-23ffe26981e2" alt=""><figcaption></figcaption></figure>

#### ツール呼び出し（Anthropicツール）

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Whats the weather in Tokyo?"}],
    "tools": [
      {
        "name": "get_weather",
        "description": "都市の現在の天気を取得",
        "input_schema": {
          "type": "object",
          "properties": {
            "city": {"type": "string"}
          },
          "required": ["city"]
        }
      }
    ],
    "tool_choice": {"type": "auto"}
  }'
```

`tool_choice` の値は、OpenAI形式では次のように対応します。Anthropicの `auto` → OpenAI `auto`、Anthropic `any` → OpenAI `required`、Anthropic `{type: "tool", name: "x"}` → OpenAI `{type: "function", function: {name: "x"}}`、Anthropic `none` → OpenAI `none`.

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fqb37JN1ffgBFBKyd1uWD%2FScreenshot%202026-04-22%20at%204.07.43%E2%80%AFAM.png?alt=media&amp;token=1fb7ec5d-8326-4e9f-b752-2d5d7e830a39" alt=""><figcaption></figcaption></figure>

### 🧬 Responses（`/v1/responses`)

Unsloth は、より新しい **OpenAI Responses API**, Codexやその他の最近のOpenAIクライアントが移行したプロトコルです。

```bash
curl http://localhost:8888/v1/responses \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "input": "Write a one-sentence greeting."
  }'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FhmyMSCTgdD1NYiLUdYNZ%2Fopenai_responses.png?alt=media&amp;token=dd56bd52-71db-46f3-8f6c-1499df8e443c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FZ3MEH4vV2RjxhLe0DsWJ%2Fresponses_function_calling.png?alt=media&amp;token=a8637d5a-51d2-47f5-9658-add9cdb757e3" alt=""><figcaption></figcaption></figure>

ストリーミングするには、次を追加します。 `"stream": true` また、次を使用します。 `curl -N`。Responsesのストリームでは、Chat Completionsのチャンクではなく、次のような名前付きイベントが使われます。 `response.output_text.delta`。

各リクエストで会話履歴全体を `input` に送信してください。Unsloth は `previous_response_id` や `conversation` によるサーバー管理の履歴には対応していません。

#### 埋め込み（`/v1/embeddings`)

読み込まれた埋め込み用 GGUF または Unsloth で設定された埋め込みモデルを使用して、テキストから埋め込みベクトルを生成します。

次の設定で `"model": "default"`を指定すると、Unsloth は利用可能な場合は常駐中の埋め込み用 GGUF を使用し、そうでない場合は設定済みの埋め込みモデルを使用します。

```bash
curl http://localhost:8888/v1/embeddings \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "input": [
      "Unsloth runs local models.",
      "Generate a vector for each text."
    ],
    "encoding_format": "float"
  }'
```

レスポンスには `data` 次の配列（各要素には `embedding` ベクトルと `index` が含まれます）を各入力に対して使用します。移植性を高めるにはテキスト入力を使用してください。トークン配列入力のサポートは、埋め込みバックエンドによって異なります。

#### Decision API（`/v1/systemone`)

有効にする **Decision API** で **Settings → API** し、まず判定モデルを選択してください。エンドポイントは、 `404` Decision API が無効な場合に返されます。

リクエストには `state` と、名前付きの `questions`が含まれます。サポートされている質問タイプは次のとおりです。

* `noul`：はい／いいえの判定。
* `choice`： `criteria`.
* `で指定した名前付き選択肢から選ぶ判定。`score `：`.

criteria `に指定した順序付きの基準レベルに基づくスコア。` 設定済みの判定モデルを選択するには、

```bash
"model": "default"
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    を使用します。
    curl http://localhost:8888/v1/systemone \
      "state": "The customer says their order arrived damaged and requests a refund.",
        "questions": {
        "refund_requested": {
      }
    }
  }'
```

"type": "noul",

```bash
"instructions": "Does the customer request a refund?"
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx"
```

判定モデルを確認するには、次を実行します。 `8888` curl "<http://localhost:8888/v1/models?output\\_modalities=decisions>" \\

### Unsloth のポートと、サンプルの API キーを自分のものに置き換えてください。

🧰 Unsloth のサーバーサイドツール（簡略記法） **クライアントサイドの関数呼び出しに加えて、Unsloth は**, **Python** 、 **ターミナル** （シェルコマンド）、および `ウェブ検索` をサーバーサイドで実行し、結果をカスタムの

tool\_result **イベントとしてストリーミングで返すことができます。この機能により、クライアントを介してツール呼び出しを往復させることなく、Unsloth を最初から「本物の」エージェントのように使えます。** `次の追加フィールドを` いずれかの `/v1/chat/completions`:

| または               | /v1/messages    | に渡すと、この機能を有効にできます。                                          |
| ----------------- | --------------- | ----------------------------------------------------------- |
| `enable_thinking` | `型`             | `false` を指定すると、思考を無効にできます。 `true` デフォルトで                    |
| `フィールド`           | `型`             | `説明` enable\_tools                                          |
| `enabled_tools`   | `array<string>` | モデルが呼び出せるツール。次をサポートします： `python`, `terminal`, `web_search`. |
| `session_id`      | `string`        | 省略可能。呼び出し間でツールの状態（例：Pythonカーネル）を保持します。                      |

#### 思考モード

思考モードはデフォルトで有効です。&#x20;

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [{"role": "user", "content": "summarize quantum tunneling in one sentence"}],
    "stream": false
  }'
```

モデルは回答を提示する前に思考します。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F4XHr9KJhzpFEibCGEuHF%2FScreenshot%202026-04-22%20at%2012.22.46%E2%80%AFPM.png?alt=media&amp;token=15fa68ae-0ca5-464f-af16-25cfabc84c33" alt=""><figcaption></figcaption></figure>

思考を無効にするには、リクエストで `enable_thinking: false` を指定します。モデルは最初に思考せずに回答します。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FKQR2nh8sb5G1zUc7YSs9%2FScreenshot%202026-04-22%20at%2012.25.47%E2%80%AFPM.png?alt=media&amp;token=4646a17e-2217-4f00-9e39-5362f989126f" alt=""><figcaption></figcaption></figure>

#### Pythonの実行

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "What is 123 * 456? Use code to compute it."}],
    "stream": false,
    "enable_tools": true,
    "enabled_tools": ["python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FVGbYtwBfSoqgZov5ivMA%2FScreenshot%202026-04-22%20at%204.16.13%E2%80%AFAM.png?alt=media&amp;token=28b83469-24fb-412d-9489-a0c6b92dd8b5" alt=""><figcaption></figcaption></figure>

#### Web検索 + Python（ストリーミング）

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "Search for Python 3.13 features"}],
    "stream": true,
    "enable_tools": true,
    "enabled_tools": ["web_search", "python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FzSFyzwXtJ0Hgvqq7gZcV%2FScreenshot%202026-04-22%20at%204.25.13%E2%80%AFAM.png?alt=media&amp;token=a8fc5908-cb11-4ec9-85c6-77a6b5c2e205" alt=""><figcaption></figcaption></figure>

#### オン `/v1/messages`

同じ省略記法はAnthropic Messagesエンドポイントでも使用できます：

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Search for Python 3.13 features"}],
    "stream": true,
    "enable_tools": true,
    "enabled_tools": ["web_search", "python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FPpJxE60f2J59T5o85tQ1%2FScreenshot%202026-04-22%20at%204.28.43%E2%80%AFAM.png?alt=media&amp;token=870d74cb-dd8e-42c1-adeb-287807b22e16" alt=""><figcaption></figcaption></figure>

Unslothは標準のAnthropic / OpenAIイベントタイプに加えて、独自の `tool_result` SSEイベントをストリーミングします。モデルは次のターンで各ツールの出力を受け取ります。

### ❔ トラブルシューティング

**`401 Unauthorized`** **-** この `Authorization` ヘッダーがないか、キーが間違っています。次を確認してください： `Authorization: Bearer sk-unsloth-…`.

**`curl` ストリーミングリクエストで応答が止まる場合 -** 次を追加します： `-N` （次と同じです `--no-buffer`）。これを指定しないと、 `curl` SSE ストリームがバッファリングされ、処理が終わるまで何も表示されません。

**OS によって Base64 エンコードの動作が異なる** **-** Linux の `base64` はデフォルトで行を折り返しますが、macOS / BSD では折り返しません。 `base64 -w 0` を Linux で使い、 `base64` macOS では `tr -d '\n'`.

**シェルでの JSON エスケープ** **-** Heredoc（`-d @file.json`）を使うと、本文が複雑になった場合にインライン文字列よりも扱いやすくなります。例： `curl ... -d @body.json`.

**`max_tokens` が原因の `/v1/messages`** **-** エラー `Anthropic の方言ではこの指定が必須です。` "max\_tokens": 1024

（または任意の上限値）を追加してください。

### エンドポイントレベルの問題（モデルが読み込まれない、接続が切断される、ポートが誤っているなど）については、API 概要ページを参照してください。

任意：サーバーのデフォルト設定を調整する `unsloth run`.

```bash
でサーバーを起動するときに、デフォルトの動作をカスタマイズできます。
# カスタムのデフォルト設定でサーバーを起動
  unsloth run \
  --model unsloth/Qwen3-1.7B-GGUF \
  --reasoning off \
  --temp 0.6 \
```

-p 8888 `を使うと` 推論をオフにできます。また、推論に対応したモデルでオンにするには `--reasoning on` を使います。

```bash
# ローカルネットワークで API を公開
# カスタムのデフォルト設定でサーバーを起動
  unsloth run \
  -H 0.0.0.0 \
  --temp 0.6 \
```

これにより、サーバーは `0.0.0.0:8888`で起動し、ローカルネットワーク上の他のデバイスから接続できるようになります。

#### リクエストごとに設定を上書きする

各 API リクエストで生成設定を直接上書きすることもできます。

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer $UNSLOTH_STUDIO_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [
      {
        "role": "user",
        "content": "ローカル AI について短い詩を書いてください。"
      }
    ],
    "temperature": 0.8,
    "top_p": 0.9,
    "max_tokens": 512
  }'
```

リクエスト単位の値（ `temperature`, `top_p`, `max_tokens`、および `stream` など）は、そのリクエストに対するサーバーのデフォルト値を上書きします。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/jp/tong-he/curltohttpwounslothnisuru.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
