LLM으로 청구서 데이터를 JSON으로 추출하기, 데이터 무보존

에이전트가 청구서 텍스트를 구조화된 JSON으로 바꾸고 합계가 맞는지 확인합니다. 실행이 끝나면 아무것도 남지 않습니다.

  • 파일
  • 데이터 무보존
  • 예산 상한

실제 실행 보기

2026년 10월 7일에 기록된 실제 실행을 다시 재생합니다. 모델: openai/gpt-6-luna.

성공run_409c7825c514f991b83554e667640f68$0.03 중 $0.003496
  1. 대기 중예산 $0.03 예약됨
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell off · web off
  4. 파일read invoice.txt
  5. MicroVMmicroVM destroyed
  6. 성공모델 호출 2회, 토큰 2,304개기록된 출력 (영어)
    json
    {
      "vendor": "Fjord Supplies AS",
      "invoice_number": "FS-2026-0417",
      "invoice_date": "2026-09-30",
      "due_date": "2026-10-30",
      "currency": "EUR",
      "line_items": [
        {
          "description": "Organic flour 25 kg",
          "quantity": 8,
          "unit_price": 31.5,
          "amount": 252
        },
        {
          "description": "Sunflower oil 10 l",
          "quantity": 5,
          "unit_price": 24,
          "amount": 120
        },
        {
          "description": "Delivery (pallet)",
          "quantity": 1,
          "unit_price": 45,
          "amount": 45
        }
      ],
      "subtotal": 417,
      "tax": 104.25,
      "total": 531.25,
      "checks": {
        "line_items_sum_matches_subtotal": true,
        "subtotal_plus_tax_matches_total": false,
        "notes": "Subtotal plus VAT is 521.25, which is 10.00 less than the printed total of 531.25."
      }
    }
  7. 워커 폐기됨$0.003496 청구, $0.026504 반환
모델 $0.000378 · 웹 $0.00 · 컴퓨팅 $0.0028 · 추가 요금 $0.000318

이 실행에서는 데이터 무보존이 켜져 있었습니다.

직접 실행하기

요청이 모두 채워진 상태로 플레이그라운드에서 샘플을 엽니다. 내 계정에서 표시된 예산 안에서, 같은 읽기 전용 샘플 시스템을 대상으로 실행됩니다.

이 샘플의 예산: $0.03

작동 방식

청구서에는 이름, 주소, 은행 정보가 들어 있으므로 이 실행은 데이터 무보존을 사용합니다. 에이전트는 공급업체, 번호, 날짜, 품목, 합계를 JSON으로 반환하고, 계산이 맞지 않으면 해당 청구서를 표시합니다. 스캔한 문서는 먼저 OCR을 실행하고 텍스트를 전달하세요.

에이전트가 할 수 있는 일과 할 수 없는 일

권한은 요청의 일부입니다. 여기에 나열되지 않은 것은 실행에서 사용할 수 없습니다.

설정허용 범위
연결없음
웹꺼짐
셸꺼짐
파일invoice.txt (읽기 전용)
데이터 무보존켜짐: 추적이 기록되지 않으며 출력은 한 번만 반환됩니다
예산$0.03, 하드 캡
시간 제한60초

자격 증명은 머신 안으로 들어가지 않습니다. 브로커가 각 호출에 자격 증명을 추가하고 위의 메서드를 강제합니다.

코드

샘플이 보내는 정확한 요청입니다. EPHEMERAL_API_KEY를 내 조직의 멤버 키로 설정하세요.

curl -X POST $EPHEMERAL_URL/v1/runs \
  -H "Authorization: Bearer $EPHEMERAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @request.json

요청에 포함된 파일

인라인으로 전달되므로 먼저 업로드할 필요가 없습니다. 에이전트는 각각을 읽기 전용 파일로 봅니다.

invoice.txt
invoice.txt
INVOICE

Fjord Supplies AS
Storgata 12, 0155 Oslo, Norway
VAT no: NO 123 456 789 MVA

Invoice number: FS-2026-0417
Invoice date: 2026-09-30
Due date: 2026-10-30
Bill to: Example Bakery Ltd, 5 High Street, London

Description                      Qty   Unit price (EUR)   Amount (EUR)
Organic flour 25 kg               8         31.50            252.00
Sunflower oil 10 l                5         24.00            120.00
Delivery (pallet)                 1         45.00             45.00

Subtotal                                                     417.00
VAT 25%                                                      104.25
Total due                                                    531.25

Payment: bank transfer, IBAN NO93 8601 1117 947, reference FS-2026-0417
전체 요청 본문 request.json

파일이 인라인으로 포함된 같은 본문입니다.

request.json
{
  "prompt": "Extract the invoice in invoice.txt. Reply with one JSON object and nothing else: {\"vendor\": string, \"invoice_number\": string, \"invoice_date\": \"YYYY-MM-DD\", \"due_date\": \"YYYY-MM-DD\", \"currency\": string, \"line_items\": [{\"description\": string, \"quantity\": number, \"unit_price\": number, \"amount\": number}], \"subtotal\": number, \"tax\": number, \"total\": number, \"checks\": {\"line_items_sum_matches_subtotal\": boolean, \"subtotal_plus_tax_matches_total\": boolean, \"notes\": string}}. Copy numbers exactly as printed, then do the arithmetic for the checks. Use null for any field the document does not show.",
  "files": [
    {
      "path": "invoice.txt",
      "content": "INVOICE\n\nFjord Supplies AS\nStorgata 12, 0155 Oslo, Norway\nVAT no: NO 123 456 789 MVA\n\nInvoice number: FS-2026-0417\nInvoice date: 2026-09-30\nDue date: 2026-10-30\nBill to: Example Bakery Ltd, 5 High Street, London\n\nDescription                      Qty   Unit price (EUR)   Amount (EUR)\nOrganic flour 25 kg               8         31.50            252.00\nSunflower oil 10 l                5         24.00            120.00\nDelivery (pallet)                 1         45.00             45.00\n\nSubtotal                                                     417.00\nVAT 25%                                                      104.25\nTotal due                                                    531.25\n\nPayment: bank transfer, IBAN NO93 8601 1117 947, reference FS-2026-0417\n"
    }
  ],
  "shell": false,
  "timeout_seconds": 60,
  "max_cost_micros": 30000,
  "zero_data_retention": true
}

더 알아보기

관련 샘플

esc

“”와(과) 일치하는 항목이 없습니다.