Skip to main content
Orux AIOruxAI

Orux AI / 모델 노트

Claude Sonnet 5.5 API: 가격과 JSON 추출 검증

Claude Sonnet 5.5 API의 OpenAI Python SDK 호출과 100만 tokens당 190/950 Credits를 확인합니다. 실제 2회 JSON 추출·비용, Node/Python 검증기와 9개 거부 예제를 보존하며 구조·원문 일치, 캐시와 최소요금을 구분합니다.

Orux AI게시 12 분 읽기
Claude Sonnet 5.5 API: 가격과 JSON 추출 검증 — Claude Sonnet 5.5 API의 OpenAI Python SDK 호출과 100만 tokens당 190/950 Credits를 확인합니다.
목차

Claude Sonnet 5.5 API: 가격, 호출과 검증한 JSON 추출

Anthropic의 Claude Sonnet 5.5 API 정가는 입력 100만 tokens당 $2, 출력 $10입니다. Orux AI에서는 같은 claude-sonnet-5-5가 입력 190 Credits($0.95), 출력 950 Credits($4.75)이며 표준 OpenAI Python SDK의 base_url을 바꿔 호출합니다. 아래에는 가격표, 실행할 수 있는 Python·cURL 요청, 실제 두 번 실행한 JSON 추출, 첫 응답의 불일치를 잡은 검증기와 두 호출 비용을 담았습니다.

Claude Sonnet 5.5 API 한눈에 보기

Claude Sonnet 5.5는 2026년 9월 28일 공개한 Anthropic의 중간급 모델입니다. Haiku로 부족하고 Opus 비용이 부담될 때 후보가 됩니다. 다음은 2026년 10월 29일 확인한 100만 tokens당 가격입니다.

요율(100만 tokens당)Anthropic 정가Orux AI정가 대비 Orux 비율
입력$2.00190 Credits($0.95)47.5%
출력$10.00950 Credits($4.75)47.5%
캐시 읽기$0.1012 Credits($0.06)60%
5분 캐시 쓰기$2.50237.5 Credits($1.19)47.5%
1시간 캐시 쓰기$4.00380 Credits($1.90)47.5%

좌우로 밀어 전체 표를 확인하세요.

출처는 Anthropic 가격과 Claude Sonnet 5.5 모델 페이지입니다. Orux AI는 1 Credit=$0.005, 즉 200 Credits=$1 고정 환산으로 청구하며 괄호의 달러는 비교용입니다.

표에 없는 세 가지도 확인하세요.

  • Orux AI의 채팅 요청 최소요금은 건당 0.001 Credits입니다.
  • Anthropic Batch API는 50% 할인되지만 Orux AI는 이 모델의 배치를 제공하지 않습니다. 위 표는 일반 비배치 가격 비교입니다.
  • 실패 요청은 청구하지 않습니다. 월정액 없이 선불 잔액에서 완료한 호출만 결제합니다.

Claude 세 등급, 캐시 계산과 Haiku의 100K 경계는 Claude API 가격(영어)에 정리했습니다.

OpenAI SDK로 Claude Sonnet 5.5 호출하기

Orux AI의 OpenAI 호환 Chat Completions 주소는 https://orux.top/api/v1입니다. /keys에서 키를 만드세요. 전체 키는 생성 시 한 번만 표시되므로 바로 환경변수에 보관합니다.

Python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://orux.top/api/v1", api_key=os.environ["ORUX_API_KEY"])

resp = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Summarize this in 3 bullet points: ..."}],
    max_tokens=500,
)
print(resp.choices[0].message.content)

# Estimate the charge in Credits from the published rates (Credits per 1M tokens)
IN_RATE, OUT_RATE = 190, 950  # claude-sonnet-5-5, checked 2026-10-29
u = resp.usage
print(f"~ {(u.prompt_tokens * IN_RATE + u.completion_tokens * OUT_RATE) / 1e6:.6f} Credits")

같은 요청의 cURL 버전입니다.

Shell
curl https://orux.top/api/v1/chat/completions \
  -H "Authorization: Bearer $ORUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 500,
       "messages": [{"role": "user", "content": "Summarize this in 3 bullet points: ..."}]}'

