← Back to Skills Marketplace
upstage-deployment

Upstage Information Extraction

by Upstage Deployment · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
32
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install upstage-information-extraction
Description
Extract specific named fields from documents using Upstage Information Extraction API with custom JSON schemas (sync/async) or prebuilt models for receipts,...
README (SKILL.md)

Upstage Information Extraction

Extract structured data from documents using custom JSON schemas. Also supports prebuilt models for receipts, invoices, and trade documents.

Quick Start

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["UPSTAGE_API_KEY"],
    base_url="https://api.upstage.ai/v1/information-extraction"
)

response = client.chat.completions.create(
    model="information-extract",
    messages=[{
        "role": "user",
        "content": [{"type": "image_url", "image_url": {"url": "https://example.com/invoice.pdf"}}]
    }],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "invoice_schema",
            "schema": {
                "type": "object",
                "properties": {
                    "invoice_number": {"type": "string", "description": "Invoice ID"},
                    "total_amount": {"type": "string", "description": "Total amount with currency"},
                    "date": {"type": "string", "description": "Invoice date in YYYY-MM-DD"}
                }
            }
        }
    }
)
print(response.choices[0].message.content)

API Key: Always use os.environ["UPSTAGE_API_KEY"]. Get your key at console.upstage.ai.


Endpoints

Mode Endpoint
Sync POST https://api.upstage.ai/v1/information-extraction
Async POST https://api.upstage.ai/v1/information-extraction/async
Status GET https://api.upstage.ai/v1/information-extraction/jobs/{job_id}
  • OpenAI SDK compatible: Set base_url to https://api.upstage.ai/v1/information-extraction

Parameters

Parameter Type Required Description
model string Yes information-extract or information-extract-nightly
messages array Yes Single user message with image_url
response_format object Yes Extraction schema (JSON Schema format)
mode string No standard (default) or enhanced
location boolean No Return coordinates (default: false)
confidence boolean No Return confidence scores (default: false)
split boolean No Split multi-document files (default: false)

Limits

Item Sync Async
Max pages 100 1,000
Max properties 100 5,000
Max schema chars 15,000 120,000

Schema Rules

  • Top-level properties: only string, integer, number, array allowed (no objects)
  • No nested arrays
  • Total character length of all property names must be under 10,000
  • For automatic schema generation, use upstage-schema-generation skill

Response Structure

{
  "choices": [
    {
      "message": {
        "content": "{\"invoice_number\": \"INV-001\", \"total_amount\": \"$1,234.56\", \"date\": \"2026-01-15\"}"
      }
    }
  ],
  "usage": {"prompt_tokens": 500, "completion_tokens": 50}
}

content is a JSON string. Parse with json.loads().


Prebuilt Models

Ready-to-use models that require no schema definition.

Model Document Type
receipt-extraction Receipts
air-waybill-extraction Air waybills
bill-of-lading-and-shipping-request-extraction Bills of lading / shipping requests
commercial-invoice-and-packing-list-extraction Commercial invoices / packing lists
kr-export-declaration-certificate-extraction Korean export declaration certificates

Prebuilt Usage Example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["UPSTAGE_API_KEY"],
    base_url="https://api.upstage.ai/v1/information-extraction"
)

response = client.chat.completions.create(
    model="receipt-extraction",
    messages=[{
        "role": "user",
        "content": [{"type": "image_url", "image_url": {"url": "https://example.com/receipt.jpg"}}]
    }]
)
print(response.choices[0].message.content)

Prebuilt models are called without response_format.


Async Processing (Large Documents)

import os
import time
import requests

api_key = os.environ["UPSTAGE_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}

# 1. Submit async job
response = requests.post(
    "https://api.upstage.ai/v1/information-extraction/async",
    headers=headers,
    json={
        "model": "information-extract",
        "messages": [{"role": "user", "content": [{"type": "image_url", "image_url": {"url": "FILE_URL"}}]}],
        "response_format": {"type": "json_schema", "json_schema": {"name": "schema", "schema": {...}}}
    }
)
job_id = response.json()["id"]

# 2. Poll for results
while True:
    status = requests.get(
        f"https://api.upstage.ai/v1/information-extraction/jobs/{job_id}",
        headers=headers
    ).json()
    if status["status"] == "completed":
        print(status["choices"][0]["message"]["content"])
        break
    time.sleep(5)

Output Files

  • Default: write extracted JSON to \x3Csystem-temp>/\x3Cinput-stem>.extracted.json (e.g., /tmp/invoice.extracted.json). Use tempfile.gettempdir() for cross-platform code.
  • Override: if the user specifies an output path, use it.
  • Always print the resolved absolute path in your response so the user can locate the file.

Tips

  • enhanced mode improves accuracy on complex tables/images but is slower.
  • Set confidence: true to get per-field confidence scores for quality filtering.
  • Schema design is critical for extraction quality. Use upstage-schema-generation skill for automatic generation.
  • split: true is useful when a single file contains multiple documents.
Usage Guidance
Before installing, confirm you are comfortable sending the relevant documents or document URLs to Upstage, store the UPSTAGE_API_KEY securely, and clean up any temporary extracted JSON files that contain sensitive data.
Capability Analysis
Type: OpenClaw Skill Name: upstage-information-extraction Version: 1.0.0 The skill bundle provides legitimate instructions and code examples for integrating the Upstage Information Extraction API. It uses standard libraries (OpenAI SDK, requests) to interact with official Upstage endpoints (api.upstage.ai) and follows standard practices for handling API keys via environment variables and storing temporary results in system-defined temporary directories. No indicators of malicious intent, data exfiltration, or harmful prompt injection were found in SKILL.md or _meta.json.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose, examples, and API endpoints are coherent for extracting structured fields from receipts, invoices, and trade documents.
Instruction Scope
The instructions are scoped to information extraction and include limits about when not to use the skill; no artifact-backed goal override or hidden autonomous behavior was shown.
Install Mechanism
There is no install spec or code, but the SKILL.md expects an UPSTAGE_API_KEY even though registry metadata declares no required env vars or primary credential.
Credentials
Using an external Upstage API is purpose-aligned, but users should expect document URLs/content and extracted fields to leave the local environment.
Persistence & Privilege
The skill describes writing extracted JSON to the system temp directory by default; this is useful but may leave sensitive extracted data on disk.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install upstage-information-extraction
  3. After installation, invoke the skill by name or use /upstage-information-extraction
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of Upstage Information Extraction skill. - Extracts structured named fields from documents via Upstage Information Extraction API using custom JSON schemas or prebuilt models. - Supports both synchronous and asynchronous processing for large documents. - Includes detailed usage instructions, sample Python code, and schema requirements. - Prebuilt models available for receipts, invoices, waybills, bills of lading, and export certificates. - Output is saved as a JSON file; absolute path is always reported. - Provides tips for model selection, confidence scoring, and multi-document splitting.
Metadata
Slug upstage-information-extraction
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Upstage Information Extraction?

Extract specific named fields from documents using Upstage Information Extraction API with custom JSON schemas (sync/async) or prebuilt models for receipts,... It is an AI Agent Skill for Claude Code / OpenClaw, with 32 downloads so far.

How do I install Upstage Information Extraction?

Run "/install upstage-information-extraction" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Upstage Information Extraction free?

Yes, Upstage Information Extraction is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Upstage Information Extraction support?

Upstage Information Extraction is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Upstage Information Extraction?

It is built and maintained by Upstage Deployment (@upstage-deployment); the current version is v1.0.0.

💬 Comments