Install
openclaw skills install upstage-builderBuild pipelines, agents, RAG flows, and full web services by combining Upstage Solar models, embeddings, and document APIs. Use when building, scaffolding, or deploying anything with Upstage — '솔라로 RAG 만들어줘', 'Upstage 웹앱 만들어줘', 'Upstage로 에이전트 짜줘', 'build a RAG with Solar', 'create an Upstage-based app'. Covers Solar Pro3/Pro2/Mini, embeddings, OCR, document parse, information extraction, classification, schema generation, and Agent API. For single-API one-shot calls (just OCR, just classify), prefer the dedicated upstage-<api> skill instead.
openclaw skills install upstage-builderYou are an expert at generating code that uses the Upstage API (api.upstage.ai). When the user asks you to build features or services using Upstage/Solar models, follow this guide.
For full webapp requests, do not stop at code generation. Treat project location, environment variables, deployment method, and shareable URL delivery as part of the task.
When the user asks for a full web service/app built with Upstage, follow this startup flow:
/data/.openclaw/workspace/projectsvercelpassword-protectedRead references/webapp-workflow.md for the full project/deployment workflow.
Upstage APIs are OpenAI SDK compatible. Just change base_url:
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["UPSTAGE_API_KEY"],
base_url="https://api.upstage.ai/v1"
)
response = client.chat.completions.create(
model="solar-pro3",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
API Key: Always use os.environ["UPSTAGE_API_KEY"]. Never hardcode keys. Users get their key from console.upstage.ai.
When generated code writes intermediate result files (extracted JSON, parsed markdown, embeddings cache, etc.):
<system-temp>/<input-stem>.<suffix>.<ext> (e.g., /tmp/receipt.ocr.json, /tmp/report.parsed.md). Use tempfile.gettempdir() for cross-platform code.This rule does NOT apply to webapp scaffolding (project root, .env, DEPLOY.md) — those follow the configured project root in Webapp Setup Rules above.
Per-API suffix convention (matches the dedicated specialty skills):
| API | Suffix | Common ext |
|---|---|---|
| OCR | .ocr | .json |
| Document Parse | .parsed | .md, .html |
| Document Classification | .classified | .json |
| Information Extraction | .extracted | .json |
| Schema Generation | .schema | .json |
| Agent (Studio) | .agent (or .<step-name> per step) | .json |
| Solar (delegated) | .solar (with timestamp prefix) | .md, .txt |
| Model | Description | Context | Best For |
|---|---|---|---|
solar-pro3 | Flagship (102B MoE, 12B active) | 128K | Complex reasoning, function calling, structured output |
solar-pro2 | Previous gen flagship (31B) | 65K | General tasks, good balance |
solar-mini | Lightweight, fast (10.7B) | 32K | Cost-sensitive, simple tasks |
syn-pro | Synthetic data optimized | - | Data generation (no function calling) |
| Model | Description | Dimensions |
|---|---|---|
embedding-query | For search queries/questions | 4096 |
embedding-passage | For documents/passages to search | 4096 |
| Model | Description |
|---|---|
ocr | Text extraction with word-level coordinates |
document-parse | Convert docs to HTML/Markdown with layout detection |
document-classify | Classify documents into user-defined categories |
information-extract | Extract structured data with custom JSON schema |
schema-generate | Auto-generate extraction schemas from sample docs |
receipt-extraction | Prebuilt: extract from receipts |
| Your Need | Use This Model |
|---|---|
| Complex reasoning, coding | solar-pro3 with reasoning_effort: "high" |
| Fast simple responses | solar-mini |
| Cost-sensitive production | solar-mini |
| Synthetic data generation | syn-pro |
| Function calling / tool use | solar-pro3 (parallel tool calls supported) |
| Structured JSON output | solar-pro3, solar-pro2, or solar-mini |
| Semantic search (queries) | embedding-query |
| Semantic search (documents) | embedding-passage |
| PDF/image → text | ocr |
| PDF/image → markdown/HTML | document-parse |
| Extract fields from docs | information-extract |
| Classify document types | document-classify |
Endpoint: POST /v1/chat/completions
references/chat-completions.mdEndpoint: POST /v1/embeddings
embedding-query for queries, embedding-passage for documentsreferences/embeddings.mdEndpoints: POST /v1/document-digitization, POST /v1/document-digitization/async
split=truereferences/document-processing.mdEndpoints: POST /v1/information-extraction, POST /v1/information-extraction/async
/v1/information-extraction)references/information-extraction.mdEndpoint: POST /v1/document-classification
split=true) for multi-doc PDFs/v1/document-classification)references/document-classification.mdBase URL: https://api.upstage.ai/v2 (v2, not v1)
references/agent-api.mdreferences/common-patterns.mdWhen generating Upstage API code, follow these rules:
os.environ["UPSTAGE_API_KEY"] — never hardcodehttps://api.upstage.ai/v1https://api.upstage.ai/v1/document-classificationhttps://api.upstage.ai/v1/information-extractionhttps://api.upstage.ai/v2solar-pro3), not version-specific namessolar-pro3 for complex tasks, solar-mini for simple/cost-sensitiverequests library directlyembedding-passage for indexing, embedding-query for searchopenai.RateLimitError with exponential backoffreasoning_effort param (not separate reasoning model)strict: true and additionalProperties: falseexamples/chat-example.pyexamples/rag-example.pyexamples/document-example.py <path/to/document.pdf>requirements.txt, then run python scripts/smoke_test.py to verify chat, embeddings, and optional design registry accesspython scripts/refresh_references.py to pull the latest API reference snapshots into references/python scripts/init_webapp_project.py <project-slug> to create a standard app folder with README.md, .env.example, and DEPLOY.mdWhen you need detailed API parameters, response formats, or advanced features, read the appropriate reference file. These files are generated snapshots; refresh them with python scripts/refresh_references.py when you want the latest upstream docs.
| File | Content |
|---|---|
references/chat-completions.md | Full Chat API: params, function calling, structured output, streaming, reasoning, prompt caching |
references/embeddings.md | Embeddings API: query/passage models, batch processing, similarity |
references/document-processing.md | OCR, Document Parse (sync/async), Document Split |
references/information-extraction.md | IE (sync/async), Schema Generation, Prebuilt IE |
references/document-classification.md | Classification API with confidence scores |
references/agent-api.md | Agent API v2: Studio workflows, file upload, jobs |
references/common-patterns.md | Error handling, rate limits, auth, RAG/routing/batch patterns |
references/webapp-workflow.md | Project-root, deployment-provider, and delivery workflow for full webapp tasks |
Original sources for reference files. Running python scripts/refresh_references.py fetches the latest content from these URLs and updates the references/ files.
| Source | URL | Auth | Updates |
|---|---|---|---|
| Upstage API Docs | https://console.upstage.ai/api/docs/for-agents/raw | None | references/chat-completions.md ~ common-patterns.md (7 files) |