Skip to content

AI & Content Workflows

AI workflows provide unified interfaces to text generation and embeddings with automatic provider fallback routing.

Workflow: ai/generate

Unified text generation with automatic fallback: Fabric API, then Gemini, then OpenAI.

Terminal window
fabric run ai/generate \
--input prompt="Explain quantum computing in simple terms" \
--input model="gemini-2.5-flash"
ParameterTypeDefaultDescription
promptstringrequiredInput prompt
modelstringresolvedModel identifier
providerstring"auto"Force provider: auto, gemini, openai, fabric
system_promptstring""System instruction
temperaturefloat0.7Sampling temperature
max_tokensintmodel defaultMax output tokens
{
"response": "Quantum computing uses quantum bits (qubits)...",
"usage": {"input_tokens": 12, "output_tokens": 150},
"provider_used": "gemini",
"model_used": "gemini-2.5-flash"
}

Workflow: ai/embeddings

Generate vector embeddings for text. Used internally by problem intelligence clustering, hook clustering, and search.

Terminal window
fabric run ai/embeddings \
--input texts='["first document", "second document"]'
ParameterTypeDefaultDescription
textsstring or list[str]requiredText(s) to embed
embedding_modelstring"auto"Model: auto, specific model ID
{
"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.


Workflow: content/generate

Analyzes a topic, generates structured content, and evaluates quality.

Terminal window
fabric run content/generate \
--input topic="The future of remote work" \
--input content_type="blog post" \
--input audience="tech professionals"
analyze_topic → generate_content → evaluate_quality
ParameterTypeDefaultDescription
topicstringrequiredContent topic
audiencestring""Target audience
content_typestring"blog post"Format: blog post, email, social, video script
{
"analysis": {
"key_points": [...],
"angles": [...]
},
"generated_content": {
"title": "...",
"content": "Full article text...",
"meta_description": "...",
"tags": ["remote-work", "productivity"]
},
"quality_evaluation": {
"score": 8.5,
"improvements": [...]
}
}

Workflow: youtube/titles

Generates 10 viral title options with CTR estimation and style diversity.

Terminal window
fabric run youtube/titles \
--input topic="AI coding assistants" \
--input niche="tech"

Workflow: youtube/thumbnails

Platform-specific thumbnails with native text rendering.

Terminal window
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).

Workflow: youtube/descriptions

Auto-generates YouTube descriptions with chapter timestamps, hashtags, and CTAs from the transcript.

Terminal window
fabric run youtube/descriptions \
--input selected_title="Why AI Can't Replace Developers" \
--input full_text="Transcribed text..."