Skip to main content
POST
/
v1
/
skills
/
create
!pip install vlmrun

from vlmrun.client import VLMRun

client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Create a skill from a prompt
skill = client.skills.create(
    prompt="Extract invoice_id, date, and total_amount from invoices.",
    json_schema={
        "type": "object",
        "properties": {
            "invoice_id": {"type": "string"},
            "invoice_date": {"type": "string", "format": "date"},
            "total_amount": {"type": "number"}
        },
        "required": ["invoice_id", "invoice_date", "total_amount"]
    }
)
print(f"Created skill: {skill.id} ({skill.name})")

# Create a skill from a pre-uploaded file
skill = client.skills.create(
    name="invoice-extraction",
    description="Extract structured data from invoices",
    file_id="<file-id>"  # Uploaded skill zip containing SKILL.md
)

# Create a skill from a chat session
skill = client.skills.create(
    session_id="<session-id>"
)
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "completed"
}
!pip install vlmrun

from vlmrun.client import VLMRun

client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Create a skill from a prompt
skill = client.skills.create(
    prompt="Extract invoice_id, date, and total_amount from invoices.",
    json_schema={
        "type": "object",
        "properties": {
            "invoice_id": {"type": "string"},
            "invoice_date": {"type": "string", "format": "date"},
            "total_amount": {"type": "number"}
        },
        "required": ["invoice_id", "invoice_date", "total_amount"]
    }
)
print(f"Created skill: {skill.id} ({skill.name})")

# Create a skill from a pre-uploaded file
skill = client.skills.create(
    name="invoice-extraction",
    description="Extract structured data from invoices",
    file_id="<file-id>"  # Uploaded skill zip containing SKILL.md
)

# Create a skill from a chat session
skill = client.skills.create(
    session_id="<session-id>"
)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to create a skill.

Three creation modes (provide exactly one): A. file_id: Create from a pre-built skill zip uploaded via POST /v1/files. B. prompt (+ optional json_schema): Auto-generate SKILL.md and schema.json. C. session_id: Retrieve chat history and auto-generate SKILL.md from messages.

For mode A (file_id), name and description are required. For modes B (prompt) and C (session_id), name and description are optional — if omitted, they are auto-generated by the LLM from the content.

name
string | null

Name of the skill (required for file_id, auto-generated for prompt/session_id)

Maximum string length: 255
description
string | null

Description of the skill (required for file_id, auto-generated for prompt/session_id)

file_id
string | null

File ID from file upload API (the uploaded skill zip)

prompt
string | null

Prompt text that becomes the SKILL.md body (auto-generates skill zip)

json_schema
Json Schema · object

JSON schema that becomes schema.json in the skill zip

session_id
string | null

Chat session ID to retrieve chat history as the prompt

is_public
boolean
default:false

Whether the skill is publicly accessible

Response

Successful Response

Response for skill creation.

id
string
required

ID of the created skill

name
string
required

Name of the skill (may differ from request if LLM-generated)

description
string
required

Description of the skill (may differ from request if LLM-generated)

created_at
string<date-time>
required

Date and time when the skill was created

updated_at
string<date-time>
required

Date and time when the skill was updated

status
string
default:completed

Status of the skill creation