---
title: PDF 지원
url: https://platform.claude.com/docs/ko/build-with-claude/pdf-support
description: "Claude로 PDF를 처리하세요: 문서에서 텍스트를 추출하고, 차트를 분석하고, 시각적 콘텐츠를 이해합니다."
featureMetadata:
  status: stable
  zdr:
    eligibility: eligible
    note: Excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
  supportedModels:
    - claude-fable-5-2
    - claude-mythos-5-2
    - claude-fable-5-1
    - claude-mythos-5-1
    - claude-fable-5
    - claude-mythos-5
    - claude-mythos-preview
    - claude-opus-5-5
    - claude-opus-5
    - claude-sonnet-5-5
    - claude-sonnet-5
    - claude-haiku-5-5
    - claude-haiku-4-5-20251001
    - claude-opus-4-8
    - claude-opus-4-7
    - claude-opus-4-6
    - claude-sonnet-4-6
    - claude-opus-4-5-20251101
    - claude-sonnet-4-5-20250929
  supportedPlatforms:
    Claude API: stable
    Claude Platform on AWS: stable
    Claude Models on Google Cloud (Anthropic managed): stable
    Amazon Bedrock:
      availability: stable
      note: Base64 소스만 지원합니다.
    Amazon Bedrock (InvokeModel):
      availability: stable
      note: Base64 소스만 지원합니다.
    Claude Models on Google Cloud (Google managed):
      availability: stable
      note: Base64 소스만 지원합니다.
    Microsoft Foundry:
      availability: stable
      note: "`file_id` 소스에는 Anthropic에서 호스팅되는 배포가 필요합니다."
---

제공한 PDF에 포함된 모든 텍스트, 그림, 차트, 표에 대해 Claude에게 질문할 수 있습니다. 몇 가지 사용 사례 예시는 다음과 같습니다:

* 재무 보고서 분석 및 차트/표 이해
* 법률 문서에서 핵심 정보 추출
* 문서 번역 지원
* 문서 정보를 구조화된 형식으로 변환

## 시작하기 전에

### PDF 요구 사항 확인

Claude는 모든 표준 PDF와 함께 작동합니다. 요청 크기가 다음 요구 사항을 충족하는지 확인하세요:

