AI & Content Workflows
AI workflows provide unified interfaces to text generation and embeddings with automatic provider fallback routing.
Text Generation
Section titled “Text Generation”Workflow: ai/generate
Unified text generation with automatic fallback: Fabric API, then Gemini, then OpenAI.
fabric run ai/generate \ --input prompt="Explain quantum computing in simple terms" \ --input model="gemini-2.5-flash"| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | string | required | Input prompt |
model | string | resolved | Model identifier |
provider | string | "auto" | Force provider: auto, gemini, openai, fabric |
system_prompt | string | "" | System instruction |
temperature | float | 0.7 | Sampling temperature |
max_tokens | int | model default | Max output tokens |
Output
Section titled “Output”{ "response": "Quantum computing uses quantum bits (qubits)...", "usage": {"input_tokens": 12, "output_tokens": 150}, "provider_used": "gemini", "model_used": "gemini-2.5-flash"}Embeddings
Section titled “Embeddings”Workflow: ai/embeddings
Generate vector embeddings for text. Used internally by problem intelligence clustering, hook clustering, and search.
fabric run ai/embeddings \ --input texts='["first document", "second document"]'| Parameter | Type | Default | Description |
|---|---|---|---|
texts | string or list[str] | required | Text(s) to embed |
embedding_model | string | "auto" | Model: auto, specific model ID |
Output
Section titled “Output”{ "embeddings": [[0.012, -0.034, ...], [0.045, 0.023, ...]], "model_used": "text-embedding-3-small"}Fallback chain: Fabric API, then OpenAI, then local sentence-transformers.
Content Generation
Section titled “Content Generation”Workflow: content/generate
Analyzes a topic, generates structured content, and evaluates quality.
fabric run content/generate \ --input topic="The future of remote work" \ --input content_type="blog post" \ --input audience="tech professionals"Pipeline
Section titled “Pipeline”analyze_topic → generate_content → evaluate_quality| Parameter | Type | Default | Description |
|---|---|---|---|
topic | string | required | Content topic |
audience | string | "" | Target audience |
content_type | string | "blog post" | Format: blog post, email, social, video script |
Output
Section titled “Output”{ "analysis": { "key_points": [...], "angles": [...] }, "generated_content": { "title": "...", "content": "Full article text...", "meta_description": "...", "tags": ["remote-work", "productivity"] }, "quality_evaluation": { "score": 8.5, "improvements": [...] }}YouTube Workflows
Section titled “YouTube Workflows”Title Generation
Section titled “Title Generation”Workflow: youtube/titles
Generates 10 viral title options with CTR estimation and style diversity.
fabric run youtube/titles \ --input topic="AI coding assistants" \ --input niche="tech"Thumbnail Generation
Section titled “Thumbnail Generation”Workflow: youtube/thumbnails
Platform-specific thumbnails with native text rendering.
fabric run youtube/thumbnails \ --input selected_title="Why AI Can't Replace Developers" \ --input platform="youtube"Aspect ratios: YouTube (16:9), TikTok/Shorts (9:16), Instagram (1:1, 4:5).
Description Generation
Section titled “Description Generation”Workflow: youtube/descriptions
Auto-generates YouTube descriptions with chapter timestamps, hashtags, and CTAs from the transcript.
fabric run youtube/descriptions \ --input selected_title="Why AI Can't Replace Developers" \ --input full_text="Transcribed text..."