---
title: Fast mode
url: https://platform.claude.com/docs/ko/build-with-claude/fast-mode
description: 지원되는 Claude 모델에서 초당 출력 토큰을 최대 2.5배 더 많이 얻을 수 있습니다.
---

"Fast mode"(고속 모드)는 Claude Opus 5.5, Claude Opus 5, 및 Claude Opus 4.8에서 프리미엄 가격으로 초당 출력 토큰을 최대 2.5배까지 높여 줍니다. 사용하려면 요청에 `speed: "fast"`를 설정하세요.

<Note>
  Claude Opus 5.5의 fast mode는 `fast-mode-2026-02-01` 베타 헤더나 액세스 요청이 필요하지 않습니다. 여전히 헤더를 보내는 요청도 계속 작동합니다. Claude Opus 5 및 Claude Opus 4.8의 fast mode는 리서치 프리뷰 단계입니다. 액세스를 요청하려면 계정 관리자에게 문의하거나 [대기 목록에 등록](https://claude.com/fast-mode)하고, 요청에 [베타 헤더](https://platform.claude.com/docs/ko/api/beta-headers)를 보내세요.
</Note>

<Note>
  "zero data retention"(제로 데이터 보존), 즉 ZDR이 이 기능에 어떻게 적용되는지 알아보려면 [API 및 데이터 보존](https://platform.claude.com/docs/ko/manage-claude/api-and-data-retention)을 참조하세요.
</Note>

## 지원 모델 및 플랫폼

Fast mode는 다음 모델 및 플랫폼에서 지원됩니다:

| 지원 모델                             | 지원 플랫폼                                                                                                                                                                                                                                      |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Claude Opus 5.5 (claude-opus-5-5) | Claude API([Claude Managed Agents](https://platform.claude.com/docs/ko/managed-agents/overview) 포함)<br />[Claude in Microsoft Foundry](https://platform.claude.com/docs/ko/build-with-claude/claude-in-microsoft-foundry)(Azure에서 호스팅되는 배포) |
| Claude Opus 5 (claude-opus-5)     | Claude API([Claude Managed Agents](https://platform.claude.com/docs/ko/managed-agents/overview) 포함)                                                                                                                                         |
| Claude Opus 4.8 (claude-opus-4-8) | Claude API([Claude Managed Agents](https://platform.claude.com/docs/ko/managed-agents/overview) 포함)                                                                                                                                         |

이전 모델에서 fast mode를 사용하고 있었다면 [fast mode를 지원하는 모델로 마이그레이션](https://platform.claude.com/docs/ko/models/opus-5-5/migration-guide)하세요.

Fast mode는 [Anthropic에서 호스팅되는](https://platform.claude.com/docs/ko/build-with-claude/claude-in-microsoft-foundry#hosting-options) Claude in Microsoft Foundry 배포에서는 사용할 수 없습니다.

## Fast mode 작동 방식

Fast mode는 동일한 모델을 더 빠른 추론 구성으로 실행합니다. 지능이나 기능에는 변화가 없습니다.

* 표준 속도 대비 초당 출력 토큰 최대 2.5배 향상
* 속도 이점은 "time to first token"(첫 토큰까지의 시간), 즉 TTFT가 아닌 "output tokens per second"(초당 출력 토큰), 즉 OTPS에 집중됩니다
* 동일한 모델 가중치 및 동작(다른 모델이 아님)
* OTPS 향상이 가장 잘 드러나는 [스트리밍](https://platform.claude.com/docs/ko/build-with-claude/streaming)과 호환

## 기본 사용법

리서치 프리뷰 단계의 모델에는 `fast-mode-2026-02-01` [베타 헤더](https://platform.claude.com/docs/ko/api/beta-headers)도 필요합니다.

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 4096,
      "speed": "fast",
      "messages": [{
        "role": "user",
        "content": "Refactor this module to use dependency injection"
      }]
    }'
  ```

  ```bash CLI
  ant messages create <<'YAML'
  model: claude-opus-5-5
  max_tokens: 4096
  speed: fast
  messages:
    - role: user
      content: Refactor this module to use dependency injection
  YAML
  ```

  ```python Python
  client = anthropic.Anthropic()

  response = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=4096,
      speed="fast",
      messages=[
          {"role": "user", "content": "Refactor this module to use dependency injection"}
      ],
  )

  for block in response.content:
      if block.type == "text":
          print(block.text)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const response = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 4096,
    speed: "fast",
    messages: [
      {
        role: "user",
        content: "Refactor this module to use dependency injection"
      }
    ]
  });

  const textBlock = response.content.find(
    (block): block is Anthropic.TextBlock => block.type === "text"
  );
  console.log(textBlock?.text);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var response = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 4096,
      Speed = Speed.Fast,
      Messages = [
          new() { Role = Role.User, Content = "Refactor this module to use dependency injection" }
      ],
  });

  foreach (var block in response.Content)
  {
      if (block.TryPickText(out var textBlock))
      {
          Console.WriteLine(textBlock.Text);
      }
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 4096,
  	Speed:     anthropic.MessageNewParamsSpeedFast,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("Refactor this module to use dependency injection")),
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }
  for _, block := range response.Content {
  	if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok {
  		fmt.Println(textBlock.Text)
  	}
  }
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  Message response = client.messages().create(
          MessageCreateParams.builder()
                  .model(Model.CLAUDE_OPUS_5_5)
                  .maxTokens(4096L)
                  .speed(MessageCreateParams.Speed.FAST)
                  .addUserMessage("Refactor this module to use dependency injection")
                  .build());

  response.content().stream()
          .flatMap(block -> block.text().stream())
          .forEach(textBlock -> IO.println(textBlock.text()));
  ```

  ```php PHP
  $client = new Client();

  $response = $client->messages->create(
      model: 'claude-opus-5-5',
      maxTokens: 4096,
      speed: 'fast',
      messages: [
          ['role' => 'user', 'content' => 'Refactor this module to use dependency injection'],
      ],
  );

  foreach ($response->content as $block) {
      if ($block instanceof \Anthropic\Messages\TextBlock) {
          echo $block->text, PHP_EOL;
      }
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  response = client.messages.create(
    model: "claude-opus-5-5",
    max_tokens: 4096,
    speed: "fast",
    messages: [{role: "user", content: "Refactor this module to use dependency injection"}]
  )

  response.content.each do |block|
    puts block.text if block.type == :text
  end
  ```
</CodeGroup>

## 요금

Fast mode는 200k 입력 토큰을 초과하는 요청을 포함하여 전체 컨텍스트 윈도우에 걸쳐 표준 요금에 배수를 적용한 가격으로 책정됩니다. 다음 표는 지원 모델의 fast mode 요금을 보여줍니다:

| 모델                              | 입력             | 출력             |
| ------------------------------- | -------------- | -------------- |
| Claude Opus 5.5                 | $8 USD / MTok  | $40 USD / MTok |
| Claude Opus 5 / Claude Opus 4.8 | $10 USD / MTok | $50 USD / MTok |

Fast mode 요금은 다른 요금 수정자와 중첩 적용됩니다:

* [프롬프트 캐싱 배수](https://platform.claude.com/docs/ko/about-claude/pricing#prompt-caching)는 fast mode 요금 위에 추가로 적용됩니다
* [데이터 레지던시](https://platform.claude.com/docs/ko/manage-claude/data-residency) 배수는 fast mode 요금 위에 추가로 적용됩니다

전체 요금 세부 정보는 [요금](https://platform.claude.com/docs/ko/about-claude/pricing#fast-mode-pricing) 페이지를 참조하세요.

## 속도 제한

Fast mode에는 표준 Opus 속도 제한과 별도인 전용 "rate limit"(속도 제한)이 있습니다. Fast mode 속도 제한을 초과하면 API는 용량이 언제 사용 가능해지는지를 나타내는 `retry-after` 헤더와 함께 `429` 오류를 반환합니다.

Claude Opus 5.5는 Start, Build, Scale [사용량 티어](https://platform.claude.com/docs/ko/api/rate-limits)에서 기본 fast mode 속도 제한이 있으므로, 이 모델로 fast mode를 사용하기 위해 액세스를 요청할 필요가 없습니다. Evaluation 티어의 조직은 Start, Build 또는 Scale 티어로 이동하면 Claude Opus 5.5에서 fast mode를 사용할 수 있습니다.

응답에는 fast mode 속도 제한 상태를 나타내는 헤더가 포함됩니다:

| 헤더                                       | 설명                           |
| ---------------------------------------- | ---------------------------- |
| `anthropic-fast-input-tokens-limit`      | 분당 최대 fast mode 입력 토큰        |
| `anthropic-fast-input-tokens-remaining`  | 남은 fast mode 입력 토큰           |
| `anthropic-fast-input-tokens-reset`      | Fast mode 입력 토큰 제한이 재설정되는 시간 |
| `anthropic-fast-output-tokens-limit`     | 분당 최대 fast mode 출력 토큰        |
| `anthropic-fast-output-tokens-remaining` | 남은 fast mode 출력 토큰           |
| `anthropic-fast-output-tokens-reset`     | Fast mode 출력 토큰 제한이 재설정되는 시간 |

Fast mode 속도 제한을 확인하려면 Claude Console의 [속도 제한](https://platform.claude.com/usage/limits) 페이지로 이동하세요.

## 사용된 속도 확인하기

응답 `usage` 객체에는 사용된 속도를 나타내는 `speed` 필드가 포함되며, 값은 `"fast"` 또는 `"standard"`입니다. [Fast mode를 지원하지 않는 모델](https://platform.claude.com/docs/ko/build-with-claude/fast-mode#supported-models-and-platforms)에 `speed: "fast"`를 요청하면 오류가 반환되며, fast mode의 속도 제한이나 용량을 초과하는 경우(`429` 또는 `529`)에도 마찬가지입니다. `speed: "fast"`를 포함한 요청이 성공하면 `usage.speed`는 `"fast"`입니다. Claude Opus 4.6은 예외입니다. 오류를 반환하는 대신, `speed: "fast"`와 `fast-mode-2026-02-01` 베타 헤더를 사용한 요청은 성공하지만 표준 속도로 실행됩니다. 이 동작은 `usage.speed`에 올바르게 반영되며, 이 경우 `"standard"`로 표시됩니다.

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 1024,
      "speed": "fast",
      "messages": [{"role": "user", "content": "Hello"}]
    }'
  ```

  ```bash CLI
  ant messages create \
    --transform usage.speed \
    --raw-output <<'YAML'
  model: claude-opus-5-5
  max_tokens: 1024
  speed: fast
  messages:
    - role: user
      content: Hello
  YAML
  ```

  ```python Python
  client = anthropic.Anthropic()

  response = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      speed="fast",
      messages=[{"role": "user", "content": "Hello"}],
  )

  print(response.usage.speed)  # "fast" or "standard"
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const response = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    speed: "fast",
    messages: [{ role: "user", content: "Hello" }]
  });

  console.log(response.usage.speed); // "fast" or "standard"
  ```

  ```csharp C#
  AnthropicClient client = new();

  var response = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Speed = Speed.Fast,
      Messages = [new() { Role = Role.User, Content = "Hello" }],
  });

  Console.WriteLine(response.Usage.Speed);  // "fast" or "standard"
  ```

  ```go Go
  client := anthropic.NewClient()

  response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 1024,
  	Speed:     anthropic.MessageNewParamsSpeedFast,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("Hello")),
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }
  fmt.Println(response.Usage.Speed) // "fast" or "standard"
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  MessageCreateParams params = MessageCreateParams.builder()
          .model(Model.CLAUDE_OPUS_5_5)
          .maxTokens(1024L)
          .speed(MessageCreateParams.Speed.FAST)
          .addUserMessage("Hello")
          .build();

  Message response = client.messages().create(params);
  IO.println(response.usage().speed().orElseThrow());  // "fast" or "standard"
  ```

  ```php PHP
  $client = new Client();

  $response = $client->messages->create(
      model: 'claude-opus-5-5',
      maxTokens: 1024,
      speed: 'fast',
      messages: [['role' => 'user', 'content' => 'Hello']],
  );

  echo $response->usage->speed;  // "fast" or "standard"
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  response = client.messages.create(
    model: "claude-opus-5-5",
    max_tokens: 1024,
    speed: "fast",
    messages: [{ role: "user", content: "Hello" }]
  )

  puts(response.usage.speed)  # "fast" or "standard"
  ```
</CodeGroup>

```json Output
{
  "id": "msg_01XFDUDYJgAACzvnptvVoYEL",
  "type": "message",
  "role": "assistant",
// ...
  "usage": {
    "input_tokens": 8,
    "output_tokens": 12,
    "speed": "fast"
  }
}
```

조직 전체의 fast mode 사용량과 비용을 추적하려면 [사용량 및 비용 API](https://platform.claude.com/docs/ko/manage-claude/usage-cost-api)를 참조하세요.

## 재시도 및 폴백

### 자동 재시도

Fast mode 속도 제한을 초과하면 API는 `retry-after` 헤더와 함께 `429` 오류를 반환합니다. SDK는 기본적으로 이러한 요청을 최대 2회 자동으로 재시도하며(`max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`)로 구성 가능), 각 재시도 전에 서버가 지정한 지연 시간만큼 대기합니다. Fast mode는 지속적인 토큰 보충 방식을 사용하므로 `retry-after` 지연은 일반적으로 짧으며, 용량을 사용할 수 있게 되면 요청이 성공합니다.

### 표준 속도로 폴백하기

Fast mode 용량을 기다리는 대신 표준 속도로 폴백하려면, 속도 제한 오류를 포착한 후 `speed: "fast"` 없이 재시도하세요. 초기 fast 요청에서 `max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`)를 `0`으로 설정하면 자동 재시도를 건너뛰고 속도 제한 오류 발생 시 즉시 실패하도록 할 수 있습니다.

<Note>
  Fast에서 표준 속도로 폴백하면 [프롬프트 캐시](https://platform.claude.com/docs/ko/build-with-claude/prompt-caching) 미스가 발생합니다. 서로 다른 속도의 요청은 캐시된 접두사를 공유하지 않습니다.
</Note>

`max_retries` (typescript, java, php: `maxRetries`; csharp: `MaxRetries`; go: `option.WithMaxRetries`)를 `0`으로 설정하면 다른 일시적 오류(과부하, 내부 서버 오류)에 대한 재시도도 비활성화되므로, 다음 예제에서는 이러한 경우 기본 재시도 설정으로 원래 요청을 다시 보냅니다.

<CodeGroup exclude="shell:cURL">
  ```bash CLI
  # `ant`는 429/5xx를 자동으로 재시도하며 요청별 max_retries
  # 재정의 옵션이 없으므로, fast mode에서 429가 발생하면 폴백은 내장
  # 재시도가 모두 소진된 후에 실행됩니다. --transform-error는 분기 처리를 위해 error.type을 노출합니다.
  create_message_with_fast_fallback() {
    local speed="$1" max_attempts="${2:-3}" body out
    body=${3:-$(cat)}
    out=$(
      ant messages create \
        ${speed:+--speed "$speed"} \
        --transform-error error.type --format-error yaml <<<"$body" 2>/dev/null
    ) && { printf '%s\n' "$out"; return; }
    case "$out" in
      rate_limit_error)
        if [[ -n "$speed" ]]; then
          create_message_with_fast_fallback "" "$max_attempts" "$body"
          return
        fi ;;
      overloaded_error | api_error | "")
        if (( max_attempts > 1 )); then
          create_message_with_fast_fallback "$speed" $((max_attempts - 1)) "$body"
          return
        fi ;;
    esac
    printf '%s\n' "${out:-connection_error}" >&2
    return 1
  }

  MESSAGE=$(
    create_message_with_fast_fallback fast <<'YAML'
  model: claude-opus-5-5
  max_tokens: 1024
  messages:
    - role: user
      content: Hello
  YAML
  )
  ```

  ```python Python
  client = anthropic.Anthropic()


  def create_message_with_fast_fallback(max_retries=0, max_attempts=3, **params):
      try:
          return client.with_options(max_retries=max_retries).messages.create(**params)
      except anthropic.RateLimitError:
          if params.get("speed") == "fast":
              del params["speed"]
              return create_message_with_fast_fallback(max_retries=max_retries, **params)
          raise
      except (
          anthropic.APIStatusError,
          anthropic.APIConnectionError,
      ) as error:
          if isinstance(error, anthropic.APIStatusError) and error.status_code < 500:
              raise
          if max_attempts > 1:
              return create_message_with_fast_fallback(
                  max_retries=max_retries, max_attempts=max_attempts - 1, **params
              )
          raise


  message = create_message_with_fast_fallback(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[{"role": "user", "content": "Hello"}],
      speed="fast",
      max_retries=0,
  )
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  async function createMessageWithFastFallback(
    params: Anthropic.MessageCreateParamsNonStreaming,
    requestOptions?: Anthropic.RequestOptions,
    maxAttempts: number = 3
  ): Promise<Anthropic.Message> {
    try {
      return await client.messages.create(params, requestOptions);
    } catch (e) {
      if (e instanceof Anthropic.RateLimitError && params.speed === "fast") {
        const { speed, ...rest } = params;
        return createMessageWithFastFallback(rest);
      }
      if (
        e instanceof Anthropic.InternalServerError ||
        e instanceof Anthropic.APIConnectionError
      ) {
        if (maxAttempts > 1) {
          return createMessageWithFastFallback(params, undefined, maxAttempts - 1);
        }
      }
      throw e;
    }
  }

  const message = await createMessageWithFastFallback(
    {
      model: "claude-opus-5-5",
      max_tokens: 1024,
      messages: [{ role: "user", content: "Hello" }],
      speed: "fast"
    },
    { maxRetries: 0 }
  );
  ```

  ```csharp C#
  AnthropicClient client = new();

  async Task<Message> CreateMessageWithFastFallback(
      MessageCreateParams parameters,
      int? maxRetries = null,
      int maxAttempts = 3)
  {
      try
      {
          var requestClient = maxRetries is int retries
              ? client.WithOptions(options => options with { MaxRetries = retries })
              : client;
          return await requestClient.Messages.Create(parameters);
      }
      catch (AnthropicRateLimitException)
      {
          if (parameters.Speed is not null)
          {
              return await CreateMessageWithFastFallback(
                  parameters with { Speed = null });
          }
          throw;
      }
      catch (Anthropic5xxException)
      {
          if (maxAttempts > 1)
          {
              return await CreateMessageWithFastFallback(
                  parameters, maxAttempts: maxAttempts - 1);
          }
          throw;
      }
  }

  var message = await CreateMessageWithFastFallback(
      new MessageCreateParams
      {
          Model = Model.ClaudeOpus5_5,
          MaxTokens = 1024,
          Messages = [new() { Role = Role.User, Content = "Hello" }],
          Speed = Speed.Fast,
      },
      maxRetries: 0);
  ```

  ```go Go
  func createMessageWithFastFallback(
  	ctx context.Context,
  	client *anthropic.Client,
  	params anthropic.MessageNewParams,
  	maxAttempts int,
  	opts ...option.RequestOption,
  ) (*anthropic.Message, error) {
  	message, err := client.Messages.New(ctx, params, opts...)
  	if err != nil {
  		var apierr *anthropic.Error
  		if errors.As(err, &apierr) && apierr.StatusCode == 429 && params.Speed != "" {
  			params.Speed = ""
  			return createMessageWithFastFallback(ctx, client, params, maxAttempts)
  		}
  		if (errors.As(err, &apierr) && apierr.StatusCode >= 500) || !errors.As(err, &apierr) {
  			if maxAttempts > 1 {
  				return createMessageWithFastFallback(ctx, client, params, maxAttempts-1)
  			}
  		}
  		return nil, err
  	}
  	return message, nil
  }

  func main() {
  	client := anthropic.NewClient()
  	message, err := createMessageWithFastFallback(
  		context.TODO(),
  		&client,
  		anthropic.MessageNewParams{
  			Model:     anthropic.ModelClaudeOpus5_5,
  			MaxTokens: 1024,
  			Messages: []anthropic.MessageParam{
  				anthropic.NewUserMessage(anthropic.NewTextBlock("Hello")),
  			},
  			Speed: anthropic.MessageNewParamsSpeedFast,
  		},
  		3,
  		option.WithMaxRetries(0),
  	)
  	if err != nil {
  		panic(err)
  	}
  	fmt.Println(message)
  }
  ```

  ```java Java
  import com.anthropic.errors.InternalServerException;
  import com.anthropic.errors.RateLimitException;
  // ...
  // 아래의 폴백 로직이 처리하도록 SDK 자동 재시도를 비활성화합니다
  AnthropicClient client =
          AnthropicOkHttpClient.builder().fromEnv().maxRetries(0).build();

  Message createMessageWithFastFallback(
          MessageCreateParams params, int maxAttempts) {
      try {
          return client.messages().create(params);
      } catch (RateLimitException e) {
          if (params.speed().isPresent()) {
              MessageCreateParams retryParams = params.toBuilder()
                      .speed(Optional.empty())
                      .build();
              return createMessageWithFastFallback(retryParams, maxAttempts);
          }
          throw e;
      } catch (InternalServerException e) {
          if (maxAttempts > 1) {
              return createMessageWithFastFallback(params, maxAttempts - 1);
          }
          throw e;
      }
  }

  void main() {
      Message message = createMessageWithFastFallback(
              MessageCreateParams.builder()
                      .model(Model.CLAUDE_OPUS_5_5)
                      .maxTokens(1024L)
                      .addUserMessage("Hello")
                      .speed(MessageCreateParams.Speed.FAST)
                      .build(),
              3);
      message.content().stream()
              .flatMap(block -> block.text().stream())
              .forEach(textBlock -> IO.println(textBlock.text()));
  }
  ```

  ```php PHP
  use Anthropic\Core\Exceptions\APIConnectionException;
  use Anthropic\Core\Exceptions\InternalServerException;
  use Anthropic\Core\Exceptions\RateLimitException;
  use Anthropic\RequestOptions;
  // ...
  $client = new Client();

  function createMessageWithFastFallback(
      Client $client,
      array $params,
      ?RequestOptions $requestOptions = null,
      int $maxAttempts = 3,
  ) {
      try {
          return $client->messages->create(
              ...$params,
              requestOptions: $requestOptions,
          );
      } catch (RateLimitException $e) {
          if (isset($params['speed'])) {
              unset($params['speed']);
              return createMessageWithFastFallback($client, $params);
          }
          throw $e;
      } catch (InternalServerException | APIConnectionException $e) {
          if ($maxAttempts > 1) {
              return createMessageWithFastFallback(
                  $client, $params, maxAttempts: $maxAttempts - 1
              );
          }
          throw $e;
      }
  }

  $message = createMessageWithFastFallback(
      $client,
      [
          'model' => 'claude-opus-5-5',
          'maxTokens' => 1024,
          'messages' => [['role' => 'user', 'content' => 'Hello']],
          'speed' => 'fast',
      ],
      RequestOptions::with(maxRetries: 0),
  );
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  def create_message_with_fast_fallback(client, request_options: {}, max_attempts: 3, **params)
    client.messages.create(**params, request_options: request_options)
  rescue Anthropic::Errors::RateLimitError
    raise unless params[:speed] == "fast"
    params.delete(:speed)
    create_message_with_fast_fallback(client, **params)
  rescue Anthropic::Errors::InternalServerError, Anthropic::Errors::APIConnectionError
    raise unless max_attempts > 1
    create_message_with_fast_fallback(client, max_attempts: max_attempts - 1, **params)
  end

  message = create_message_with_fast_fallback(
    client,
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [{ role: "user", content: "Hello" }],
    speed: "fast",
    request_options: { max_retries: 0 }
  )
  ```
</CodeGroup>

## 고려 사항

* **프롬프트 캐싱:** Fast 속도와 표준 속도 간에 전환하면 캐시가 무효화됩니다. 서로 다른 속도의 요청은 캐시된 접두사를 공유하지 않습니다.
* **TTFT:** Fast mode의 이점은 TTFT가 아니라 OTPS에 집중됩니다.
* **Batch API:** Fast mode는 [Batch API](https://platform.claude.com/docs/ko/build-with-claude/batch-processing)와 함께 사용할 수 없습니다.
* **Priority Tier:** Fast mode는 [Priority Tier](https://platform.claude.com/docs/ko/api/service-tiers) 약정과 함께 사용할 수 없습니다.
* **Claude Platform on AWS:** Fast mode는 현재 [Claude Platform on AWS](https://platform.claude.com/docs/ko/build-with-claude/claude-platform-on-aws)에서 사용할 수 없습니다.

## 다음 단계

<CardGroup cols={2}>
  <Card title="구조화된 출력" icon="code-brackets" href="https://platform.claude.com/docs/ko/build-with-claude/structured-outputs">
    에이전트 워크플로에서 검증된 JSON 결과를 얻으세요.
  </Card>

  <Card title="요금" icon="calculator" href="https://platform.claude.com/docs/ko/about-claude/pricing#fast-mode-pricing">
    모델 및 기능에 대한 Anthropic의 요금 구조를 알아보세요.
  </Card>

  <Card title="Effort" icon="gauge" href="https://platform.claude.com/docs/ko/build-with-claude/effort">
    effort 매개변수로 Claude가 응답할 때 사용하는 토큰 수를 제어하여 응답의 철저함과 토큰 효율성 사이의 균형을 조정하세요.
  </Card>

  <Card title="메시지 스트리밍" icon="arrow-right" href="https://platform.claude.com/docs/ko/build-with-claude/streaming">
    텍스트, 도구 사용, 확장 사고 델타를 포함한 Messages API 응답을 서버 전송 이벤트로 점진적으로 스트리밍하세요.
  </Card>
</CardGroup>
