{
  "slug": "anthropic-api-proxy-flutterflow",
  "title": "Anthropic api proxy for flutterflow chat app",
  "metaDescription": "Anthropic api proxy for flutterflow chat app. Mirrors OpenAI pattern: Messages API with Anthropic key. Keep Anthropic keys in RealComposer Vault;.",
  "headline": "Claude chat in FlutterFlow without x-api-key in client",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 10,
  "clientPlatform": "FlutterFlow",
  "upstreamServices": [
    "Anthropic"
  ],
  "searchIntentQuery": "anthropic api proxy for flutterflow chat app",
  "directAnswerSummary": "Mirrors OpenAI pattern: Messages API with Anthropic key injected at edge. For \"anthropic api proxy for flutterflow chat app\", store ANTHROPIC_API_KEY in Secret Vault, call https://api.anthropic.com/v1/messages from a Worker, and let FlutterFlow hit only https://realcomposer.com/v1/workspace/anthropic-api-proxy-flutterflow with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.",
  "problem": {
    "title": "Why FlutterFlow leaks Anthropic credentials",
    "explanation": "Attackers routinely extract Anthropic secrets from FlutterFlow builds. Direct browser calls also expose internal error payloads with hostnames.",
    "risks": [
      "Production Anthropic keys copied from FlutterFlow bundles",
      "Compliance violations after credential leaks",
      "Attackers replaying vault-grade scopes from a laptop"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Bind vault keys to the Worker",
      "description": "Create ANTHROPIC_API_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Use POST against https://api.anthropic.com/v1/messages. Allowed origins on the client token should match post pipelines set cache ttl to 0 because realcomposer only stores get responses at the edge."
    },
    {
      "stepNumber": 3,
      "title": "Wire the FlutterFlow API Call",
      "description": "Call https://realcomposer.com/v1/workspace/anthropic-api-proxy-flutterflow with a restricted rc_live_ client token. FlutterFlow never sends upstream secrets.",
      "codeSnippet": "// FlutterFlow API Call\nURL: https://realcomposer.com/v1/workspace/anthropic-api-proxy-flutterflow\nHeader Authorization: Bearer rc_live_your_token"
    }
  ],
  "pipelineConfig": {
    "name": "Anthropic api proxy for flutterflow chat app",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "anthropic",
        "upstreamUrlTemplate": "https://api.anthropic.com/v1/messages",
        "httpMethod": "POST",
        "headersTemplate": {
          "x-api-key": "{{secrets.ANTHROPIC_API_KEY}}",
          "anthropic-version": "2023-06-01",
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "role",
          "sourcePath": "content.0.text",
          "type": "string",
          "sourceStep": "anthropic"
        },
        {
          "targetPath": "model",
          "sourcePath": "model",
          "type": "string",
          "sourceStep": "anthropic"
        },
        {
          "targetPath": "stopReason",
          "sourcePath": "stop_reason",
          "type": "string",
          "sourceStep": "anthropic"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_anthropi",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "anthropic-api-proxy-flutterflow"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "role": "sample",
    "model": "sample",
    "stopReason": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/anthropic-api-proxy-flutterflow\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Is it safe to log Anthropic responses in FlutterFlow?",
      "answer": "Store ANTHROPIC_API_KEY for anthropic-api-proxy-flutterflow. FlutterFlow never sees decrypted values."
    },
    {
      "question": "When does edge caching apply to this recipe?",
      "answer": "anthropic-api-proxy-flutterflow POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Allowed origins on the anthropic-api-proxy-flutterflow client token restrict which domains may call the edge URL."
    }
  ],
  "relatedRecipeSlugs": [
    "anthropic-claude-api-frontend-proxy",
    "call-stripe-from-flutterflow-securely"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/anthropic-api-proxy-flutterflow",
    "markdown": "https://realcomposer.com/recipes/anthropic-api-proxy-flutterflow.md",
    "json": "https://realcomposer.com/recipes/anthropic-api-proxy-flutterflow.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=anthropic-api-proxy-flutterflow&via=agent"
  }
}