---
title: "Stream skill generation with progress"
method: POST
path: "/api/v1/ai/generate/stream"
tags: ["AI"]
---

# Stream skill generation with progress

`POST /api/v1/ai/generate/stream`

## Request

- Base URL: `https://api.skills-hub.ai`
- URL: `https://api.skills-hub.ai/api/v1/ai/generate/stream`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Authenticated. Same as `POST /ai/generate` but streams progress events over Server-Sent Events. The daily per-user quota is enforced before SSE headers flush (surfacing as a clean `429`); only a run that reaches the `complete` stage counts against the quota.

## Response `200`

Successful response. The returned fields are described in this endpoint's summary/description; typed per-field response schemas are being added incrementally.

- object: Server-Sent Events stream (text/event-stream). Each `data:` frame is one JSON progress event; stages emit in order: fetching-examples, generating, refining, then complete (carrying the generated skill) or error (carrying a message).
  - `stage` 'fetching-examples' | 'generating' | 'refining' | 'complete' | 'error', required
  - `data` object: Present only on the 'complete' event — the generated skill.
    - `name` string
    - `description` string
    - `categorySlug` string
    - `platforms` string[]
    - `tags` string[]
    - `instructions` string
  - `message` string: Present only on the 'error' event.

---

[API](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api.md) · [All operations](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skills-hub/apis/skills-hub-ai-api/revisions/cb5d46d80300?raw)