| 요구 사항        | 제한                                                                                                                           |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| 최대 요청 크기     | 퍼스트 파티 Claude API에서 128 MB (플랫폼에 따라 다름, [요청 크기 제한](https://platform.claude.com/docs/ko/api/overview#request-size-limits) 참조) |
| 요청당 최대 페이지 수 | 600 (요청의 컨텍스트 윈도우가 1M 토큰 미만인 경우 100)                                                                                         |
| 형식           | 표준 PDF (비밀번호/암호화 없음)                                                                                                         |

두 제한 모두 PDF와 함께 전송되는 다른 모든 콘텐츠를 포함한 전체 요청 페이로드에 적용됩니다. 대용량 PDF의 경우, 요청 페이로드를 작게 유지하기 위해 [Files API](https://platform.claude.com/docs/ko/build-with-claude/files)로 업로드하고 `file_id`로 참조하는 것을 고려하세요.

<Tip>
  밀도가 높은 PDF(작은 글꼴의 페이지가 많거나, 복잡한 표, 또는 그래픽이 많은 경우)는 페이지 제한에 도달하기 전에 “context window”(컨텍스트 윈도우)를 가득 채울 수 있습니다. 대용량 PDF가 포함된 요청은 Files API를 사용하는 경우에도 페이지 제한에 도달하기 전에 실패할 수 있습니다. 문서를 여러 섹션으로 분할해 보세요. 대용량 파일의 경우 각 페이지가 이미지로 처리되므로, 포함된 이미지를 다운샘플링하는 것도 도움이 될 수 있습니다.
</Tip>

PDF 지원은 Claude의 비전 기능에 의존하므로, 다른 비전 작업과 동일한 [제한 사항 및 고려 사항](https://platform.claude.com/docs/ko/build-with-claude/vision#limitations)이 적용됩니다.

### 지원되는 플랫폼 및 모델

모든 [활성 모델](https://platform.claude.com/docs/ko/models/overview)은 PDF 처리를 지원합니다.

<Note>
  .txt, .csv 또는 .md와 같은 일반 텍스트 파일은 문서 블록에서 직접 사용할 수 있습니다. MIME 유형 `text/plain`으로 Files API에 업로드하고 `file_id`로 참조하세요. .xlsx 또는 .docx와 같은 바이너리 형식은 문서 블록에서 지원되지 않으므로 먼저 텍스트나 PDF로 변환하세요. [다른 파일 형식 사용하기](https://platform.claude.com/docs/ko/build-with-claude/files#working-with-other-file-formats)를 참조하세요.
</Note>

## Claude로 PDF 처리하기

### 첫 번째 PDF 요청 보내기

Messages API를 사용하는 간단한 예제로 시작하세요. 세 가지 방법으로 Claude에 PDF를 제공할 수 있습니다:

1. 온라인에 호스팅된 PDF에 대한 URL 참조로
2. `document` 콘텐츠 블록에 base64로 인코딩된 PDF로
3. [Files API](https://platform.claude.com/docs/ko/build-with-claude/files)의 `file_id`로

<Note>
  Claude Models on Google Cloud (Google managed) 및 Amazon Bedrock에서는 base64로 인코딩된 소스만 사용할 수 있습니다. Microsoft Foundry에서는 Azure에 호스팅된 배포에 대해 Files API가 지원되지 않습니다.
</Note>

#### 옵션 1: URL 기반 PDF 문서

가장 간단한 방법은 URL에서 직접 PDF를 참조하는 것입니다:

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 1024,
      "messages": [{
        "role": "user",
        "content": [{
          "type": "document",
          "source": {
            "type": "url",
            "url": "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
          }
        },
        {
          "type": "text",
          "text": "What are the key findings in this document?"
        }]
      }]
    }'
  ```

  ```bash CLI
  ant messages create <<'YAML'
  model: claude-opus-5-5
  max_tokens: 1024
  messages:
    - role: user
      content:
        - type: document
          source:
            type: url
            url: https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf
        - type: text
          text: What are the key findings in this document?
  YAML
  ```

  ```python Python
  client = anthropic.Anthropic()
  message = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[
          {
              "role": "user",
              "content": [
                  {
                      "type": "document",
                      "source": {
                          "type": "url",
                          "url": "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf",
                      },
                  },
                  {"type": "text", "text": "What are the key findings in this document?"},
              ],
          }
      ],
  )

  print(message.content)
  ```

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

  const response = await anthropic.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "url",
              url: "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
            }
          },
          {
            type: "text",
            text: "What are the key findings in this document?"
          }
        ]
      }
    ]
  });

  console.log(response);
  ```

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

  // URL로 문서 블록을 생성합니다
  var documentParam = new DocumentBlockParam
  {
      Source = new UrlPdfSource
      {
          Url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf",
      },
  };

  // 문서 및 텍스트 콘텐츠 블록으로 메시지를 생성합니다
  var message = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages =
      [
          new UserMessageParam
          {
              Content = new List<ContentBlockParam>
              {
                  documentParam,
                  new TextBlockParam("What are the key findings in this document?"),
              },
          },
      ],
  });

  Console.WriteLine(string.Join("\n", message.Content));
  ```

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

  message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 1024,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(
  			anthropic.NewDocumentBlock(anthropic.URLPDFSourceParam{
  				URL: "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf",
  			}),
  			anthropic.NewTextBlock("What are the key findings in this document?"),
  		),
  	},
  })
  if err != nil {
  	panic(err)
  }

  fmt.Printf("%+v\n", message.Content)
  ```

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

  // URL로 문서 블록 생성
  DocumentBlockParam documentParam = DocumentBlockParam.builder()
      .source(
          UrlPdfSource.builder()
              .url(
                  "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
              )
              .build()
      )
      .build();

  // 문서 및 텍스트 콘텐츠 블록으로 메시지 생성
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(1024)
      .addUserMessageOfContentBlockParams(
          List.of(
              ContentBlockParam.ofDocument(documentParam),
              ContentBlockParam.ofText(
                  TextBlockParam.builder()
                      .text("What are the key findings in this document?")
                      .build()
              )
          )
      )
      .build();

  Message message = client.messages().create(params);
  System.out.println(message.content());
  ```

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

  $message = $client->messages->create(
      maxTokens: 1024,
      messages: [
          [
              'role' => 'user',
              'content' => [
                  [
                      'type' => 'document',
                      'source' => [
                          'type' => 'url',
                          'url' => 'https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf',
                      ],
                  ],
                  [
                      'type' => 'text',
                      'text' => 'What are the key findings in this document?',
                  ],
              ],
          ],
      ],
      model: 'claude-opus-5-5',
  );

  echo $message;
  ```

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

  message = anthropic.messages.create(
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "url",
              url: "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
            }
          },
          {type: "text", text: "What are the key findings in this document?"}
        ]
      }
    ]
  )

  puts(message.content)
  ```
</CodeGroup>

응답은 Claude의 분석을 `content`의 텍스트 블록으로 반환하며, 토큰 사용량은 `usage`에 포함됩니다:

```json Output
{
  "id": "msg_01Hfp8YuFjQ55VgWbpdHDehB",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-5-5",
  "content": [
    {
      "type": "text",
      "text": "This document is an addendum to the Claude 3 model card, reporting updated evaluation results. The key findings include..."
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 45000,
    "output_tokens": 300
  }
}
```

#### 옵션 2: Base64로 인코딩된 PDF 문서

로컬 시스템에서 PDF를 보내야 하거나 URL을 사용할 수 없는 경우:

<CodeGroup>
  ```bash cURL
  # 방법 1: 원격 PDF를 가져와 인코딩합니다
  curl -sL "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" | base64 | tr -d '\n' > pdf_base64.txt

  # 방법 2: 로컬 PDF 파일을 인코딩합니다
  # base64 document.pdf | tr -d '\n' > pdf_base64.txt

  # pdf_base64.txt 내용을 사용하여 JSON 요청 파일을 생성합니다
  jq -n --rawfile PDF_BASE64 pdf_base64.txt '{
    "model": "claude-opus-5-5",
    "max_tokens": 1024,
    "messages": [{
      "role": "user",
      "content": [{
        "type": "document",
        "source": {
          "type": "base64",
          "media_type": "application/pdf",
          "data": $PDF_BASE64
        }
      },
      {
        "type": "text",
        "text": "What are the key findings in this document?"
      }]
    }]
  }' > request.json

  # JSON 파일을 사용하여 API 요청을 보냅니다
  curl https://api.anthropic.com/v1/messages \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -d @request.json
  ```

  ```bash CLI
  ant messages create --model claude-opus-5-5 --max-tokens 1024 <<'YAML'
  messages:
    - role: user
      content:
        - type: document
          source:
            type: base64
            media_type: application/pdf
            data: "@./document.pdf"
        - type: text
          text: What are the key findings in this document?
  YAML
  ```

  ```python Python
  import base64
  import httpx2

  # 먼저 PDF를 로드하고 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_data = base64.standard_b64encode(
      httpx2.get(pdf_url, follow_redirects=True).content
  ).decode("utf-8")

  # 대안: 로컬 파일에서 로드합니다
  # with open("document.pdf", "rb") as f:
  #     pdf_data = base64.standard_b64encode(f.read()).decode("utf-8")

  # base64 인코딩을 사용하여 Claude에 전송합니다
  client = anthropic.Anthropic()
  message = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[
          {
              "role": "user",
              "content": [
                  {
                      "type": "document",
                      "source": {
                          "type": "base64",
                          "media_type": "application/pdf",
                          "data": pdf_data,
                      },
                  },
                  {"type": "text", "text": "What are the key findings in this document?"},
              ],
          }
      ],
  )

  print(message.content)
  ```

  ```typescript TypeScript
  // 방법 1: 원격 PDF를 가져와 인코딩합니다
  const pdfURL =
    "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  const pdfResponse = await fetch(pdfURL);
  const arrayBuffer = await pdfResponse.arrayBuffer();
  const pdfBase64 = Buffer.from(arrayBuffer).toString("base64");

  // 방법 2: 로컬 파일에서 로드합니다
  // import { readFile } from "node:fs/promises";
  // const pdfBase64 = (await readFile("document.pdf")).toString("base64");

  // base64로 인코딩된 PDF와 함께 API 요청을 보냅니다
  const anthropic = new Anthropic();
  const response = await anthropic.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "base64",
              media_type: "application/pdf",
              data: pdfBase64
            }
          },
          {
            type: "text",
            text: "What are the key findings in this document?"
          }
        ]
      }
    ]
  });

  console.log(response);
  ```

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

  // 방법 1: 원격 PDF를 다운로드하고 인코딩합니다
  var pdfUrl = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  using var httpClient = new HttpClient();
  var pdfBase64 = Convert.ToBase64String(await httpClient.GetByteArrayAsync(pdfUrl));

  // 방법 2: 로컬 파일에서 로드합니다
  // var pdfBase64 = Convert.ToBase64String(await File.ReadAllBytesAsync("document.pdf"));

  // base64 데이터로 문서 블록을 생성합니다
  var documentParam = new DocumentBlockParam
  {
      Source = new Base64PdfSource { Data = pdfBase64 },
  };

  // 문서 및 텍스트 콘텐츠 블록으로 메시지를 생성합니다
  var message = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages =
      [
          new UserMessageParam
          {
              Content = new List<ContentBlockParam>
              {
                  documentParam,
                  new TextBlockParam("What are the key findings in this document?"),
              },
          },
      ],
  });

  Console.WriteLine(string.Join("\n", message.Content));
  ```

  ```go Go
  // 먼저 PDF를 로드하고 인코딩합니다
  pdfURL := "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  resp, err := http.Get(pdfURL)
  if err != nil {
  	panic(err)
  }
  defer resp.Body.Close()
  pdfBytes, err := io.ReadAll(resp.Body)
  if err != nil {
  	panic(err)
  }
  pdfBase64 := base64.StdEncoding.EncodeToString(pdfBytes)

  // 대안: 로컬 파일에서 로드합니다(imports에 "os"를 추가하세요)
  // pdfBytes, err := os.ReadFile("document.pdf")
  // pdfBase64 := base64.StdEncoding.EncodeToString(pdfBytes)

  // base64 인코딩을 사용하여 Claude에 전송합니다
  client := anthropic.NewClient()
  message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 1024,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(
  			anthropic.NewDocumentBlock(anthropic.Base64PDFSourceParam{
  				Data: pdfBase64,
  			}),
  			anthropic.NewTextBlock("What are the key findings in this document?"),
  		),
  	},
  })
  if err != nil {
  	panic(err)
  }

  fmt.Printf("%+v\n", message.Content)
  ```

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

  // 방법 1: 원격 PDF 다운로드 및 인코딩
  String pdfUrl =
      "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  HttpClient httpClient = HttpClient.newBuilder()
      .followRedirects(HttpClient.Redirect.NORMAL)
      .build();
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create(pdfUrl))
      .GET()
      .build();

  HttpResponse<byte[]> response = httpClient.send(
      request,
      HttpResponse.BodyHandlers.ofByteArray()
  );
  String pdfBase64 = Base64.getEncoder().encodeToString(response.body());

  // 방법 2: 로컬 파일에서 로드
  // byte[] fileBytes = Files.readAllBytes(Path.of("document.pdf"));
  // String pdfBase64 = Base64.getEncoder().encodeToString(fileBytes);

  // base64 데이터로 문서 블록 생성
  DocumentBlockParam documentParam = DocumentBlockParam.builder()
      .source(Base64PdfSource.builder()
          .data(pdfBase64)
          .build())
      .build();

  // 문서 및 텍스트 콘텐츠 블록으로 메시지 생성
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(1024)
      .addUserMessageOfContentBlockParams(
          List.of(
              ContentBlockParam.ofDocument(documentParam),
              ContentBlockParam.ofText(
                  TextBlockParam.builder()
                      .text("What are the key findings in this document?")
                      .build()
              )
          )
      )
      .build();

  Message message = client.messages().create(params);
  System.out.println(message.content());
  ```

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

  // 먼저 PDF를 로드하고 인코딩합니다
  $pdf_url = 'https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf';
  $pdf_data = base64_encode(file_get_contents($pdf_url));

  // 대안: 로컬 파일에서 로드합니다
  // $pdf_data = base64_encode(file_get_contents('document.pdf'));

  // base64 인코딩을 사용하여 Claude에 전송합니다
  $message = $client->messages->create(
      maxTokens: 1024,
      messages: [
          [
              'role' => 'user',
              'content' => [
                  [
                      'type' => 'document',
                      'source' => [
                          'type' => 'base64',
                          'media_type' => 'application/pdf',
                          'data' => $pdf_data,
                      ],
                  ],
                  [
                      'type' => 'text',
                      'text' => 'What are the key findings in this document?',
                  ],
              ],
          ],
      ],
      model: 'claude-opus-5-5',
  );

  echo $message;
  ```

  ```ruby Ruby
  require "open-uri"

  # 먼저 PDF를 로드하고 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read }
  pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines

  # 대안: 로컬 파일에서 로드합니다
  # pdf_data = [File.binread("document.pdf")].pack("m0")

  # base64 인코딩을 사용하여 Claude에 전송합니다
  anthropic = Anthropic::Client.new
  message = anthropic.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "base64",
              media_type: "application/pdf",
              data: pdf_data
            }
          },
          {type: "text", text: "What are the key findings in this document?"}
        ]
      }
    ]
  )

  puts(message.content)
  ```
