diff --git a/.claude/commands/add-trigger.md b/.claude/commands/add-trigger.md index 9cbeca68a3e..e12eb393ba7 100644 --- a/.claude/commands/add-trigger.md +++ b/.claude/commands/add-trigger.md @@ -1,17 +1,17 @@ --- -description: Create webhook triggers for a Sim integration using the generic trigger builder +description: Create webhook or polling triggers for a Sim integration argument-hint: --- # Add Trigger -You are an expert at creating webhook triggers for Sim. You understand the trigger system, the generic `buildTriggerSubBlocks` helper, and how triggers connect to blocks. +You are an expert at creating webhook and polling triggers for Sim. You understand the trigger system, the generic `buildTriggerSubBlocks` helper, polling infrastructure, and how triggers connect to blocks. ## Your Task -1. Research what webhook events the service supports -2. Create the trigger files using the generic builder -3. Create a provider handler if custom auth, formatting, or subscriptions are needed +1. Research what webhook events the service supports — if the service lacks reliable webhooks, use polling +2. Create the trigger files using the generic builder (webhook) or manual config (polling) +3. Create a provider handler (webhook) or polling handler (polling) 4. Register triggers and connect them to the block ## Directory Structure @@ -146,23 +146,37 @@ export const TRIGGER_REGISTRY: TriggerRegistry = { ### Block file (`apps/sim/blocks/blocks/{service}.ts`) +Wire triggers into the block so the trigger UI appears and `generate-docs.ts` discovers them. Two changes are needed: + +1. **Spread trigger subBlocks** at the end of the block's `subBlocks` array +2. **Add `triggers` property** after `outputs` with `enabled: true` and `available: [...]` + ```typescript import { getTrigger } from '@/triggers' export const {Service}Block: BlockConfig = { // ... - triggers: { - enabled: true, - available: ['{service}_event_a', '{service}_event_b'], - }, subBlocks: [ // Regular tool subBlocks first... ...getTrigger('{service}_event_a').subBlocks, ...getTrigger('{service}_event_b').subBlocks, ], + // ... tools, inputs, outputs ... + triggers: { + enabled: true, + available: ['{service}_event_a', '{service}_event_b'], + }, } ``` +**Versioned blocks (V1 + V2):** Many integrations have a hidden V1 block and a visible V2 block. Where you add the trigger wiring depends on how V2 inherits from V1: + +- **V2 uses `...V1Block` spread** (e.g., Google Calendar): Add trigger to V1 — V2 inherits both `subBlocks` and `triggers` automatically. +- **V2 defines its own `subBlocks`** (e.g., Google Sheets): Add trigger to V2 (the visible block). V1 is hidden and doesn't need it. +- **Single block, no V2** (e.g., Google Drive): Add trigger directly. + +`generate-docs.ts` deduplicates by base type (first match wins). If V1 is processed first without triggers, the V2 triggers won't appear in `integrations.json`. Always verify by checking the output after running the script. + ## Provider Handler All provider-specific webhook logic lives in a single handler file: `apps/sim/lib/webhooks/providers/{service}.ts`. @@ -327,6 +341,122 @@ export function buildOutputs(): Record { } ``` +## Polling Triggers + +Use polling when the service lacks reliable webhooks (e.g., Google Sheets, Google Drive, Google Calendar, Gmail, RSS, IMAP). Polling triggers do NOT use `buildTriggerSubBlocks` — they define subBlocks manually. + +### Directory Structure + +``` +apps/sim/triggers/{service}/ +├── index.ts # Barrel export +└── poller.ts # TriggerConfig with polling: true + +apps/sim/lib/webhooks/polling/ +└── {service}.ts # PollingProviderHandler implementation +``` + +### Polling Handler (`apps/sim/lib/webhooks/polling/{service}.ts`) + +```typescript +import { pollingIdempotency } from '@/lib/core/idempotency/service' +import type { PollingProviderHandler, PollWebhookContext } from '@/lib/webhooks/polling/types' +import { markWebhookFailed, markWebhookSuccess, resolveOAuthCredential, updateWebhookProviderConfig } from '@/lib/webhooks/polling/utils' +import { processPolledWebhookEvent } from '@/lib/webhooks/processor' + +export const {service}PollingHandler: PollingProviderHandler = { + provider: '{service}', + label: '{Service}', + + async pollWebhook(ctx: PollWebhookContext): Promise<'success' | 'failure'> { + const { webhookData, workflowData, requestId, logger } = ctx + const webhookId = webhookData.id + + try { + // For OAuth services: + const accessToken = await resolveOAuthCredential(webhookData, '{service}', requestId, logger) + const config = webhookData.providerConfig as unknown as {Service}WebhookConfig + + // First poll: seed state, emit nothing + if (!config.lastCheckedTimestamp) { + await updateWebhookProviderConfig(webhookId, { lastCheckedTimestamp: new Date().toISOString() }, logger) + await markWebhookSuccess(webhookId, logger) + return 'success' + } + + // Fetch changes since last poll, process with idempotency + // ... + + await markWebhookSuccess(webhookId, logger) + return 'success' + } catch (error) { + logger.error(`[${requestId}] Error processing {service} webhook ${webhookId}:`, error) + await markWebhookFailed(webhookId, logger) + return 'failure' + } + }, +} +``` + +**Key patterns:** +- First poll seeds state and emits nothing (avoids flooding with existing data) +- Use `pollingIdempotency.executeWithIdempotency(provider, key, callback)` for dedup +- Use `processPolledWebhookEvent(webhookData, workflowData, payload, requestId)` to fire the workflow +- Use `updateWebhookProviderConfig(webhookId, partialConfig, logger)` for read-merge-write on state +- Use the latest server-side timestamp from API responses (not wall clock) to avoid clock skew + +### Trigger Config (`apps/sim/triggers/{service}/poller.ts`) + +```typescript +import { {Service}Icon } from '@/components/icons' +import type { TriggerConfig } from '@/triggers/types' + +export const {service}PollingTrigger: TriggerConfig = { + id: '{service}_poller', + name: '{Service} Trigger', + provider: '{service}', + description: 'Triggers when ...', + version: '1.0.0', + icon: {Service}Icon, + polling: true, // REQUIRED — routes to polling infrastructure + + subBlocks: [ + { id: 'triggerCredentials', type: 'oauth-input', title: 'Credentials', serviceId: '{service}', requiredScopes: [], required: true, mode: 'trigger', supportsCredentialSets: true }, + // ... service-specific config fields (dropdowns, inputs, switches) ... + { id: 'triggerSave', type: 'trigger-save', title: '', hideFromPreview: true, mode: 'trigger', triggerId: '{service}_poller' }, + { id: 'triggerInstructions', type: 'text', title: 'Setup Instructions', hideFromPreview: true, mode: 'trigger', defaultValue: '...' }, + ], + + outputs: { + // Must match the payload shape from processPolledWebhookEvent + }, +} +``` + +### Registration (3 places) + +1. **`apps/sim/triggers/constants.ts`** — add provider to `POLLING_PROVIDERS` Set +2. **`apps/sim/lib/webhooks/polling/registry.ts`** — import handler, add to `POLLING_HANDLERS` +3. **`apps/sim/triggers/registry.ts`** — import trigger config, add to `TRIGGER_REGISTRY` + +### Helm Cron Job + +Add to `helm/sim/values.yaml` under the existing polling cron jobs: + +```yaml +{service}WebhookPoll: + schedule: "*/1 * * * *" + concurrencyPolicy: Forbid + url: "http://sim:3000/api/webhooks/poll/{service}" +``` + +### Reference Implementations + +- Simple: `apps/sim/lib/webhooks/polling/rss.ts` + `apps/sim/triggers/rss/poller.ts` +- Complex (OAuth, attachments): `apps/sim/lib/webhooks/polling/gmail.ts` + `apps/sim/triggers/gmail/poller.ts` +- Cursor-based (changes API): `apps/sim/lib/webhooks/polling/google-drive.ts` +- Timestamp-based: `apps/sim/lib/webhooks/polling/google-calendar.ts` + ## Checklist ### Trigger Definition @@ -352,7 +482,18 @@ export function buildOutputs(): Record { - [ ] NO changes to `route.ts`, `provider-subscriptions.ts`, or `deploy.ts` - [ ] API key field uses `password: true` +### Polling Trigger (if applicable) +- [ ] Handler implements `PollingProviderHandler` at `lib/webhooks/polling/{service}.ts` +- [ ] Trigger config has `polling: true` and defines subBlocks manually (no `buildTriggerSubBlocks`) +- [ ] Provider string matches across: trigger config, handler, `POLLING_PROVIDERS`, polling registry +- [ ] `triggerSave` subBlock `triggerId` matches trigger config `id` +- [ ] First poll seeds state and emits nothing +- [ ] Added provider to `POLLING_PROVIDERS` in `triggers/constants.ts` +- [ ] Added handler to `POLLING_HANDLERS` in `lib/webhooks/polling/registry.ts` +- [ ] Added cron job to `helm/sim/values.yaml` +- [ ] Payload shape matches trigger `outputs` schema + ### Testing - [ ] `bun run type-check` passes -- [ ] Manually verify `formatInput` output keys match trigger `outputs` keys +- [ ] Manually verify output keys match trigger `outputs` keys - [ ] Trigger UI shows correctly in the block diff --git a/.cursor/commands/add-trigger.md b/.cursor/commands/add-trigger.md index 2d243827e3e..ae19f0f295b 100644 --- a/.cursor/commands/add-trigger.md +++ b/.cursor/commands/add-trigger.md @@ -1,12 +1,12 @@ # Add Trigger -You are an expert at creating webhook triggers for Sim. You understand the trigger system, the generic `buildTriggerSubBlocks` helper, and how triggers connect to blocks. +You are an expert at creating webhook and polling triggers for Sim. You understand the trigger system, the generic `buildTriggerSubBlocks` helper, polling infrastructure, and how triggers connect to blocks. ## Your Task -1. Research what webhook events the service supports -2. Create the trigger files using the generic builder -3. Create a provider handler if custom auth, formatting, or subscriptions are needed +1. Research what webhook events the service supports — if the service lacks reliable webhooks, use polling +2. Create the trigger files using the generic builder (webhook) or manual config (polling) +3. Create a provider handler (webhook) or polling handler (polling) 4. Register triggers and connect them to the block ## Directory Structure @@ -141,23 +141,37 @@ export const TRIGGER_REGISTRY: TriggerRegistry = { ### Block file (`apps/sim/blocks/blocks/{service}.ts`) +Wire triggers into the block so the trigger UI appears and `generate-docs.ts` discovers them. Two changes are needed: + +1. **Spread trigger subBlocks** at the end of the block's `subBlocks` array +2. **Add `triggers` property** after `outputs` with `enabled: true` and `available: [...]` + ```typescript import { getTrigger } from '@/triggers' export const {Service}Block: BlockConfig = { // ... - triggers: { - enabled: true, - available: ['{service}_event_a', '{service}_event_b'], - }, subBlocks: [ // Regular tool subBlocks first... ...getTrigger('{service}_event_a').subBlocks, ...getTrigger('{service}_event_b').subBlocks, ], + // ... tools, inputs, outputs ... + triggers: { + enabled: true, + available: ['{service}_event_a', '{service}_event_b'], + }, } ``` +**Versioned blocks (V1 + V2):** Many integrations have a hidden V1 block and a visible V2 block. Where you add the trigger wiring depends on how V2 inherits from V1: + +- **V2 uses `...V1Block` spread** (e.g., Google Calendar): Add trigger to V1 — V2 inherits both `subBlocks` and `triggers` automatically. +- **V2 defines its own `subBlocks`** (e.g., Google Sheets): Add trigger to V2 (the visible block). V1 is hidden and doesn't need it. +- **Single block, no V2** (e.g., Google Drive): Add trigger directly. + +`generate-docs.ts` deduplicates by base type (first match wins). If V1 is processed first without triggers, the V2 triggers won't appear in `integrations.json`. Always verify by checking the output after running the script. + ## Provider Handler All provider-specific webhook logic lives in a single handler file: `apps/sim/lib/webhooks/providers/{service}.ts`. @@ -322,6 +336,122 @@ export function buildOutputs(): Record { } ``` +## Polling Triggers + +Use polling when the service lacks reliable webhooks (e.g., Google Sheets, Google Drive, Google Calendar, Gmail, RSS, IMAP). Polling triggers do NOT use `buildTriggerSubBlocks` — they define subBlocks manually. + +### Directory Structure + +``` +apps/sim/triggers/{service}/ +├── index.ts # Barrel export +└── poller.ts # TriggerConfig with polling: true + +apps/sim/lib/webhooks/polling/ +└── {service}.ts # PollingProviderHandler implementation +``` + +### Polling Handler (`apps/sim/lib/webhooks/polling/{service}.ts`) + +```typescript +import { pollingIdempotency } from '@/lib/core/idempotency/service' +import type { PollingProviderHandler, PollWebhookContext } from '@/lib/webhooks/polling/types' +import { markWebhookFailed, markWebhookSuccess, resolveOAuthCredential, updateWebhookProviderConfig } from '@/lib/webhooks/polling/utils' +import { processPolledWebhookEvent } from '@/lib/webhooks/processor' + +export const {service}PollingHandler: PollingProviderHandler = { + provider: '{service}', + label: '{Service}', + + async pollWebhook(ctx: PollWebhookContext): Promise<'success' | 'failure'> { + const { webhookData, workflowData, requestId, logger } = ctx + const webhookId = webhookData.id + + try { + // For OAuth services: + const accessToken = await resolveOAuthCredential(webhookData, '{service}', requestId, logger) + const config = webhookData.providerConfig as unknown as {Service}WebhookConfig + + // First poll: seed state, emit nothing + if (!config.lastCheckedTimestamp) { + await updateWebhookProviderConfig(webhookId, { lastCheckedTimestamp: new Date().toISOString() }, logger) + await markWebhookSuccess(webhookId, logger) + return 'success' + } + + // Fetch changes since last poll, process with idempotency + // ... + + await markWebhookSuccess(webhookId, logger) + return 'success' + } catch (error) { + logger.error(`[${requestId}] Error processing {service} webhook ${webhookId}:`, error) + await markWebhookFailed(webhookId, logger) + return 'failure' + } + }, +} +``` + +**Key patterns:** +- First poll seeds state and emits nothing (avoids flooding with existing data) +- Use `pollingIdempotency.executeWithIdempotency(provider, key, callback)` for dedup +- Use `processPolledWebhookEvent(webhookData, workflowData, payload, requestId)` to fire the workflow +- Use `updateWebhookProviderConfig(webhookId, partialConfig, logger)` for read-merge-write on state +- Use the latest server-side timestamp from API responses (not wall clock) to avoid clock skew + +### Trigger Config (`apps/sim/triggers/{service}/poller.ts`) + +```typescript +import { {Service}Icon } from '@/components/icons' +import type { TriggerConfig } from '@/triggers/types' + +export const {service}PollingTrigger: TriggerConfig = { + id: '{service}_poller', + name: '{Service} Trigger', + provider: '{service}', + description: 'Triggers when ...', + version: '1.0.0', + icon: {Service}Icon, + polling: true, // REQUIRED — routes to polling infrastructure + + subBlocks: [ + { id: 'triggerCredentials', type: 'oauth-input', title: 'Credentials', serviceId: '{service}', requiredScopes: [], required: true, mode: 'trigger', supportsCredentialSets: true }, + // ... service-specific config fields (dropdowns, inputs, switches) ... + { id: 'triggerSave', type: 'trigger-save', title: '', hideFromPreview: true, mode: 'trigger', triggerId: '{service}_poller' }, + { id: 'triggerInstructions', type: 'text', title: 'Setup Instructions', hideFromPreview: true, mode: 'trigger', defaultValue: '...' }, + ], + + outputs: { + // Must match the payload shape from processPolledWebhookEvent + }, +} +``` + +### Registration (3 places) + +1. **`apps/sim/triggers/constants.ts`** — add provider to `POLLING_PROVIDERS` Set +2. **`apps/sim/lib/webhooks/polling/registry.ts`** — import handler, add to `POLLING_HANDLERS` +3. **`apps/sim/triggers/registry.ts`** — import trigger config, add to `TRIGGER_REGISTRY` + +### Helm Cron Job + +Add to `helm/sim/values.yaml` under the existing polling cron jobs: + +```yaml +{service}WebhookPoll: + schedule: "*/1 * * * *" + concurrencyPolicy: Forbid + url: "http://sim:3000/api/webhooks/poll/{service}" +``` + +### Reference Implementations + +- Simple: `apps/sim/lib/webhooks/polling/rss.ts` + `apps/sim/triggers/rss/poller.ts` +- Complex (OAuth, attachments): `apps/sim/lib/webhooks/polling/gmail.ts` + `apps/sim/triggers/gmail/poller.ts` +- Cursor-based (changes API): `apps/sim/lib/webhooks/polling/google-drive.ts` +- Timestamp-based: `apps/sim/lib/webhooks/polling/google-calendar.ts` + ## Checklist ### Trigger Definition @@ -347,7 +477,18 @@ export function buildOutputs(): Record { - [ ] NO changes to `route.ts`, `provider-subscriptions.ts`, or `deploy.ts` - [ ] API key field uses `password: true` +### Polling Trigger (if applicable) +- [ ] Handler implements `PollingProviderHandler` at `lib/webhooks/polling/{service}.ts` +- [ ] Trigger config has `polling: true` and defines subBlocks manually (no `buildTriggerSubBlocks`) +- [ ] Provider string matches across: trigger config, handler, `POLLING_PROVIDERS`, polling registry +- [ ] `triggerSave` subBlock `triggerId` matches trigger config `id` +- [ ] First poll seeds state and emits nothing +- [ ] Added provider to `POLLING_PROVIDERS` in `triggers/constants.ts` +- [ ] Added handler to `POLLING_HANDLERS` in `lib/webhooks/polling/registry.ts` +- [ ] Added cron job to `helm/sim/values.yaml` +- [ ] Payload shape matches trigger `outputs` schema + ### Testing - [ ] `bun run type-check` passes -- [ ] Manually verify `formatInput` output keys match trigger `outputs` keys +- [ ] Manually verify output keys match trigger `outputs` keys - [ ] Trigger UI shows correctly in the block diff --git a/apps/docs/content/docs/de/enterprise/index.mdx b/apps/docs/content/docs/de/enterprise/index.mdx index 77fe971354d..02ee74cdb34 100644 --- a/apps/docs/content/docs/de/enterprise/index.mdx +++ b/apps/docs/content/docs/de/enterprise/index.mdx @@ -21,7 +21,17 @@ Verwenden Sie Ihre eigenen API-Schlüssel für KI-Modellanbieter anstelle der ge | OpenAI | Knowledge Base-Embeddings, Agent-Block | | Anthropic | Agent-Block | | Google | Agent-Block | -| Mistral | Knowledge Base OCR | +| Mistral | Knowledge Base OCR, Agent-Block | +| Fireworks | Agent-Block | +| Firecrawl | Web-Scraping, Crawling, Suche und Extraktion | +| Exa | KI-gestützte Suche und Recherche | +| Serper | Google-Such-API | +| Linkup | Websuche und Inhaltsabruf | +| Parallel AI | Websuche, Extraktion und tiefgehende Recherche | +| Perplexity | KI-gestützter Chat und Websuche | +| Jina AI | Web-Lesen und Suche | +| Google Cloud | Translate, Maps, PageSpeed und Books APIs | +| Brandfetch | Marken-Assets, Logos, Farben und Unternehmensinformationen | ### Einrichtung diff --git a/apps/docs/content/docs/de/execution/costs.mdx b/apps/docs/content/docs/de/execution/costs.mdx index 4f2f4b642b3..5bdd5a23615 100644 --- a/apps/docs/content/docs/de/execution/costs.mdx +++ b/apps/docs/content/docs/de/execution/costs.mdx @@ -105,9 +105,108 @@ Die Modellaufschlüsselung zeigt: Die angezeigten Preise entsprechen den Tarifen vom 10. September 2025. Überprüfen Sie die Dokumentation der Anbieter für aktuelle Preise. +## Gehostete Tool-Preise + +Wenn Workflows Tool-Blöcke mit den gehosteten API-Schlüsseln von Sim verwenden, werden die Kosten pro Operation berechnet. Verwenden Sie Ihre eigenen Schlüssel über BYOK, um direkt an die Anbieter zu zahlen. + + + + **Firecrawl** - Web-Scraping, Crawling, Suche und Extraktion + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - KI-gestützte Suche und Recherche + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - Google-Such-API + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - KI-gestützter Chat und Websuche + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - Websuche und Inhaltsabruf + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - Websuche, Extraktion und tiefgehende Recherche + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - Web-Lesen und Suche + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - Translate, Maps, PageSpeed und Books APIs + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - Marken-Assets, Logos, Farben und Unternehmensinformationen + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## Bring Your Own Key (BYOK) -Sie können Ihre eigenen API-Schlüssel für gehostete Modelle (OpenAI, Anthropic, Google, Mistral) unter **Einstellungen → BYOK** verwenden, um Basispreise zu zahlen. Schlüssel werden verschlüsselt und gelten arbeitsbereichsweit. +Sie können Ihre eigenen API-Schlüssel für unterstützte Anbieter (OpenAI, Anthropic, Google, Mistral, Fireworks, Firecrawl, Exa, Serper, Linkup, Parallel AI, Perplexity, Jina AI, Google Cloud, Brandfetch) unter **Einstellungen → BYOK** verwenden, um Basispreise zu zahlen. Schlüssel werden verschlüsselt und gelten arbeitsbereichsweit. ## Strategien zur Kostenoptimierung diff --git a/apps/docs/content/docs/en/execution/costs.mdx b/apps/docs/content/docs/en/execution/costs.mdx index 24519e08832..a069c541415 100644 --- a/apps/docs/content/docs/en/execution/costs.mdx +++ b/apps/docs/content/docs/en/execution/costs.mdx @@ -110,9 +110,108 @@ The model breakdown shows: Pricing shown reflects rates as of September 10, 2025. Check provider documentation for current pricing. +## Hosted Tool Pricing + +When workflows use tool blocks with Sim's hosted API keys, costs are charged per operation. Use your own keys via BYOK to pay providers directly instead. + + + + **Firecrawl** - Web scraping, crawling, search, and extraction + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - AI-powered search and research + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - Google search API + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - AI-powered chat and web search + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - Web search and content retrieval + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - Web search, extraction, and deep research + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - Web reading and search + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - Translate, Maps, PageSpeed, and Books APIs + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - Brand assets, logos, colors, and company info + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## Bring Your Own Key (BYOK) -Use your own API keys for AI model providers instead of Sim's hosted keys to pay base prices with no markup. +Use your own API keys for supported providers instead of Sim's hosted keys to pay base prices with no markup. ### Supported Providers @@ -121,7 +220,17 @@ Use your own API keys for AI model providers instead of Sim's hosted keys to pay | OpenAI | Knowledge Base embeddings, Agent block | | Anthropic | Agent block | | Google | Agent block | -| Mistral | Knowledge Base OCR | +| Mistral | Knowledge Base OCR, Agent block | +| Fireworks | Agent block | +| Firecrawl | Web scraping, crawling, search, and extraction | +| Exa | AI-powered search and research | +| Serper | Google search API | +| Linkup | Web search and content retrieval | +| Parallel AI | Web search, extraction, and deep research | +| Perplexity | AI-powered chat and web search | +| Jina AI | Web reading and search | +| Google Cloud | Translate, Maps, PageSpeed, and Books APIs | +| Brandfetch | Brand assets, logos, colors, and company info | ### Setup @@ -152,20 +261,20 @@ Each voice session is billed when it starts. In deployed chat voice mode, each c ## Plans -Sim has two paid plan tiers — **Pro** and **Max**. Either can be used individually or with a team. Team plans pool credits across all seats in the organization. +Sim has two paid plan tiers - **Pro** and **Max**. Either can be used individually or with a team. Team plans pool credits across all seats in the organization. | Plan | Price | Credits Included | Daily Refresh | |------|-------|------------------|---------------| -| **Community** | $0 | 1,000 (one-time) | — | +| **Community** | $0 | 1,000 (one-time) | - | | **Pro** | $25/mo | 6,000/mo | +50/day | | **Max** | $100/mo | 25,000/mo | +200/day | -| **Enterprise** | Custom | Custom | — | +| **Enterprise** | Custom | Custom | - | To use Pro or Max with a team, select **Get For Team** in subscription settings and choose the tier and number of seats. Credits are pooled across the organization at the per-seat rate (e.g. Max for Teams with 3 seats = 75,000 credits/mo pooled). ### Daily Refresh Credits -Paid plans include a small daily credit allowance that does not count toward your plan limit. Each day, usage up to the daily refresh amount is excluded from billable usage. This allowance resets every 24 hours and does not carry over — use it or lose it. +Paid plans include a small daily credit allowance that does not count toward your plan limit. Each day, usage up to the daily refresh amount is excluded from billable usage. This allowance resets every 24 hours and does not carry over - use it or lose it. | Plan | Daily Refresh | |------|---------------| @@ -252,7 +361,7 @@ Sim uses a **base subscription + overage** billing model: ### How It Works -**Pro Plan ($25/month — 6,000 credits):** +**Pro Plan ($25/month - 6,000 credits):** - Monthly subscription includes 6,000 credits of usage - Usage under 6,000 credits → No additional charges - Usage over 6,000 credits (with on-demand enabled) → Pay the overage at month end diff --git a/apps/docs/content/docs/es/enterprise/index.mdx b/apps/docs/content/docs/es/enterprise/index.mdx index b4a88f1d390..3d28ab4ee92 100644 --- a/apps/docs/content/docs/es/enterprise/index.mdx +++ b/apps/docs/content/docs/es/enterprise/index.mdx @@ -21,7 +21,17 @@ Usa tus propias claves API para proveedores de modelos de IA en lugar de las cla | OpenAI | Embeddings de base de conocimiento, bloque Agent | | Anthropic | Bloque Agent | | Google | Bloque Agent | -| Mistral | OCR de base de conocimiento | +| Mistral | OCR de base de conocimiento, bloque Agent | +| Fireworks | Bloque Agent | +| Firecrawl | Web scraping, crawling, búsqueda y extracción | +| Exa | Búsqueda e investigación impulsada por IA | +| Serper | API de búsqueda de Google | +| Linkup | Búsqueda web y recuperación de contenido | +| Parallel AI | Búsqueda web, extracción e investigación profunda | +| Perplexity | Chat y búsqueda web impulsada por IA | +| Jina AI | Lectura y búsqueda web | +| Google Cloud | APIs de Translate, Maps, PageSpeed y Books | +| Brandfetch | Activos de marca, logos, colores e información de empresas | ### Configuración diff --git a/apps/docs/content/docs/es/execution/costs.mdx b/apps/docs/content/docs/es/execution/costs.mdx index 53b242f51c9..efdc188fd93 100644 --- a/apps/docs/content/docs/es/execution/costs.mdx +++ b/apps/docs/content/docs/es/execution/costs.mdx @@ -105,9 +105,108 @@ El desglose del modelo muestra: Los precios mostrados reflejan las tarifas a partir del 10 de septiembre de 2025. Consulta la documentación del proveedor para conocer los precios actuales. +## Precios de herramientas alojadas + +Cuando los flujos de trabajo usan bloques de herramientas con las claves API alojadas de Sim, los costos se cobran por operación. Usa tus propias claves a través de BYOK para pagar directamente a los proveedores. + + + + **Firecrawl** - Web scraping, crawling, búsqueda y extracción + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - Búsqueda e investigación impulsada por IA + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - API de búsqueda de Google + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - Chat y búsqueda web impulsada por IA + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - Búsqueda web y recuperación de contenido + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - Búsqueda web, extracción e investigación profunda + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - Lectura y búsqueda web + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - APIs de Translate, Maps, PageSpeed y Books + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - Activos de marca, logos, colores e información de empresas + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## Trae tu propia clave (BYOK) -Puedes usar tus propias claves API para modelos alojados (OpenAI, Anthropic, Google, Mistral) en **Configuración → BYOK** para pagar precios base. Las claves están encriptadas y se aplican a todo el espacio de trabajo. +Puedes usar tus propias claves API para proveedores compatibles (OpenAI, Anthropic, Google, Mistral, Fireworks, Firecrawl, Exa, Serper, Linkup, Parallel AI, Perplexity, Jina AI, Google Cloud, Brandfetch) en **Configuración → BYOK** para pagar precios base. Las claves están encriptadas y se aplican a todo el espacio de trabajo. ## Estrategias de optimización de costos diff --git a/apps/docs/content/docs/fr/enterprise/index.mdx b/apps/docs/content/docs/fr/enterprise/index.mdx index 55f010ce076..4af1489fda0 100644 --- a/apps/docs/content/docs/fr/enterprise/index.mdx +++ b/apps/docs/content/docs/fr/enterprise/index.mdx @@ -21,7 +21,17 @@ Utilisez vos propres clés API pour les fournisseurs de modèles IA au lieu des | OpenAI | Embeddings de base de connaissances, bloc Agent | | Anthropic | Bloc Agent | | Google | Bloc Agent | -| Mistral | OCR de base de connaissances | +| Mistral | OCR de base de connaissances, bloc Agent | +| Fireworks | Bloc Agent | +| Firecrawl | Web scraping, crawling, recherche et extraction | +| Exa | Recherche et investigation alimentées par l'IA | +| Serper | API de recherche Google | +| Linkup | Recherche web et récupération de contenu | +| Parallel AI | Recherche web, extraction et recherche approfondie | +| Perplexity | Chat et recherche web alimentés par l'IA | +| Jina AI | Lecture et recherche web | +| Google Cloud | APIs Translate, Maps, PageSpeed et Books | +| Brandfetch | Ressources de marque, logos, couleurs et informations d'entreprise | ### Configuration diff --git a/apps/docs/content/docs/fr/execution/costs.mdx b/apps/docs/content/docs/fr/execution/costs.mdx index f1235c6b112..dd43d873f76 100644 --- a/apps/docs/content/docs/fr/execution/costs.mdx +++ b/apps/docs/content/docs/fr/execution/costs.mdx @@ -105,9 +105,108 @@ La répartition des modèles montre : Les prix indiqués reflètent les tarifs en date du 10 septembre 2025. Consultez la documentation des fournisseurs pour les tarifs actuels. +## Tarification des outils hébergés + +Lorsque les workflows utilisent des blocs d'outils avec les clés API hébergées par Sim, les coûts sont facturés par opération. Utilisez vos propres clés via BYOK pour payer directement les fournisseurs. + + + + **Firecrawl** - Web scraping, crawling, recherche et extraction + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - Recherche et investigation alimentées par l'IA + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - API de recherche Google + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - Chat et recherche web alimentés par l'IA + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - Recherche web et récupération de contenu + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - Recherche web, extraction et recherche approfondie + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - Lecture et recherche web + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - APIs Translate, Maps, PageSpeed et Books + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - Ressources de marque, logos, couleurs et informations d'entreprise + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## Apportez votre propre clé (BYOK) -Vous pouvez utiliser vos propres clés API pour les modèles hébergés (OpenAI, Anthropic, Google, Mistral) dans **Paramètres → BYOK** pour payer les prix de base. Les clés sont chiffrées et s'appliquent à l'ensemble de l'espace de travail. +Vous pouvez utiliser vos propres clés API pour les fournisseurs pris en charge (OpenAI, Anthropic, Google, Mistral, Fireworks, Firecrawl, Exa, Serper, Linkup, Parallel AI, Perplexity, Jina AI, Google Cloud, Brandfetch) dans **Paramètres → BYOK** pour payer les prix de base. Les clés sont chiffrées et s'appliquent à l'ensemble de l'espace de travail. ## Stratégies d'optimisation des coûts diff --git a/apps/docs/content/docs/ja/enterprise/index.mdx b/apps/docs/content/docs/ja/enterprise/index.mdx index e2e4adfd988..b769395011d 100644 --- a/apps/docs/content/docs/ja/enterprise/index.mdx +++ b/apps/docs/content/docs/ja/enterprise/index.mdx @@ -20,7 +20,17 @@ Simのホストキーの代わりに、AIモデルプロバイダー用の独自 | OpenAI | ナレッジベースの埋め込み、エージェントブロック | | Anthropic | エージェントブロック | | Google | エージェントブロック | -| Mistral | ナレッジベースOCR | +| Mistral | ナレッジベースOCR、エージェントブロック | +| Fireworks | エージェントブロック | +| Firecrawl | Webスクレイピング、クローリング、検索、抽出 | +| Exa | AI搭載の検索とリサーチ | +| Serper | Google検索API | +| Linkup | Web検索とコンテンツ取得 | +| Parallel AI | Web検索、抽出、ディープリサーチ | +| Perplexity | AI搭載のチャットとWeb検索 | +| Jina AI | Web閲覧と検索 | +| Google Cloud | Translate、Maps、PageSpeed、Books API | +| Brandfetch | ブランドアセット、ロゴ、カラー、企業情報 | ### セットアップ diff --git a/apps/docs/content/docs/ja/execution/costs.mdx b/apps/docs/content/docs/ja/execution/costs.mdx index 65c9dce60f2..c5cf8b1c801 100644 --- a/apps/docs/content/docs/ja/execution/costs.mdx +++ b/apps/docs/content/docs/ja/execution/costs.mdx @@ -105,9 +105,108 @@ AIブロックを使用するワークフローでは、ログで詳細なコス 表示価格は2025年9月10日時点のレートを反映しています。最新の価格については各プロバイダーのドキュメントをご確認ください。 +## ホスティングツールの料金 + +ワークフローがSimのホスティングAPIキーを使用するツールブロックを利用する場合、操作ごとに料金が発生します。BYOKで独自のキーを使用すると、プロバイダーに直接支払うことができます。 + + + + **Firecrawl** - Webスクレイピング、クローリング、検索、抽出 + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - AI搭載の検索とリサーチ + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - Google検索API + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - AI搭載のチャットとWeb検索 + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - Web検索とコンテンツ取得 + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - Web検索、抽出、ディープリサーチ + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - Web閲覧と検索 + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - Translate、Maps、PageSpeed、Books API + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - ブランドアセット、ロゴ、カラー、企業情報 + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## Bring Your Own Key (BYOK) -ホストされたモデル(OpenAI、Anthropic、Google、Mistral)に対して、**設定 → BYOK**で独自のAPIキーを使用し、基本価格で支払うことができます。キーは暗号化され、ワークスペース全体に適用されます。 +対応プロバイダー(OpenAI、Anthropic、Google、Mistral、Fireworks、Firecrawl、Exa、Serper、Linkup、Parallel AI、Perplexity、Jina AI、Google Cloud、Brandfetch)に対して、**設定 → BYOK**で独自のAPIキーを使用し、基本価格で支払うことができます。キーは暗号化され、ワークスペース全体に適用されます。 ## コスト最適化戦略 diff --git a/apps/docs/content/docs/zh/enterprise/index.mdx b/apps/docs/content/docs/zh/enterprise/index.mdx index 39be4309ea2..25c7d8da7ed 100644 --- a/apps/docs/content/docs/zh/enterprise/index.mdx +++ b/apps/docs/content/docs/zh/enterprise/index.mdx @@ -20,7 +20,17 @@ Sim 企业版为需要更高安全性、合规性和管理能力的组织提供 | OpenAI | 知识库嵌入、Agent 模块 | | Anthropic | Agent 模块 | | Google | Agent 模块 | -| Mistral | 知识库 OCR | +| Mistral | 知识库 OCR、Agent 模块 | +| Fireworks | Agent 模块 | +| Firecrawl | 网页抓取、爬取、搜索和提取 | +| Exa | AI 驱动的搜索和研究 | +| Serper | Google 搜索 API | +| Linkup | 网络搜索和内容检索 | +| Parallel AI | 网络搜索、提取和深度研究 | +| Perplexity | AI 驱动的聊天和网络搜索 | +| Jina AI | 网页阅读和搜索 | +| Google Cloud | Translate、Maps、PageSpeed 和 Books API | +| Brandfetch | 品牌资产、标志、颜色和公司信息 | ### 配置方法 diff --git a/apps/docs/content/docs/zh/execution/costs.mdx b/apps/docs/content/docs/zh/execution/costs.mdx index c83757d0069..6a0a220a936 100644 --- a/apps/docs/content/docs/zh/execution/costs.mdx +++ b/apps/docs/content/docs/zh/execution/costs.mdx @@ -105,9 +105,108 @@ totalCost = baseExecutionCharge + modelCost 显示的价格为截至 2025 年 9 月 10 日的费率。请查看提供商文档以获取最新价格。 +## 托管工具定价 + +当工作流使用 Sim 托管 API 密钥的工具模块时,费用按操作收取。通过 BYOK 使用你自己的密钥可直接向服务商付费。 + + + + **Firecrawl** - 网页抓取、爬取、搜索和提取 + + | Operation | Cost | + |-----------|------| + | Scrape | $0.001 per credit used | + | Crawl | $0.001 per credit used | + | Search | $0.001 per credit used | + | Extract | $0.001 per credit used | + | Map | $0.001 per credit used | + + + + **Exa** - AI 驱动的搜索和研究 + + | Operation | Cost | + |-----------|------| + | Search | Dynamic (returned by API) | + | Get Contents | Dynamic (returned by API) | + | Find Similar Links | Dynamic (returned by API) | + | Answer | Dynamic (returned by API) | + + + + **Serper** - Google 搜索 API + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.001 | + | Search (>10 results) | $0.002 | + + + + **Perplexity** - AI 驱动的聊天和网络搜索 + + | Operation | Cost | + |-----------|------| + | Search | $0.005 per request | + | Chat | Token-based (varies by model) | + + + + **Linkup** - 网络搜索和内容检索 + + | Operation | Cost | + |-----------|------| + | Standard search | ~$0.006 | + | Deep search | ~$0.055 | + + + + **Parallel AI** - 网络搜索、提取和深度研究 + + | Operation | Cost | + |-----------|------| + | Search (≤10 results) | $0.005 | + | Search (>10 results) | $0.005 + $0.001 per additional result | + | Extract | $0.001 per URL | + | Deep Research | $0.005–$2.40 (varies by processor tier) | + + + + **Jina AI** - 网页阅读和搜索 + + | Operation | Cost | + |-----------|------| + | Read URL | $0.20 per 1M tokens | + | Search | $0.20 per 1M tokens (minimum 10K tokens) | + + + + **Google Cloud** - Translate、Maps、PageSpeed 和 Books API + + | Operation | Cost | + |-----------|------| + | Translate / Detect | $0.00002 per character | + | Maps (Geocode, Directions, Distance Matrix, Elevation, Timezone, Reverse Geocode, Geolocate, Validate Address) | $0.005 per request | + | Maps (Snap to Roads) | $0.01 per request | + | Maps (Place Details) | $0.017 per request | + | Maps (Places Search) | $0.032 per request | + | PageSpeed | Free | + | Books (Search, Details) | Free | + + + + **Brandfetch** - 品牌资产、标志、颜色和公司信息 + + | Operation | Cost | + |-----------|------| + | Search | Free | + | Get Brand | $0.04 per request | + + + ## 自带密钥(BYOK) -你可以在 **设置 → BYOK** 中为托管模型(OpenAI、Anthropic、Google、Mistral)使用你自己的 API 密钥,以按基础价格计费。密钥会被加密,并在整个工作区范围内生效。 +你可以在 **设置 → BYOK** 中为支持的服务商(OpenAI、Anthropic、Google、Mistral、Fireworks、Firecrawl、Exa、Serper、Linkup、Parallel AI、Perplexity、Jina AI、Google Cloud、Brandfetch)使用你自己的 API 密钥,以按基础价格计费。密钥会被加密,并在整个工作区范围内生效。 ## 成本优化策略 diff --git a/apps/sim/app/(landing)/blog/[slug]/page.tsx b/apps/sim/app/(landing)/blog/[slug]/page.tsx index 18572123ef8..2333ddb67a8 100644 --- a/apps/sim/app/(landing)/blog/[slug]/page.tsx +++ b/apps/sim/app/(landing)/blog/[slug]/page.tsx @@ -161,7 +161,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string

