ai.embed
Operation: ai.embed
Category: ai
Tags: embedding, vector
Generate vector embeddings from text using an AI provider
Runtime
Section titled “Runtime”Type: AI Provider (routed via provider registry)
Timeout: 300s
Retries: 3 (ExponentialWithJitter)
Inputs
Section titled “Inputs”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | String | Yes | — | Text to embed |
Outputs
Section titled “Outputs”| Name | Type | Description |
|---|---|---|
embedding | JSON | Embedding vector |
model | String | Model used for embedding |
import { WorkflowBuilder } from "@fabric-platform/sdk";
const workflow = new WorkflowBuilder("my-workflow") .node("ai-embed", "ai_invoke", (n) => n.config({ operation: "ai.embed", // ... node-specific config }) ) .build();from fabric_platform import FabricClient
fabric = FabricClient(api_key="fab_xxx")
wf_id = fabric.upsert_workflow("my-workflow", nodes=[ { "key": "ai-embed", "kind": "ai_invoke", },])use fabric_sdk::FabricClient;
let client = FabricClient::new("http://localhost:3001", api_key)?;
let wf_id = client.upsert_workflow("my-workflow", serde_json::json!({ "nodes": [{ "key": "ai-embed", "kind": "ai_invoke" }]})).await?;curl -X POST http://localhost:3001/v1/workflow-definitions \ -H "Authorization: Bearer $FABRIC_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "my-workflow", "nodes": [{ "key": "ai-embed", "kind": "ai_invoke" }] }'Example
Section titled “Example”{ "key": "embed-text", "operation": "ai.embed", "config": { "model": "text-embedding-3-large" }, "inputs": [{ "name": "text", "path": "$context.document_text" }], "outputs": [{ "name": "embedding", "path": "$context.vector" }]}Common Errors
Section titled “Common Errors”ai.embed requires input text
Section titled “ai.embed requires input text”Cause: The text input is empty or not bound
Fix: Bind the text input to an upstream node output that produces a non-empty string