🚀 The Loreto Skills Generator API is live! Learn how to get started →

Skills generation quick-start

The Loreto Skills Generator API turns any content source into production-ready Claude Code skill packages. Let's generate your first skill from a YouTube video.

Get your API key

Before making API calls, you'll need an API key. Sign up at loreto.io to get your free key, or view the API keys page if you already have an account.

Include your API key in the Authorization header for all requests:

Authorization: Bearer YOUR_API_KEY

Make your first call

Now let's generate skills from a YouTube video. We'll make a POST request to the generate endpoint.

https://api.loreto.io/api/v1/skills/generate

Here's a complete example using curl:

bash
curl -X POST https://api.loreto.io/api/v1/skills/generate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H " Center-Type: application/json" \ -d '{' "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "source_type": "auto", "test_language": "python", "include_visuals": true '}'

Here's what each parameter does:

Field Type Default Description
source string YouTube URL, article URL, or public file URL required
source_type enum "auto" auto, youtube, article, pdf, image
test_language enum "python" python, typescript, javascript
include_visuals bool true Include Mermaid diagrams in SKILL.md
context string null Optional 1–3 sentence hint (max 500 chars)

Understanding the response

The API returns a JSON response with three main sections:

skills[] — The generated skill packages

Each skill contains a complete package: SKILL.md, README.md, reference stubs, and a test script. Skills are ranked by specificity — rank 1 is the most concrete and code-executable.

json
{ "skills": [ { "skill_name": "designing-zero-downtime-database-cutovers", "rank": 1, "theme_summary": "Patterns for safely migrating production databases...", "files": { "SKILL.md": "---\nname: designing-zero-downtime...", "README.md": "# Designing Zero-Downtime...", "tests/test_designing_zero_downtime.py": "import pytest..." } } ] }

theme_plan — All detected themes

The API identifies up to 5 themes per source but scaffolds a maximum of 3 per call. Remaining themes are returned in queued with exact values for follow-up requests.

json
{ "theme_plan": { "total_detected": 5, "processed": [ {"rank": 1, "skill_name": "designing-zero-downtime-database-cutovers"}, {"rank": 2, "skill_name": "building-on-call-culture-for-platform-teams"} ], "queued": [ {"rank": 4, "skill_name": "structuring-postmortems-for-systemic-learning"} ], "follow_up_hint": "Pass themes_to_process to scaffold remaining themes." } }

source_analysis — Processing metadata

Includes source type detection, total themes found, abstraction level, and processing time.

json
{ "source_analysis": { "source_type": "youtube", "total_themes": 5, "abstraction_level": "medium", "processing_time_seconds": 58.3, "model": "claude-sonnet-4-6" } }

Follow-up calls

If the API detects more themes than it can process in a single call, use the themes_to_process parameter to scaffold the remaining ones:

bash
curl -X POST https://api.loreto.io/api/v1/skills/generate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H " Center-Type: application/json" \ -d '{' "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "themes_to_process": ["structuring-postmortems-for-systemic-learning"] '}'

Use the exact skill_name values from theme_plan.queued. Maximum 3 themes per follow-up call.

What next?

Check out the full API Reference to explore all endpoints. Don't forget to review Error codes and Rate limits for production usage.