stream=True로 스트리밍할 수 있습니다. 처음부터 오류를 구분하세요. 401은 잘못된 키, 402는 잔액 부족이므로 키 교체 대신 충전, 429는 지터를 더한 지수 백오프로 속도를 낮춥니다.

접근 방식도 구분해야 합니다. Anthropic 자체 OpenAI SDK 호환 계층은 현재 문서에서 Claude API 테스트 용도와 기능 제한을 설명합니다(공식 문서, 2026년 11월 1일 재확인). 원문은 주로 시험·비교용이라고 표현했지만 이를 공식적인 운영 사용 전면 금지로 확대하지 않습니다. 네이티브 기능이 필요하면 Anthropic SDK를 직접 쓰세요. Orux AI는 별도의 독립적인 제3자 게이트웨이로, 하나의 키·OpenAI 형식 클라이언트·잔액에서 Claude, GPT, Gemini, DeepSeek 등을 사용할 수 있습니다. 필요한 모델 범위에 따라 선택하세요.

Claude JSON을 검증하는 방법

Orux AI의 Claude Sonnet 5.5 자료에는 messages와 max_tokens가 있습니다. 아래 테스트는 JSON 모드나 schema 매개변수 없이 프롬프트로 생성한 뒤 코드로 검증했습니다. 어떤 모델이든 “파싱 가능한 JSON”과 “올바른 데이터”를 구분하는 것이 좋습니다.

추출 계약

2026년 10월 29일 가상 박물관 대여 기록 네 개를 max_tokens=1000으로 실행했습니다. 미승인 상태의 상충 평가액, 명시적으로 확인된 0, 누락된 전시실과 불가능한 2월 30일을 넣어 부주의한 추출을 드러내도록 했습니다. 첫 요청 전체를 원래 영어로 보존합니다.

텍스트
Extract this fictional museum loan inventory. Return JSON only, without Markdown. The root has exactly one key, items. Each item has exactly id, title, gallery, insurance_usd, arrival_date. Preserve the stated item order. insurance_usd is a nonnegative JSON number or null; an explicitly confirmed zero is 0, not null. arrival_date is an actual calendar date in YYYY-MM-DD or null. Missing, unapproved, conflicting or impossible values must be null. Never choose between conflicting unapproved estimates. Do not infer facts.

A1: Brass compass. Gallery A. Approved insurance USD 12000. Arrival 2026-11-14.
B2: Silk route map. Gallery B. Draft insurance estimates: USD 8000 in one note and USD 9000 in another; neither approved. Arrival 2026-11-16.
C3: Ceramic sherd. Insurance is explicitly confirmed as USD 0. Gallery and arrival date are unconfirmed.
D4: Glass lens. Gallery D. Approved insurance USD 500. Arrival is written as 2026-02-30; the actual date has not been confirmed.

첫 출력과 지시를 명확히 한 재실행

수정하지 않은 첫 응답입니다.

JSON
{"items":[{"id":"A1","title":"Brass compass","gallery":"A","insurance_usd":12000,"arrival_date":"2026-11-14"},{"id":"B2","title":"Silk route map","gallery":"B","insurance_usd":null,"arrival_date":"2026-11-16"},{"id":"C3","title":"Ceramic sherd","gallery":null,"insurance_usd":0,"arrival_date":null},{"id":"D4","title":"Glass lens","gallery":"D","insurance_usd":500,"arrival_date":null}]}

어려운 부분은 맞았습니다. C3의 확인된 0은 0으로 남았고, B2는 8000 또는 9000을 임의로 고르지 않았으며 2월 30일은 null이 됐습니다. 하지만 “Gallery A”를 “A”로 줄였습니다. 전체 라벨 보존을 요구하지 않았으므로 사실 오해보다 계약 누락입니다. 그래도 “Gallery A”를 키로 쓰는 가져오기 표는 깨집니다.

다음 문장을 추가하고 같은 기록·매개변수로 다시 실행했습니다.

텍스트
For gallery, preserve the full source label exactly (for example, "Gallery A", not "A"). Never shorten or translate these labels.

두 번째 응답도 편집하지 않았습니다. response.json으로 저장하세요.