</CodeGroup>

#### 옵션 3: Files API

반복적으로 사용할 PDF이거나 인코딩 오버헤드를 피하고 싶은 경우, [Files API](https://platform.claude.com/docs/ko/build-with-claude/files)를 사용하세요:

<CodeGroup>
  ```bash cURL
  # 먼저 PDF를 Files API에 업로드하세요
  curl -sS -X POST https://api.anthropic.com/v1/files \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -F "file=@document.pdf"

  # 그런 다음 업로드 응답의 file_id를 메시지에 사용하세요
  curl https://api.anthropic.com/v1/messages \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 1024,
      "messages": [{
        "role": "user",
        "content": [{
          "type": "document",
          "source": {
            "type": "file",
            "file_id": "'"$FILE_ID"'"
          }
        },
        {
          "type": "text",
          "text": "What are the key findings in this document?"
        }]
      }]
    }'
  ```

  ```bash CLI
  # 먼저 PDF를 Files API에 업로드하세요
  ant files upload --file ./document.pdf

  # 그런 다음 업로드 응답의 file_id를 메시지에 사용하세요
  ant messages create <<YAML
  model: claude-opus-5-5
  max_tokens: 1024
  messages:
    - role: user
      content:
        - type: document
          source:
            type: file
            file_id: $FILE_ID
        - type: text
          text: What are the key findings in this document?
  YAML
  ```

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

  # PDF 파일을 업로드합니다
  with open("/path/to/document.pdf", "rb") as f:
      file_upload = client.files.upload(file=("document.pdf", f, "application/pdf"))

  # 업로드한 파일을 메시지에서 사용합니다
  message = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[
          {
              "role": "user",
              "content": [
                  {
                      "type": "document",
                      "source": {"type": "file", "file_id": file_upload.id},
                  },
                  {"type": "text", "text": "What are the key findings in this document?"},
              ],
          }
      ],
  )

  print(message.content)
  ```

  ```typescript TypeScript
  import Anthropic, { toFile } from "@anthropic-ai/sdk";
  import fs from "node:fs";

  const anthropic = new Anthropic();

  // PDF 파일을 업로드합니다
  const fileUpload = await anthropic.files.upload({
    file: await toFile(fs.createReadStream("/path/to/document.pdf"), undefined, {
      type: "application/pdf"
    })
  });

  // 업로드한 파일을 메시지에서 사용합니다
  const response = await anthropic.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "file",
              file_id: fileUpload.id
            }
          },
          {
            type: "text",
            text: "What are the key findings in this document?"
          }
        ]
      }
    ]
  });

  console.log(response);
  ```

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

  // PDF 파일을 업로드합니다
  var fileUpload = await client.Files.Upload(new FileUploadParams
  {
      File = new BinaryContent
      {
          Stream = File.OpenRead("/path/to/document.pdf"),
          FileName = "document.pdf",
          ContentType = new("application/pdf"),
      },
  });

  // 업로드한 파일을 메시지에서 사용합니다
  var message = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages =
      [
          new UserMessageParam
          {
              Content = new List<ContentBlockParam>
              {
                  new DocumentBlockParam
                  {
                      Source = new FileDocumentSource { FileID = fileUpload.ID },
                  },
                  new TextBlockParam("What are the key findings in this document?"),
              },
          },
      ],
  });

  Console.WriteLine(string.Join("\n", message.Content));
  ```

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

  // PDF 파일을 업로드합니다
  pdfFile, err := os.Open("/path/to/document.pdf")
  if err != nil {
  	panic(err)
  }
  defer pdfFile.Close()

  fileUpload, err := client.Files.Upload(context.TODO(), anthropic.FileUploadParams{
  	File: anthropic.File(pdfFile, "document.pdf", "application/pdf"),
  })
  if err != nil {
  	panic(err)
  }

  // 업로드한 파일을 메시지에서 사용합니다
  message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 1024,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(
  			anthropic.NewDocumentBlock(anthropic.FileDocumentSourceParam{
  				FileID: fileUpload.ID,
  			}),
  			anthropic.NewTextBlock("What are the key findings in this document?"),
  		),
  	},
  })
  if err != nil {
  	panic(err)
  }

  fmt.Printf("%+v\n", message.Content)
  ```

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

  // PDF 파일 업로드
  FileMetadata file = client
      .files()
      .upload(FileUploadParams.builder()
          .file(Path.of("/path/to/document.pdf"))
          .build());

  // 업로드한 파일을 메시지에서 사용
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(1024)
      .addUserMessageOfContentBlockParams(
          List.of(
              ContentBlockParam.ofDocument(
                  DocumentBlockParam.builder()
                      .fileSource(file.id())
                      .build()
              ),
              ContentBlockParam.ofText(
                  TextBlockParam.builder()
                      .text("What are the key findings in this document?")
                      .build()
              )
          )
      )
      .build();

  Message message = client.messages().create(params);
  System.out.println(message.content());
  ```

  ```php PHP
  use Anthropic\Core\FileParam;

  $client = new Client();

  // PDF 파일을 업로드합니다
  $file_upload = $client->files->upload(
      file: FileParam::fromResource(fopen('/path/to/document.pdf', 'r'), contentType: 'application/pdf'),
  );

  // 업로드한 파일을 메시지에서 사용합니다
  $message = $client->messages->create(
      maxTokens: 1024,
      messages: [
          [
              'role' => 'user',
              'content' => [
                  [
                      'type' => 'document',
                      'source' => [
                          'type' => 'file',
                          'fileID' => $file_upload->id,
                      ],
                  ],
                  [
                      'type' => 'text',
                      'text' => 'What are the key findings in this document?',
                  ],
              ],
          ],
      ],
      model: 'claude-opus-5-5',
  );

  echo $message;
  ```

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

  # PDF 파일을 업로드합니다
  file_upload = File.open("/path/to/document.pdf", "rb") do |f|
    anthropic.files.upload(
      file: Anthropic::FilePart.new(f, filename: "document.pdf", content_type: "application/pdf")
    )
  end

  # 업로드한 파일을 메시지에서 사용합니다
  message = anthropic.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {type: "file", file_id: file_upload.id}
          },
          {type: "text", text: "What are the key findings in this document?"}
        ]
      }
    ]
  )

  puts(message.content)
  ```
</CodeGroup>

### PDF 지원 작동 방식

Claude에 PDF를 보내면 다음 단계가 수행됩니다:

<Steps>
  <Step title="시스템이 문서의 내용을 추출합니다.">
    * 시스템이 문서의 각 페이지를 이미지로 변환합니다.
    * 각 페이지의 텍스트가 추출되어 각 페이지의 이미지와 함께 제공됩니다.
  </Step>

  <Step title="Claude가 텍스트와 이미지를 모두 분석합니다.">
    * 문서는 분석을 위해 텍스트와 이미지의 조합으로 제공됩니다.
    * 이를 통해 사용자는 차트, 다이어그램 및 기타 비텍스트 콘텐츠와 같은 PDF의 시각적 요소에 대한 인사이트를 요청할 수 있습니다.
  </Step>

  <Step title="Claude가 관련이 있는 경우 PDF의 내용을 참조하여 응답합니다.">
    Claude는 응답할 때 텍스트 콘텐츠와 시각적 콘텐츠를 모두 참조할 수 있습니다. PDF 지원을 다음과 통합하여 성능을 더욱 향상시킬 수 있습니다:

    * [프롬프트 캐싱 사용](https://platform.claude.com/docs/ko/build-with-claude/pdf-support#use-prompt-caching): 반복 분석의 성능을 향상시킵니다.
    * [문서 일괄 처리](https://platform.claude.com/docs/ko/build-with-claude/pdf-support#process-document-batches): 대량의 문서를 처리합니다.
    * [도구 사용](https://platform.claude.com/docs/ko/agents-and-tools/tool-use/overview): 도구 입력으로 사용할 특정 정보를 문서에서 추출합니다.
  </Step>
</Steps>

### 비용 추정

PDF 파일의 토큰 수는 문서에서 추출된 전체 텍스트와 페이지 수에 따라 달라집니다:

* 텍스트 토큰 비용: 각 페이지는 콘텐츠 밀도에 따라 일반적으로 1,500–3,000개의 토큰을 사용합니다. 추가 PDF 요금 없이 표준 API 요금이 적용됩니다.
* 이미지 토큰 비용: 각 페이지가 이미지로 변환되므로 동일한 [이미지 기반 비용 계산](https://platform.claude.com/docs/ko/build-with-claude/vision#evaluate-image-size)이 적용됩니다.

[토큰 카운팅](https://platform.claude.com/docs/ko/build-with-claude/token-counting)을 사용하여 특정 PDF의 비용을 추정할 수 있습니다.

## PDF 처리 최적화

### 성능 향상

최적의 결과를 위해 다음 모범 사례를 따르세요:

* 요청에서 PDF를 텍스트 앞에 배치하세요
* 표준 글꼴을 사용하세요
* 텍스트가 명확하고 읽기 쉬운지 확인하세요
* 페이지를 올바른 정방향으로 회전하세요
* 프롬프트에서 논리적 페이지 번호(PDF 뷰어 기준)를 사용하세요
* 필요한 경우 대용량 PDF를 청크로 분할하세요
* 반복 분석을 위해 프롬프트 캐싱을 활성화하세요

### 구현 확장

대량 처리의 경우 다음 접근 방식을 고려하세요:

#### 프롬프트 캐싱 사용

반복 쿼리의 성능을 향상시키려면 [프롬프트 캐싱](https://platform.claude.com/docs/ko/build-with-claude/prompt-caching)으로 PDF를 캐시하세요:

<CodeGroup>
  ```bash cURL
  curl -sL "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" |
    base64 | tr -d '\n' |
    jq -Rs '{
      model: "claude-opus-5-5",
      max_tokens: 1024,
      messages: [{
        role: "user",
        content: [
          {
            type: "document",
            source: {type: "base64", media_type: "application/pdf", data: .},
            cache_control: {type: "ephemeral"}
          },
          {type: "text", text: "Which model has the highest human preference win rates across each use-case?"}
        ]
      }]
    }' |
    curl https://api.anthropic.com/v1/messages \
      -H "content-type: application/json" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2026-10-21" \
      -d @-
  ```

  ```bash CLI
  ant messages create <<'YAML'
  model: claude-opus-5-5
  max_tokens: 1024
  messages:
    - role: user
      content:
        - type: document
          source:
            type: base64
            media_type: application/pdf
            data: "@./document.pdf"
          cache_control:
            type: ephemeral
        - type: text
          text: Which model has the highest human preference win rates across each use-case?
  YAML
  ```

  ```python Python
  import base64
  import httpx2

  # 먼저 PDF를 로드하고 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_data = base64.standard_b64encode(
      httpx2.get(pdf_url, follow_redirects=True).content
  ).decode("utf-8")

  # 캐시된 문서로 메시지를 생성합니다
  client = anthropic.Anthropic()
  message = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      messages=[
          {
              "role": "user",
              "content": [
                  {
                      "type": "document",
                      "source": {
                          "type": "base64",
                          "media_type": "application/pdf",
                          "data": pdf_data,
                      },
                      "cache_control": {"type": "ephemeral"},
                  },
                  {
                      "type": "text",
                      "text": "Which model has the highest human preference win rates across each use-case?",
                  },
              ],
          }
      ],
  )

  print(message.content)
  ```

  ```typescript TypeScript
  // 먼저 PDF를 로드하고 인코딩합니다
  const pdfURL =
    "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  const pdfResponse = await fetch(pdfURL);
  const arrayBuffer = await pdfResponse.arrayBuffer();
  const pdfBase64 = Buffer.from(arrayBuffer).toString("base64");

  // 캐시된 문서로 메시지를 생성합니다
  const anthropic = new Anthropic();
  const response = await anthropic.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "base64",
              media_type: "application/pdf",
              data: pdfBase64
            },
            cache_control: { type: "ephemeral" }
          },
          {
            type: "text",
            text: "Which model has the highest human preference win rates across each use-case?"
          }
        ]
      }
    ]
  });

  console.log(response);
  ```

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

  // PDF를 다운로드하고 인코딩합니다
  var pdfUrl = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  using var httpClient = new HttpClient();
  var pdfBase64 = Convert.ToBase64String(await httpClient.GetByteArrayAsync(pdfUrl));

  var message = await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages =
      [
          new UserMessageParam
          {
              Content = new List<ContentBlockParam>
              {
                  new DocumentBlockParam
                  {
                      Source = new Base64PdfSource { Data = pdfBase64 },
                      CacheControl = new CacheControlEphemeral(),
                  },
                  new TextBlockParam("Which model has the highest human preference win rates across each use-case?"),
              },
          },
      ],
  });

  Console.WriteLine(message);
  ```

  ```go Go
  // 먼저 PDF를 로드하고 인코딩합니다
  pdfURL := "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  resp, err := http.Get(pdfURL)
  if err != nil {
  	panic(err)
  }
  defer resp.Body.Close()
  pdfBytes, err := io.ReadAll(resp.Body)
  if err != nil {
  	panic(err)
  }
  pdfBase64 := base64.StdEncoding.EncodeToString(pdfBytes)

  // 캐시 제어가 포함된 문서 블록을 생성합니다
  client := anthropic.NewClient()
  message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 1024,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(
  			anthropic.ContentBlockParamUnion{
  				OfDocument: &anthropic.DocumentBlockParam{
  					Source: anthropic.DocumentBlockParamSourceUnion{
  						OfBase64: &anthropic.Base64PDFSourceParam{
  							Data: pdfBase64,
  						},
  					},
  					CacheControl: anthropic.NewCacheControlEphemeralParam(),
  				},
  			},
  			anthropic.NewTextBlock("Which model has the highest human preference win rates across each use-case?"),
  		),
  	},
  })
  if err != nil {
  	panic(err)
  }

  fmt.Printf("%+v\n", message.Content)
  ```

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

  // PDF를 다운로드하고 인코딩합니다
  String pdfUrl =
      "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  HttpClient httpClient = HttpClient.newBuilder()
      .followRedirects(HttpClient.Redirect.NORMAL)
      .build();
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create(pdfUrl))
      .GET()
      .build();

  HttpResponse<byte[]> response = httpClient.send(
      request,
      HttpResponse.BodyHandlers.ofByteArray()
  );
  String pdfBase64 = Base64.getEncoder().encodeToString(response.body());

  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(1024)
      .addUserMessageOfContentBlockParams(
          List.of(
              ContentBlockParam.ofDocument(
                  DocumentBlockParam.builder()
                      .source(Base64PdfSource.builder()
                          .data(pdfBase64)
                          .build())
                      .cacheControl(CacheControlEphemeral.builder().build())
                      .build()
              ),
              ContentBlockParam.ofText(
                  TextBlockParam.builder()
                      .text(
                          "Which model has the highest human preference win rates across each use-case?"
                      )
                      .build()
              )
          )
      )
      .build();

  Message message = client.messages().create(params);
  System.out.println(message);
  ```

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

  // PDF를 로드하고 인코딩합니다
  $pdf_url = 'https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf';
  $pdf_data = base64_encode(file_get_contents($pdf_url));

  $message = $client->messages->create(
      maxTokens: 1024,
      messages: [
          [
              'role' => 'user',
              'content' => [
                  [
                      'type' => 'document',
                      'source' => [
                          'type' => 'base64',
                          'media_type' => 'application/pdf',
                          'data' => $pdf_data,
                      ],
                      'cache_control' => ['type' => 'ephemeral'],
                  ],
                  [
                      'type' => 'text',
                      'text' => 'Which model has the highest human preference win rates across each use-case?',
                  ],
              ],
          ],
      ],
      model: 'claude-opus-5-5',
  );

  echo $message;
  ```

  ```ruby Ruby
  require "open-uri"

  # PDF를 불러와 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read }
  pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines

  anthropic = Anthropic::Client.new

  message = anthropic.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: [
          {
            type: "document",
            source: {
              type: "base64",
              media_type: "application/pdf",
              data: pdf_data
            },
            cache_control: {type: "ephemeral"}
          },
          {
            type: "text",
            text: "Which model has the highest human preference win rates across each use-case?"
          }
        ]
      }
    ]
  )

  puts(message.content)
  ```
