← Back to Skills Marketplace
upstage-deployment

Upstage Schema Generation

by Upstage Deployment · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
29
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install upstage-schema-generation
Description
Generate a JSON schema for structured document information extraction. Use this skill whenever the user asks to generate or create a schema for a document —...
README (SKILL.md)

Upstage Schema Generation

Analyze sample documents and automatically generate a JSON schema for use with Information Extraction.

Prerequisites

  • API Key: UPSTAGE_API_KEY environment variable is required. Get your key at console.upstage.ai.

Two Modes

Mode When to use Latency
API mode Default. Fast schema generation via Upstage endpoint. Low
VLM mode (claude-opus-4-6) When the user wants careful, hand-tuned schemas with precise extraction rules and table-aware design. High

API Mode (Default)

Endpoint: POST https://api.upstage.ai/v1/information-extraction/schema-generation

import os
import json
import requests
import base64

api_key = os.environ["UPSTAGE_API_KEY"]

with open("document.pdf", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://api.upstage.ai/v1/information-extraction/schema-generation",
    headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
    json={
        "model": "information-extract",
        "messages": [
            {"role": "system", "content": "Generate schema for this invoice document."},
            {"role": "user", "content": [
                {"type": "image_url", "image_url": {"url": f"data:application/pdf;base64,{b64}"}}
            ]}
        ]
    }
)

schema = json.loads(response.json()["choices"][0]["message"]["content"])
print(json.dumps(schema, indent=2))

Note: The API model is information-extract (not schema-generate). The system message can guide the schema focus (e.g., "Generate schema about bank_name."). Up to 3 sample images can be provided in the user message.

VLM Mode

For carefully designed schemas with precise extraction rules, follow the 4-step VLM workflow.

  • Workflow: Read references/vlm-workflow.md (parameter gathering, document reading, property list, JSON schema conversion)
  • Design rules: Read references/schema-design.md (key naming, descriptions, table handling, blank/duplicate handling)

Output Files

  • Default: write generated schema to \x3Csystem-temp>/\x3Cinput-stem>.schema.json (e.g., /tmp/invoice.schema.json). For inline input with no source file, use \x3Csystem-temp>/\x3Ctimestamp>-schema.json.
  • 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.

Related Skills

  • Generated schema → use directly as response_format in upstage-information-extraction
  • If documents need pre-sorting → classify with upstage-document-classification first, then generate per-category schemas
  • For multi-API pipelines → see upstage-builder
Usage Guidance
This skill appears safe to install if you are comfortable using an Upstage API key and sharing the selected sample documents with the relevant AI/API providers. Provide only the specific files or a narrow folder needed for schema design, and avoid sending sensitive documents unless your policies allow it.
Capability Analysis
Type: OpenClaw Skill Name: upstage-schema-generation Version: 1.0.0 The skill bundle is a legitimate tool designed to generate JSON schemas for document information extraction using the Upstage API. The provided Python code in SKILL.md and the workflows in the reference files (vlm-workflow.md, schema-design.md) are consistent with the stated purpose, using standard API calls and environment variables for authentication. There is no evidence of malicious intent, data exfiltration to unauthorized endpoints, or prompt injection attacks.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The skill purpose is coherent: it generates JSON schemas from user-provided documents. The notable part is that doing so can require reading document files and using external provider processing.
Instruction Scope
The VLM workflow asks the user for input and waits before proceeding, but it also lets the agent decide how many files and pages to examine inside a provided path, so users should provide narrowly scoped folders.
Install Mechanism
There is no install script, package, binary, or code file; this is an instruction-only skill.
Credentials
SKILL.md requires an UPSTAGE_API_KEY and shows an Upstage API call, while registry requirements list no required env vars or primary credential. This appears purpose-aligned but should be noticed before use.
Persistence & Privilege
No background persistence or elevated privileges are described. The only persistent output is the generated schema file in a temp path or a user-specified path.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install upstage-schema-generation
  3. After installation, invoke the skill by name or use /upstage-schema-generation
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Upstage Schema Generation skill v1.0.0 - Introduces a skill to automatically generate JSON schemas for document information extraction, supporting both API and Vision-Language Model (VLM) workflows. - Triggers on user requests to generate or define extraction schemas for documents, including for provided files or folders. - API mode quickly generates schemas via Upstage endpoint; VLM mode supports detailed, hand-tuned schema creation. - Explains workflow, output file naming conventions, and integration with related skills for document extraction and classification. - Documentation includes code sample and key usage instructions for both modes.
Metadata
Slug upstage-schema-generation
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Upstage Schema Generation?

Generate a JSON schema for structured document information extraction. Use this skill whenever the user asks to generate or create a schema for a document —... It is an AI Agent Skill for Claude Code / OpenClaw, with 29 downloads so far.

How do I install Upstage Schema Generation?

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

Is Upstage Schema Generation free?

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

Which platforms does Upstage Schema Generation support?

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

Who created Upstage Schema Generation?

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

💬 Comments