JSON
{
  "items": [
    {"id": "A1", "title": "Brass compass", "gallery": "Gallery A", "insurance_usd": 12000, "arrival_date": "2026-11-14"},
    {"id": "B2", "title": "Silk route map", "gallery": "Gallery B", "insurance_usd": null, "arrival_date": "2026-11-16"},
    {"id": "C3", "title": "Ceramic sherd", "gallery": null, "insurance_usd": 0, "arrival_date": null},
    {"id": "D4", "title": "Glass lens", "gallery": "Gallery D", "insurance_usd": 500, "arrival_date": null}
  ]
}

두 호출 모두 finish_reason=stop으로 끝났습니다. 하나의 null은 미승인·미확인·불가능 같은 이유를 한 값으로 합칩니다. 실제 가져오기는 JSON과 함께 원문과 사람의 검토 대기열을 보존해야 합니다.

실행 가능한 검증기

루트 키, 정확한 필드 집합, 비어 있지 않고 고유한 ID, 값 타입, 음수가 아닌 금액과 실제 달력 날짜를 검사합니다. 두 번째 파일을 주면 값과 항목 순서를 참조 답안과도 비교합니다. 이 예제의 기대값은 편집자가 원문에서 수작업으로 옮겼고 두 번째 응답과 같아서 expected.json과 response.json 내용이 같습니다.

사용한 Node.js 22 버전은 validate.mjs로 저장합니다.

JavaScript
import fs from 'node:fs';
import {pathToFileURL} from 'node:url';
import {isDeepStrictEqual} from 'node:util';
export function validate(raw, expected) {
  const x = JSON.parse(raw), keys = ['id','title','gallery','insurance_usd','arrival_date'];
  const object = v => v !== null && typeof v === 'object' && !Array.isArray(v);
  const sameKeys = (v, k) => object(v) && Object.keys(v).sort().join('|') === [...k].sort().join('|');
  if (!sameKeys(x, ['items']) || !Array.isArray(x.items) || !x.items.length) throw Error('items');
  const seen = new Set();
  for (const item of x.items) {
    if (!sameKeys(item, keys)) throw Error('keys');
    if (typeof item.id !== 'string' || !item.id.trim() || seen.has(item.id)) throw Error('id');
    seen.add(item.id);
    for (const k of ['title','gallery']) {
      if (item[k] !== null && (typeof item[k] !== 'string' || !item[k].trim())) throw Error(k);
    }
    const n = item.insurance_usd;
    if (n !== null && (typeof n !== 'number' || !Number.isFinite(n) || n < 0)) throw Error('insurance_usd');
    const d = item.arrival_date;
    if (d !== null) {
      if (typeof d !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(d)) throw Error('arrival_date');
      const parsed = new Date(d + 'T00:00:00Z');
      if (!Number.isFinite(parsed.getTime()) || parsed.toISOString().slice(0,10) !== d) throw Error('arrival_date');
    }
  }
  if (expected !== undefined && !isDeepStrictEqual(x, expected)) throw Error('source_mismatch');
  return x;
}
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  try {
    const expected = process.argv[3] ? JSON.parse(fs.readFileSync(process.argv[3],'utf8')) : undefined;
    const data = validate(fs.readFileSync(process.argv[2],'utf8'), expected);
    console.log(`PASS ${data.items.length} items; source fixture ${expected ? 'checked' : 'NOT checked'}`);
  } catch (error) { console.error('REJECT', error.message); process.exitCode = 1; }
}

같은 핵심 검사·오류 라벨을 사용하는 Python 버전 validate.py입니다.

Python
import json, math, re, sys
from datetime import date

KEYS = {"id", "title", "gallery", "insurance_usd", "arrival_date"}