{p.title}

-

+

{p.description}

diff --git a/apps/sim/app/(landing)/blog/page.tsx b/apps/sim/app/(landing)/blog/page.tsx index 591dbebd370..9bae1dd8aea 100644 --- a/apps/sim/app/(landing)/blog/page.tsx +++ b/apps/sim/app/(landing)/blog/page.tsx @@ -110,7 +110,7 @@ export default async function BlogIndex({

Latest from Sim

-

+

Announcements, insights, and guides for building AI agent workflows.

@@ -152,7 +152,7 @@ export default async function BlogIndex({

{p.title}

-

+

{p.description}

@@ -191,7 +191,7 @@ export default async function BlogIndex({

{p.title}

-

+

{p.description}

diff --git a/apps/sim/app/(landing)/components/footer/footer.tsx b/apps/sim/app/(landing)/components/footer/footer.tsx index 4cc34914e88..6cd9c3f7f3e 100644 --- a/apps/sim/app/(landing)/components/footer/footer.tsx +++ b/apps/sim/app/(landing)/components/footer/footer.tsx @@ -63,10 +63,8 @@ const INTEGRATION_LINKS: FooterItem[] = [ { label: 'Linear', href: 'https://docs.sim.ai/tools/linear', external: true }, { label: 'Airtable', href: 'https://docs.sim.ai/tools/airtable', external: true }, { label: 'Firecrawl', href: 'https://docs.sim.ai/tools/firecrawl', external: true }, - { label: 'Pinecone', href: 'https://docs.sim.ai/tools/pinecone', external: true }, { label: 'Discord', href: 'https://docs.sim.ai/tools/discord', external: true }, { label: 'Microsoft Teams', href: 'https://docs.sim.ai/tools/microsoft_teams', external: true }, - { label: 'Outlook', href: 'https://docs.sim.ai/tools/outlook', external: true }, { label: 'Telegram', href: 'https://docs.sim.ai/tools/telegram', external: true }, ] diff --git a/apps/sim/app/(landing)/components/landing-faq.tsx b/apps/sim/app/(landing)/components/landing-faq.tsx index 435d0ca8e90..8b17bff4793 100644 --- a/apps/sim/app/(landing)/components/landing-faq.tsx +++ b/apps/sim/app/(landing)/components/landing-faq.tsx @@ -1,6 +1,7 @@ 'use client' import { useState } from 'react' +import { AnimatePresence, motion } from 'framer-motion' import { ChevronDown } from '@/components/emcn' import { cn } from '@/lib/core/utils/cn' @@ -15,46 +16,67 @@ interface LandingFAQProps { export function LandingFAQ({ faqs }: LandingFAQProps) { const [openIndex, setOpenIndex] = useState(0) + const [hoveredIndex, setHoveredIndex] = useState(null) return ( -
+
{faqs.map(({ question, answer }, index) => { const isOpen = openIndex === index + const isHovered = hoveredIndex === index + const showDivider = index > 0 && hoveredIndex !== index && hoveredIndex !== index - 1 return (
+
- {isOpen && ( -
-

- {answer} -

-
- )} + + {isOpen && ( + +
+

+ {answer} +

+
+
+ )} +
) })} diff --git a/apps/sim/app/(landing)/components/navbar/components/product-dropdown.tsx b/apps/sim/app/(landing)/components/navbar/components/product-dropdown.tsx new file mode 100644 index 00000000000..fdfb88097fb --- /dev/null +++ b/apps/sim/app/(landing)/components/navbar/components/product-dropdown.tsx @@ -0,0 +1,149 @@ +import type { ComponentType, SVGProps } from 'react' +import Link from 'next/link' +import { + AgentIcon, + ApiIcon, + McpIcon, + PackageSearchIcon, + TableIcon, + WorkflowIcon, +} from '@/components/icons' + +interface ProductLink { + label: string + description: string + href: string + external?: boolean + icon: ComponentType> +} + +interface SidebarLink { + label: string + href: string + external?: boolean +} + +const PLATFORM: ProductLink[] = [ + { + label: 'Workflows', + description: 'Visual AI automation builder', + href: 'https://docs.sim.ai/getting-started', + external: true, + icon: WorkflowIcon, + }, + { + label: 'Agent', + description: 'Build autonomous AI agents', + href: 'https://docs.sim.ai/blocks/agent', + external: true, + icon: AgentIcon, + }, + { + label: 'MCP', + description: 'Connect external tools', + href: 'https://docs.sim.ai/mcp', + external: true, + icon: McpIcon, + }, + { + label: 'Knowledge Base', + description: 'Retrieval-augmented context', + href: 'https://docs.sim.ai/knowledgebase', + external: true, + icon: PackageSearchIcon, + }, + { + label: 'Tables', + description: 'Structured data storage', + href: 'https://docs.sim.ai/tables', + external: true, + icon: TableIcon, + }, + { + label: 'API', + description: 'Deploy workflows as endpoints', + href: 'https://docs.sim.ai/api-reference/getting-started', + external: true, + icon: ApiIcon, + }, +] + +const EXPLORE: SidebarLink[] = [ + { label: 'Models', href: '/models' }, + { label: 'Integrations', href: '/integrations' }, + { label: 'Changelog', href: '/changelog' }, + { label: 'Self-hosting', href: 'https://docs.sim.ai/self-hosting', external: true }, +] + +function DropdownLink({ link }: { link: ProductLink }) { + const Icon = link.icon + const Tag = link.external ? 'a' : Link + const props = link.external + ? { href: link.href, target: '_blank' as const, rel: 'noopener noreferrer' } + : { href: link.href } + + return ( + + +
+ + {link.label} + + + {link.description} + +
+
+ ) +} + +export function ProductDropdown() { + return ( +
+
+
+ + Platform + +
+
+ +
+ {PLATFORM.map((link) => ( + + ))} +
+
+ +
+ +
+
+ + Explore + +
+
+ + {EXPLORE.map((link) => { + const Tag = link.external ? 'a' : Link + const props = link.external + ? { href: link.href, target: '_blank' as const, rel: 'noopener noreferrer' } + : { href: link.href } + return ( + + {link.label} + + ) + })} +
+
+ ) +} diff --git a/apps/sim/app/(landing)/integrations/[slug]/components/template-card-button.tsx b/apps/sim/app/(landing)/integrations/[slug]/components/template-card-button.tsx index feb7f40a669..5fffa1121b6 100644 --- a/apps/sim/app/(landing)/integrations/[slug]/components/template-card-button.tsx +++ b/apps/sim/app/(landing)/integrations/[slug]/components/template-card-button.tsx @@ -2,13 +2,15 @@ import { useRouter } from 'next/navigation' import { LandingPromptStorage } from '@/lib/core/utils/browser-storage' +import { cn } from '@/lib/core/utils/cn' interface TemplateCardButtonProps { prompt: string + className?: string children: React.ReactNode } -export function TemplateCardButton({ prompt, children }: TemplateCardButtonProps) { +export function TemplateCardButton({ prompt, className, children }: TemplateCardButtonProps) { const router = useRouter() function handleClick() { @@ -17,11 +19,7 @@ export function TemplateCardButton({ prompt, children }: TemplateCardButtonProps } return ( - ) diff --git a/apps/sim/app/(landing)/integrations/[slug]/page.tsx b/apps/sim/app/(landing)/integrations/[slug]/page.tsx index 9927c35d1f0..35290f9e711 100644 --- a/apps/sim/app/(landing)/integrations/[slug]/page.tsx +++ b/apps/sim/app/(landing)/integrations/[slug]/page.tsx @@ -283,7 +283,7 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl } return ( - <> +