</CodeGroup>

#### 문서 배치 처리

[Message Batches API](https://platform.claude.com/docs/ko/build-with-claude/batch-processing)를 사용하여 하나의 요청으로 여러 PDF를 처리하세요:

<CodeGroup>
  ```bash cURL
  curl -sL "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf" | base64 | tr -d '\n' > pdf_base64.txt
  # pdf_base64.txt 내용을 사용하여 JSON 요청 파일을 생성합니다
  jq -n --rawfile PDF_BASE64 pdf_base64.txt '{
    "requests": [
    {
      "custom_id": "my-first-request",
      "params": {
        "model": "claude-opus-5-5",
        "max_tokens": 1024,
        "messages": [{
          "role": "user",
          "content": [{
            "type": "document",
            "source": {
              "type": "base64",
              "media_type": "application/pdf",
              "data": $PDF_BASE64
            }
          },
          {
            "type": "text",
            "text": "Which model has the highest human preference win rates across each use-case?"
          }]
        }]
      }
    },
    {
      "custom_id": "my-second-request",
      "params": {
        "model": "claude-opus-5-5",
        "max_tokens": 1024,
        "messages": [{
          "role": "user",
          "content": [{
            "type": "document",
            "source": {
              "type": "base64",
              "media_type": "application/pdf",
              "data": $PDF_BASE64
            }
          },
          {
            "type": "text",
            "text": "Extract 5 key insights from this document."
          }]
        }]
      }
    }]
  }' > request.json

  # 그런 다음 JSON 파일을 사용하여 API 호출을 수행합니다
  curl https://api.anthropic.com/v1/messages/batches \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -d @request.json
  ```

  ```bash CLI
  ant messages:batches create <<'YAML'
  requests:
    - custom_id: my-first-request
      params:
        model: claude-opus-5-5
        max_tokens: 1024
        messages:
          - role: user
            content:
              - type: document
                source:
                  type: base64
                  media_type: application/pdf
                  data: "@./document.pdf"
              - type: text
                text: >-
                  Which model has the highest human preference win rates
                  across each use-case?
    - custom_id: my-second-request
      params:
        model: claude-opus-5-5
        max_tokens: 1024
        messages:
          - role: user
            content:
              - type: document
                source:
                  type: base64
                  media_type: application/pdf
                  data: "@./document.pdf"
              - type: text
                text: Extract 5 key insights from this document.
  YAML
  ```

  ```python Python
  import base64
  import httpx2

  # 먼저 PDF를 로드하고 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_data = base64.standard_b64encode(
      httpx2.get(pdf_url, follow_redirects=True).content
  ).decode("utf-8")

  # 문서를 사용하는 요청 배치를 생성합니다
  client = anthropic.Anthropic()
  message_batch = client.messages.batches.create(
      requests=[
          {
              "custom_id": "my-first-request",
              "params": {
                  "model": "claude-opus-5-5",
                  "max_tokens": 1024,
                  "messages": [
                      {
                          "role": "user",
                          "content": [
                              {
                                  "type": "document",
                                  "source": {
                                      "type": "base64",
                                      "media_type": "application/pdf",
                                      "data": pdf_data,
                                  },
                              },
                              {
                                  "type": "text",
                                  "text": "Which model has the highest human preference win rates across each use-case?",
                              },
                          ],
                      }
                  ],
              },
          },
          {
              "custom_id": "my-second-request",
              "params": {
                  "model": "claude-opus-5-5",
                  "max_tokens": 1024,
                  "messages": [
                      {
                          "role": "user",
                          "content": [
                              {
                                  "type": "document",
                                  "source": {
                                      "type": "base64",
                                      "media_type": "application/pdf",
                                      "data": pdf_data,
                                  },
                              },
                              {
                                  "type": "text",
                                  "text": "Extract 5 key insights from this document.",
                              },
                          ],
                      }
                  ],
              },
          },
      ]
  )

  print(message_batch)
  ```

  ```typescript TypeScript
  // 먼저 PDF를 로드하고 인코딩합니다
  const pdfURL =
    "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  const pdfResponse = await fetch(pdfURL);
  const arrayBuffer = await pdfResponse.arrayBuffer();
  const pdfBase64 = Buffer.from(arrayBuffer).toString("base64");

  // 문서를 사용하는 요청 배치를 생성합니다
  const anthropic = new Anthropic();
  const response = await anthropic.messages.batches.create({
    requests: [
      {
        custom_id: "my-first-request",
        params: {
          model: "claude-opus-5-5",
          max_tokens: 1024,
          messages: [
            {
              role: "user",
              content: [
                {
                  type: "document",
                  source: {
                    type: "base64",
                    media_type: "application/pdf",
                    data: pdfBase64
                  }
                },
                {
                  type: "text",
                  text: "Which model has the highest human preference win rates across each use-case?"
                }
              ]
            }
          ]
        }
      },
      {
        custom_id: "my-second-request",
        params: {
          model: "claude-opus-5-5",
          max_tokens: 1024,
          messages: [
            {
              role: "user",
              content: [
                {
                  type: "document",
                  source: {
                    type: "base64",
                    media_type: "application/pdf",
                    data: pdfBase64
                  }
                },
                {
                  type: "text",
                  text: "Extract 5 key insights from this document."
                }
              ]
            }
          ]
        }
      }
    ]
  });

  console.log(response);
  ```

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

  // PDF를 다운로드하고 인코딩합니다
  var pdfUrl = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  using var httpClient = new HttpClient();
  var pdfBase64 = Convert.ToBase64String(await httpClient.GetByteArrayAsync(pdfUrl));

  var batch = await client.Messages.Batches.Create(new BatchCreateParams
  {
      Requests =
      [
          new()
          {
              CustomID = "my-first-request",
              Params = new()
              {
                  Model = Model.ClaudeOpus5_5,
                  MaxTokens = 1024,
                  Messages =
                  [
                      new UserMessageParam
                      {
                          Content = new List<ContentBlockParam>
                          {
                              new DocumentBlockParam
                              {
                                  Source = new Base64PdfSource { Data = pdfBase64 },
                              },
                              new TextBlockParam("Which model has the highest human preference win rates across each use-case?"),
                          },
                      },
                  ],
              },
          },
          new()
          {
              CustomID = "my-second-request",
              Params = new()
              {
                  Model = Model.ClaudeOpus5_5,
                  MaxTokens = 1024,
                  Messages =
                  [
                      new UserMessageParam
                      {
                          Content = new List<ContentBlockParam>
                          {
                              new DocumentBlockParam
                              {
                                  Source = new Base64PdfSource { Data = pdfBase64 },
                              },
                              new TextBlockParam("Extract 5 key insights from this document."),
                          },
                      },
                  ],
              },
          },
      ],
  });

  Console.WriteLine(batch);
  ```

  ```go Go
  // 먼저 PDF를 로드하고 인코딩합니다
  pdfURL := "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  resp, err := http.Get(pdfURL)
  if err != nil {
  	panic(err)
  }
  defer resp.Body.Close()
  pdfBytes, err := io.ReadAll(resp.Body)
  if err != nil {
  	panic(err)
  }
  pdfBase64 := base64.StdEncoding.EncodeToString(pdfBytes)

  // 문서를 사용하는 요청 배치를 생성합니다
  client := anthropic.NewClient()
  batch, err := client.Messages.Batches.New(context.TODO(), anthropic.MessageBatchNewParams{
  	Requests: []anthropic.MessageBatchNewParamsRequest{
  		{
  			CustomID: "my-first-request",
  			Params: anthropic.MessageBatchNewParamsRequestParams{
  				Model:     anthropic.ModelClaudeOpus5_5,
  				MaxTokens: 1024,
  				Messages: []anthropic.MessageParam{
  					anthropic.NewUserMessage(
  						anthropic.NewDocumentBlock(anthropic.Base64PDFSourceParam{
  							Data: pdfBase64,
  						}),
  						anthropic.NewTextBlock("Which model has the highest human preference win rates across each use-case?"),
  					),
  				},
  			},
  		},
  		{
  			CustomID: "my-second-request",
  			Params: anthropic.MessageBatchNewParamsRequestParams{
  				Model:     anthropic.ModelClaudeOpus5_5,
  				MaxTokens: 1024,
  				Messages: []anthropic.MessageParam{
  					anthropic.NewUserMessage(
  						anthropic.NewDocumentBlock(anthropic.Base64PDFSourceParam{
  							Data: pdfBase64,
  						}),
  						anthropic.NewTextBlock("Extract 5 key insights from this document."),
  					),
  				},
  			},
  		},
  	},
  })
  if err != nil {
  	panic(err)
  }

  fmt.Printf("%+v\n", batch)
  ```

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

  // PDF를 다운로드하고 인코딩합니다
  String pdfUrl =
      "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf";
  HttpClient httpClient = HttpClient.newBuilder()
      .followRedirects(HttpClient.Redirect.NORMAL)
      .build();
  HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create(pdfUrl))
      .GET()
      .build();

  HttpResponse<byte[]> response = httpClient.send(
      request,
      HttpResponse.BodyHandlers.ofByteArray()
  );
  String pdfBase64 = Base64.getEncoder().encodeToString(response.body());

  BatchCreateParams params = BatchCreateParams.builder()
      .addRequest(
          BatchCreateParams.Request.builder()
              .customId("my-first-request")
              .params(
                  BatchCreateParams.Request.Params.builder()
                      .model(Model.CLAUDE_OPUS_5_5)
                      .maxTokens(1024)
                      .addUserMessageOfContentBlockParams(
                          List.of(
                              ContentBlockParam.ofDocument(
                                  DocumentBlockParam.builder()
                                      .source(Base64PdfSource.builder()
                                          .data(pdfBase64)
                                          .build())
                                      .build()
                              ),
                              ContentBlockParam.ofText(
                                  TextBlockParam.builder()
                                      .text(
                                          "Which model has the highest human preference win rates across each use-case?"
                                      )
                                      .build()
                              )
                          )
                      )
                      .build()
              )
              .build()
      )
      .addRequest(
          BatchCreateParams.Request.builder()
              .customId("my-second-request")
              .params(
                  BatchCreateParams.Request.Params.builder()
                      .model(Model.CLAUDE_OPUS_5_5)
                      .maxTokens(1024)
                      .addUserMessageOfContentBlockParams(
                          List.of(
                              ContentBlockParam.ofDocument(
                                  DocumentBlockParam.builder()
                                      .source(Base64PdfSource.builder()
                                          .data(pdfBase64)
                                          .build())
                                      .build()
                              ),
                              ContentBlockParam.ofText(
                                  TextBlockParam.builder()
                                      .text("Extract 5 key insights from this document.")
                                      .build()
                              )
                          )
                      )
                      .build()
              )
              .build()
      )
      .build();

  MessageBatch batch = client.messages().batches().create(params);
  System.out.println(batch);
  ```

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

  // PDF를 로드하고 인코딩합니다
  $pdf_url = 'https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf';
  $pdf_data = base64_encode(file_get_contents($pdf_url));

  $batch = $client->messages->batches->create(
      requests: [
          [
              'custom_id' => 'my-first-request',
              'params' => [
                  'model' => 'claude-opus-5-5',
                  'max_tokens' => 1024,
                  'messages' => [
                      [
                          'role' => 'user',
                          'content' => [
                              [
                                  'type' => 'document',
                                  'source' => [
                                      'type' => 'base64',
                                      'media_type' => 'application/pdf',
                                      'data' => $pdf_data,
                                  ],
                              ],
                              [
                                  'type' => 'text',
                                  'text' => 'Which model has the highest human preference win rates across each use-case?',
                              ],
                          ],
                      ],
                  ],
              ],
          ],
          [
              'custom_id' => 'my-second-request',
              'params' => [
                  'model' => 'claude-opus-5-5',
                  'max_tokens' => 1024,
                  'messages' => [
                      [
                          'role' => 'user',
                          'content' => [
                              [
                                  'type' => 'document',
                                  'source' => [
                                      'type' => 'base64',
                                      'media_type' => 'application/pdf',
                                      'data' => $pdf_data,
                                  ],
                              ],
                              [
                                  'type' => 'text',
                                  'text' => 'Extract 5 key insights from this document.',
                              ],
                          ],
                      ],
                  ],
              ],
          ],
      ],
  );

  echo $batch;
  ```

  ```ruby Ruby
  require "open-uri"

  # PDF를 불러와 인코딩합니다
  pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
  pdf_bytes = URI.open(pdf_url, "rb") { |f| f.read }
  pdf_data = [pdf_bytes].pack("m0") # Encode as base64 without newlines

  anthropic = Anthropic::Client.new

  message_batch = anthropic.messages.batches.create(
    requests: [
      {
        custom_id: "my-first-request",
        params: {
          model: Anthropic::Model::CLAUDE_OPUS_5_5,
          max_tokens: 1024,
          messages: [
            {
              role: "user",
              content: [
                {
                  type: "document",
                  source: {
                    type: "base64",
                    media_type: "application/pdf",
                    data: pdf_data
                  }
                },
                {
                  type: "text",
                  text: "Which model has the highest human preference win rates across each use-case?"
                }
              ]
            }
          ]
        }
      },
      {
        custom_id: "my-second-request",
        params: {
          model: Anthropic::Model::CLAUDE_OPUS_5_5,
          max_tokens: 1024,
          messages: [
            {
              role: "user",
              content: [
                {
                  type: "document",
                  source: {
                    type: "base64",
                    media_type: "application/pdf",
                    data: pdf_data
                  }
                },
                {
                  type: "text",
                  text: "Extract 5 key insights from this document."
                }
              ]
            }
          ]
        }
      }
    ]
  )

  puts(message_batch)
  ```
</CodeGroup>

배치는 비동기적으로 처리됩니다. 진행 상황을 확인하고 처리가 끝난 후 결과를 가져오려면 [배치 처리](https://platform.claude.com/docs/ko/build-with-claude/batch-processing)를 참조하세요.

## 다음 단계

<CardGroup cols={2}>
  <Card title="비전" icon="image" href="https://platform.claude.com/docs/ko/build-with-claude/vision">
    Claude의 비전 기능을 통해 이미지를 처리하고 분석할 수 있어 멀티모달 상호작용의 흥미로운 가능성이 열립니다.
  </Card>

  <Card title="PDF 예제 사용해 보기" icon="file" href="https://platform.claude.com/cookbook/multimodal-getting-started-with-vision">
    Claude Cookbook 레시피에서 PDF 처리의 실용적인 예제를 살펴보세요.
  </Card>

  <Card title="API 레퍼런스 보기" icon="code" href="https://platform.claude.com/docs/ko/api/messages/create">
    PDF 지원에 대한 전체 API 문서를 확인하세요.
  </Card>
</CardGroup>

## 제공 여부

PDF 지원은(는) 모든 모델에서 사용 가능 상태이며 제로 데이터 보존 및 HIPAA 대비에 적격합니다.

### API 지원

#### [Messages API](https://platform.claude.com/docs/ko/build-with-claude/working-with-messages)

* 제공 여부: 항상 활성화

| 상태                | 클라우드 플랫폼                                                                                                                                                                                                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 사용 가능             | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/ko/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/ko/build-with-claude/claude-models-on-google-cloud/anthropic-managed) |
| 사용 가능<sup>1</sup> | [Microsoft Foundry](https://platform.claude.com/docs/ko/build-with-claude/claude-in-microsoft-foundry)                                                                                                                                                                         |
| 사용 가능<sup>2</sup> | [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/ko/build-with-claude/claude-on-amazon-bedrock-legacy)                                                                                                                                                          |
| 사용 가능<sup>2</sup> | [Amazon Bedrock](https://platform.claude.com/docs/ko/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/ko/build-with-claude/claude-models-on-google-cloud/google-managed)                         |

1. `file_id` 소스에는 Anthropic에서 호스팅되는 배포가 필요합니다.
2. Base64 소스만 지원합니다.

#### [Managed Agents](https://platform.claude.com/docs/ko/managed-agents/overview)

* 제공 여부: 항상 활성화

| 상태    | 클라우드 플랫폼    |
| ----- | ----------- |
| 사용 가능 | 지원되는 모든 플랫폼 |

### 데이터 처리

[데이터 처리 개요](https://platform.claude.com/docs/ko/manage-claude/api-and-data-retention#feature-eligibility)

| 항목    | 제로 데이터 보존                                                                                                                           | HIPAA                                                           |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| 상태    | 적격([적용 모델](https://platform.claude.com/docs/ko/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) 제외) | 적격                                                              |
| 세부 정보 | —                                                                                                                                   | HIPAA 적격성은 Files API가 아닌 Messages API를 통해 인라인으로 전송된 PDF에 적용됩니다. |

적용 엔드포인트:

* `/v1/messages`