def validate(raw, expected=None):
    x = json.loads(raw)  # Markdown fences or prose around the JSON fail here
    if not isinstance(x, dict) or set(x) != {"items"} or not isinstance(x["items"], list) or not x["items"]:
        raise ValueError("items")
    seen = set()
    for item in x["items"]:
        if not isinstance(item, dict) or set(item) != KEYS:
            raise ValueError("keys")
        item_id = item["id"]
        if not isinstance(item_id, str) or not item_id.strip() or item_id in seen:
            raise ValueError("id")
        seen.add(item_id)
        for k in ("title", "gallery"):
            v = item[k]
            if v is not None and (not isinstance(v, str) or not v.strip()):
                raise ValueError(k)
        n = item["insurance_usd"]
        if n is not None and (isinstance(n, bool) or not isinstance(n, (int, float))
                              or not math.isfinite(n) or n < 0):
            raise ValueError("insurance_usd")
        d = item["arrival_date"]
        if d is not None:
            if not isinstance(d, str) or not re.fullmatch(r"[0-9]{4}-[0-9]{2}-[0-9]{2}", d):
                raise ValueError("arrival_date")
            try:
                date.fromisoformat(d)  # rejects 2026-02-30
            except ValueError:
                raise ValueError("arrival_date") from None
    if expected is not None and x != expected:
        raise ValueError("source_mismatch")
    return x


if __name__ == "__main__":
    try:
        expected = json.load(open(sys.argv[2])) if len(sys.argv) > 2 else None
        data = validate(open(sys.argv[1]).read(), expected)
        checked = "checked" if expected is not None else "NOT checked"
        print(f"PASS {len(data['items'])} items; source fixture {checked}")
    except json.JSONDecodeError:
        print("REJECT json", file=sys.stderr)
        sys.exit(1)
    except ValueError as e:
        print("REJECT", e, file=sys.stderr)
        sys.exit(1)

둘 중 하나로 응답과 참조를 함께 검사합니다.

Shell
node validate.mjs response.json expected.json
python validate.py response.json expected.json
# PASS 4 items; source fixture checked

response.json만 주면 구조만 검사하므로 숫자 타입이 맞는 잘못된 금액도 통과할 수 있습니다. 내용 오류는 참조 비교가 잡습니다. 첫 응답은 줄인 전시실 라벨 때문에 source_mismatch, 두 번째는 통과했습니다.

호출과 검증을 한 번에 연결하려면 빠른 시작 클라이언트를 재사용하세요.

Python
import json
from validate import validate

PROMPT = open("prompt.txt").read()        # the contract and records above, plus the gallery rule
expected = json.load(open("expected.json"))

resp = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": PROMPT}],
    max_tokens=1000,
)
data = validate(resp.choices[0].message.content, expected)  # raises on any mismatch

손상된 샘플 아홉 개를 모두 거부

참조 파일을 아홉 가지로 일부러 손상시켜 검증했고 모두 거부됐습니다. Python은 Node와 같은 오류 라벨을 쓰지만 Markdown 예제는 JSON.parse 오류 대신 json을 보고합니다. 아홉 번의 모델 실패가 아니라 검증기 테스트입니다.

  • 중복 ID: id
  • 항목에 추가 키: keys
  • 한 항목 삭제: source_mismatch
  • 12000을 문자열 “12000”으로 변경: insurance_usd
  • 미상 평가액 null을 0으로 변경: source_mismatch
  • 확인된 0을 null로 변경: source_mismatch
  • 도착일을 2026-02-30으로 변경: arrival_date
  • 12000을 12500으로 변경: source_mismatch
  • JSON을 Markdown 코드 펜스로 감싸기: 파싱 단계 거부

두 번의 모델 호출과 아홉 샘플은 이번 관측을 보여 줄 뿐 신뢰성 비율이 아닙니다. 검증 실패 시 가져오기를 멈추고 사람에게 보내세요.

실제 두 호출의 비용

사용량은 각각 입력402/출력195 tokens, 입력446/출력207 tokens였습니다.

호출tokens(입력/출력)Orux AIAnthropic 정가
첫 실행402 / 1950.26163 Credits($0.001308)$0.002754
명확화 후 재실행446 / 2070.28139 Credits($0.001407)$0.002962
합계848 / 4020.54302 Credits($0.002715)$0.005716

좌우로 밀어 전체 표를 확인하세요.

계산은 사용량×요율, (402×190+195×950)÷1,000,000=0.26163 Credits입니다. 출력 단가가 입력의 5배이므로 대개 프롬프트를 줄이기보다 출력 형식을 좁히는 방법부터 검토합니다. 두 호출 평균 0.27151 Credits라면 한 달에 비슷한 추출 10,000건은 약 2,715 Credits($13.58)입니다.

Haiku 5.5 또는 Opus 5.5를 선택할 때

