이 문서는 영어 원문을 자동 번역한 것으로, 내용이 원문과 다를 수 있습니다.영어 원문 보기
업스테이지에서는 어떤 모델을 제공하나요?
아래 표는 현재 API로 제공되는 모델 목록이에요. 업스테이지는 특정 모델 버전을 가리키는 안정적인 alias 를 제공하여, 한 번 연동하면 이후 업데이트의 혜택을 자동으로 받을 수 있도록 해요. 모델은 자주 업데이트될 수 있으므로 모델 이름을 하드코딩하기보다는 alias 사용을 권장해요.
| Alias | 현재 가리키는 모델 | RPS (자세히 알아보기) |
|---|---|---|
| document-parse | document-parse-260930 | 3 (Sync) / 6 (Async) |
| document-parse-nightly | - | 3 (Sync) / 6 (Async) |
| document-parse-experimental | - | 3 (Sync) / 6 (Async) |
동기 API
요청

invoice.png
# pip install requests
import requests
api_key = "UPSTAGE_API_KEY" # ex: up_xxxYYYzzzAAAbbbCCC
filename = "YOUR_FILE_NAME" # ex: ./image.png
url = "https://api.upstage.ai/v1/document-digitization"
headers = {"Authorization": f"Bearer {api_key}"}
files = {"document": open(filename, "rb")}
data = {"ocr": "force", "base64_encoding": "['table']", "model": "document-parse"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())응답
{
"api": "2.0",
"content": {
"html": "<h1 id='0' style='font-size:22px'>INVOICE</h1>\n<h1 id='1' style='font-size:20px'>Company<br>Upstage</h1>\n<br><h1 id='2' style='font-size:18px'>Invoice ID</h1>\n<br><h1 id='3' style='font-size:14px'>휴 INV-AJ355548</h1>\n<h1 id='4' style='font-size:18px'>Invoice Date</h1>\n<br><h1 id='5' style='font-size:18px'>9/7/1992</h1>\n<h1 id='6' style='font-size:16px'>Mamo<br>Lucy Park</h1>\n<h1 id='7' style='font-size:18px'>Address</h1>\n<br><h1 id='8' style='font-size:16px'>7 Pepper Wood Street, 130 Stone Comer<br>Terrace<br>Wilkes Barre, Pennsylvania, 18768<br>United States</h1>\n<h1 id='9' style='font-size:16px'>Email</h1>\n<br><h1 id='10' style='font-size:16px'>Ikitchenman0@arizona.edu</h1>\n<br><h1 id='11' style='font-size:20px'>Service Details Form</h1>\n<h1 id='12' style='font-size:16px'>Name<br>Sung Kim</h1>\n<h1 id='13' style='font-size:16px'>260 'ess<br>Gwangovolungang:co 338, Gyeongg do.<br>Sanghyeon-dong, Sui-gu<br>Yongin-si, South Korea</h1>\n<h1 id='14' style='font-size:18px'>Additional Request</h1>\n<br><p id='15' data-category='paragraph' style='font-size:14px'>Vivamus vestibulum sagittis sapien. Cum sociis natoque<br>penatibus 항목 magnis dfs parturient montes, nascetur ridiculus<br>mus.</p>\n<h1 id='16' style='font-size:14px'>TERMS AND CONDITIONS</h1>\n<p id='17' data-category='list' style='font-size:14px'>L TM Seir that not be lable 1층 the Buyer drectly indirectly for any loun or damage sufflered by 전액 Buyer<br>2. The 별 www. the product for ore 과 관한 from the date 설 shipment.<br>3. Any ourchase order received by ~ sele - be interpreted 추가 accepting the offer Ma the 18% offer writing The buyer may<br>purchase 15 The offer My the Terms and Conditions the Seller included The offer</p>",
"markdown": "",
"text": ""
},
"elements": [
{
"category": "heading1",
"content": {
"html": "<h1 id='0' style='font-size:22px'>INVOICE</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0648,
"y": 0.0517
},
{
"x": 0.2405,
"y": 0.0517
},
{
"x": 0.2405,
"y": 0.0953
},
{
"x": 0.0648,
"y": 0.0953
}
],
"id": 0,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='1' style='font-size:20px'>Company<br>Upstage</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0657,
"y": 0.2651
},
{
"x": 0.1606,
"y": 0.2651
},
{
"x": 0.1606,
"y": 0.3168
},
{
"x": 0.0657,
"y": 0.3168
}
],
"id": 1,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='2' style='font-size:18px'>Invoice ID</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5712,
"y": 0.0748
},
{
"x": 0.671,
"y": 0.0748
},
{
"x": 0.671,
"y": 0.101
},
{
"x": 0.5712,
"y": 0.101
}
],
"id": 2,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='3' style='font-size:14px'>휴 INV-AJ355548</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.788,
"y": 0.076
},
{
"x": 0.9287,
"y": 0.076
},
{
"x": 0.9287,
"y": 0.0972
},
{
"x": 0.788,
"y": 0.0972
}
],
"id": 3,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='4' style='font-size:18px'>Invoice Date</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.572,
"y": 0.1232
},
{
"x": 0.6941,
"y": 0.1232
},
{
"x": 0.6941,
"y": 0.1484
},
{
"x": 0.572,
"y": 0.1484
}
],
"id": 4,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='5' style='font-size:18px'>9/7/1992</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.8525,
"y": 0.1224
},
{
"x": 0.9293,
"y": 0.1224
},
{
"x": 0.9293,
"y": 0.1468
},
{
"x": 0.8525,
"y": 0.1468
}
],
"id": 5,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='6' style='font-size:16px'>Mamo<br>Lucy Park</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0658,
"y": 0.3331
},
{
"x": 0.15,
"y": 0.3331
},
{
"x": 0.15,
"y": 0.3846
},
{
"x": 0.0658,
"y": 0.3846
}
],
"id": 6,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='7' style='font-size:18px'>Address</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0662,
"y": 0.4061
},
{
"x": 0.1482,
"y": 0.4061
},
{
"x": 0.1482,
"y": 0.4286
},
{
"x": 0.0662,
"y": 0.4286
}
],
"id": 7,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='8' style='font-size:16px'>7 Pepper Wood Street, 130 Stone Comer<br>Terrace<br>Wilkes Barre, Pennsylvania, 18768<br>United States</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.067,
"y": 0.4332
},
{
"x": 0.3962,
"y": 0.4332
},
{
"x": 0.3962,
"y": 0.5173
},
{
"x": 0.067,
"y": 0.5173
}
],
"id": 8,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='9' style='font-size:16px'>Email</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0656,
"y": 0.5326
},
{
"x": 0.1235,
"y": 0.5326
},
{
"x": 0.1235,
"y": 0.5579
},
{
"x": 0.0656,
"y": 0.5579
}
],
"id": 9,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='10' style='font-size:16px'>Ikitchenman0@arizona.edu</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0654,
"y": 0.5614
},
{
"x": 0.2874,
"y": 0.5614
},
{
"x": 0.2874,
"y": 0.5834
},
{
"x": 0.0654,
"y": 0.5834
}
],
"id": 10,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='11' style='font-size:20px'>Service Details Form</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5727,
"y": 0.2112
},
{
"x": 0.8149,
"y": 0.2112
},
{
"x": 0.8149,
"y": 0.2417
},
{
"x": 0.5727,
"y": 0.2417
}
],
"id": 11,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='12' style='font-size:16px'>Name<br>Sung Kim</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.573,
"y": 0.2657
},
{
"x": 0.6563,
"y": 0.2657
},
{
"x": 0.6563,
"y": 0.3177
},
{
"x": 0.573,
"y": 0.3177
}
],
"id": 12,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='13' style='font-size:16px'>260 'ess<br>Gwangovolungang:co 338, Gyeongg do.<br>Sanghyeon-dong, Sui-gu<br>Yongin-si, South Korea</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5724,
"y": 0.3401
},
{
"x": 0.891,
"y": 0.3401
},
{
"x": 0.891,
"y": 0.4232
},
{
"x": 0.5724,
"y": 0.4232
}
],
"id": 13,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='14' style='font-size:18px'>Additional Request</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0648,
"y": 0.6681
},
{
"x": 0.2482,
"y": 0.6681
},
{
"x": 0.2482,
"y": 0.6962
},
{
"x": 0.0648,
"y": 0.6962
}
],
"id": 14,
"page": 1
},
{
"category": "paragraph",
"content": {
"html": "<br><p id='15' data-category='paragraph' style='font-size:14px'>Vivamus vestibulum sagittis sapien. Cum sociis natoque<br>penatibus 항목 magnis dfs parturient montes, nascetur ridiculus<br>mus.</p>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.4191,
"y": 0.6684
},
{
"x": 0.9132,
"y": 0.6684
},
{
"x": 0.9132,
"y": 0.7332
},
{
"x": 0.4191,
"y": 0.7332
}
],
"id": 15,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='16' style='font-size:14px'>TERMS AND CONDITIONS</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0649,
"y": 0.8303
},
{
"x": 0.2506,
"y": 0.8303
},
{
"x": 0.2506,
"y": 0.8523
},
{
"x": 0.0649,
"y": 0.8523
}
],
"id": 16,
"page": 1
},
{
"category": "list",
"content": {
"html": "<p id='17' data-category='list' style='font-size:14px'>L TM Seir that not be lable 1층 the Buyer drectly indirectly for any loun or damage sufflered by 전액 Buyer<br>2. The 별 www. the product for ore 과 관한 from the date 설 shipment.<br>3. Any ourchase order received by ~ sele - be interpreted 추가 accepting the offer Ma the 18% offer writing The buyer may<br>purchase 15 The offer My the Terms and Conditions the Seller included The offer</p>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0679,
"y": 0.8717
},
{
"x": 0.9261,
"y": 0.8717
},
{
"x": 0.9261,
"y": 0.9558
},
{
"x": 0.0679,
"y": 0.9558
}
],
"id": 17,
"page": 1
}
],
"model": "document-parse-260930",
"usage": {
"pages": 1,
"standard": [1],
"enhanced": []
}
}