요청당 입력2000·출력500 tokens라는 동일한 가정으로, 2026년 10월 29일 요율의 1000건 비용을 비교합니다.

모델Orux 100만(입력/출력)Orux 1000건Anthropic 정가 1000건먼저 고려할 작업
Claude Haiku 5.5(프롬프트≤100K)10.8 / 54 Credits48.6 Credits($0.243)$0.45대량 분류·라우팅·짧은 추출
Claude Sonnet 5.5190 / 950 Credits855 Credits($4.275)$9.00일반 추출·초안·디버깅
Claude Opus 5.5380 / 1,900 Credits1,710 Credits($8.55)$18.00오답 비용이 큰 어려운 추론

좌우로 밀어 전체 표를 확인하세요.

Haiku는 입력100,000 tokens 초과 시 100만당 56/280 Credits(공식 $0.50/$2.50)로 올라갑니다. 먼저 Haiku에서 위 검증기로 참조 샘플을 시험해 통과하는지 보세요. 통과한다면 이 가정 작업의 비용은 대략 1/17입니다. Claude Sonnet 5.5·GPT-6 Luna·Gemini 4 Argon 비교(영어)에서 다른 업체도 비교합니다.

FAQ

Claude Sonnet 5.5는 JSON 모드를 지원하나요?

Orux AI 자료에는 messages와 max_tokens가 있으며 이 테스트는 JSON 모드나 schema를 사용하지 않았습니다. 키·타입·null 규칙을 프롬프트로 정하고 코드로 검사해 파싱 가능한 JSON을 얻었습니다. 파싱은 검사의 시작이며 내용 정확성을 증명하지 않습니다.

OpenAI Python SDK로 Claude를 호출할 수 있나요?

네. https://orux.top/api/v1에 Orux AI 키와 model="claude-sonnet-5-5"를 지정하면 표준 Chat Completions의 나머지는 같습니다. Anthropic도 자체 호환 계층이 있으며 현재 문서는 테스트 용도와 제한을 설명합니다. 네이티브와 호환 인터페이스의 차이를 먼저 확인하세요.

Claude Sonnet 5.5 한 번의 비용은 얼마인가요?

Orux AI의 100만 입력190 Credits·출력950 Credits를 사용량에 곱합니다. 실제402입력/195출력 호출은 0.26163 Credits(약$0.0013), Anthropic 정가는 약$0.0028이었습니다. 채팅 건당 최소요금은 0.001 Credits입니다.

Orux AI는 Sonnet 5.5 프롬프트 캐시를 지원하나요?

모델 페이지에 100만 tokens당 읽기12 Credits, 5분 쓰기237.5, 1시간 쓰기380이 공개되어 있습니다. 시스템 프롬프트나 문서 등 길고 동일한 접두부를 캐시 유효기간 내 여러 번 재사용할 때 비용 절감을 검토할 수 있습니다.

요청이 실패하면 어떻게 되나요?

실패는 청구하지 않고 완료된 호출만 결제합니다. 402는 충전, 401은 키 확인, 429는 지터를 더한 지수 백오프로 처리하세요. 파싱되지만 검증기를 통과하지 못한 응답도 완료된 호출이라 청구되므로 출력 길이를 제한할 이유가 됩니다.

출처와 다음 단계

Claude Sonnet 5.5 페이지에서 저장된 “Museum inventory · validated extraction” 예제를 선택할 수 있습니다. 로드는 양식만 채우며 자동 실행하지 않습니다. 가격 확인일2026-10-29. 출처: Anthropic 가격, OpenAI SDK 호환성, Orux AI 가격.

Orux AI에서 Claude Sonnet 5.5 모델 페이지 사용해 보기모델 페이지에서 온라인으로 실행하고 가격과 API 예시를 확인하세요.모델 열기Orux AI에서 Claude Haiku 5.5 사용해 보기모델 페이지에서 온라인으로 실행하고 가격과 API 예시를 확인하세요.모델 열기Orux AI에서 Claude Opus 5.5 사용해 보기모델 페이지에서 온라인으로 실행하고 가격과 API 예시를 확인하세요.모델 열기

하나의 API로 이 모델들을 사용하세요

채팅·이미지·비디오·오디오 모델을 지원하는 OpenAI 호환 API이며 Credits로 과금됩니다.