{"reference_analysis":{"checked_at":"2026-10-08","provider":"Clarifai","source_access":{"en":"Reviewed official-page search excerpts. Direct retrieval of several pages failed; verify current versions and terms at the linked source before integration.","zh-TW":"本輪核對官方頁的搜尋索引摘錄；部分原頁直接擷取失敗，串接前請於來源確認現行版本與條件。"},"selection_basis":{"en":"Ten technical entry points selected by integration task; not an official ranking.","zh-TW":"依整合任務精選十項技術入口，不是官方排名。"},"about_url":"https://clarifai.com/company/about","about":[{"label":{"en":"Origins","zh-TW":"起源"},"value":{"en":"Founded in 2013 by Matthew Zeiler.","zh-TW":"由 Matthew Zeiler 於 2013 年創立。"}},{"label":{"en":"Positioning","zh-TW":"定位"},"value":{"en":"A platform for teams to build, share and run enterprise AI.","zh-TW":"協助團隊建立、分享與執行企業 AI 的平台。"}},{"label":{"en":"Lifecycle","zh-TW":"生命週期"},"value":{"en":"Covers dataset preparation, model training and deployment.","zh-TW":"涵蓋資料集準備、模型訓練與部署。"}},{"label":{"en":"Company context","zh-TW":"公司資訊"},"value":{"en":"The official About page includes leadership, investors and industry recognition.","zh-TW":"官方 About 提供領導團隊、投資者與產業評比資訊。"}}],"items":[{"id":"python","name":"Python SDK","kind":"Python client","url":"https://docs.clarifai.com/resources/api-overview/python-sdk/","audience":{"en":"Python / ML developer","zh-TW":"Python／ML 工程師"},"capability":{"en":"Use the object-oriented clarifai package to access platform resources.","zh-TW":"使用物件導向 clarifai 套件存取平台資源。"},"io":{"en":"Resource operations → SDK responses","zh-TW":"資源操作 → SDK 回應"},"runtime":{"en":"Python client connecting to Clarifai.","zh-TW":"Python client 連接 Clarifai。"},"constraint":{"en":"Confirm supported Python and OS versions for the release you install.","zh-TW":"確認安裝版本支援的 Python 與作業系統。"},"validation":{"en":"Pin the installed version; run one permitted read before a model call.","zh-TW":"固定安裝版本，先驗證一個授權讀取操作，再呼叫模型。"}},{"id":"node","name":"Node.js SDK","kind":"TypeScript / Node.js client","url":"https://docs.clarifai.com/resources/api-overview/nodejs-sdk/","audience":{"en":"Node.js / backend developer","zh-TW":"Node.js／後端工程師"},"capability":{"en":"Use clarifai-nodejs for typed platform access.","zh-TW":"使用 clarifai-nodejs 以型別化介面存取平台。"},"io":{"en":"Application request → SDK response","zh-TW":"應用請求 → SDK 回應"},"runtime":{"en":"Server-side Node.js application.","zh-TW":"伺服器端 Node.js 應用。"},"constraint":{"en":"A browser UI should call your backend; keep PATs out of client bundles.","zh-TW":"瀏覽器介面應呼叫自有後端；PAT 不得進入前端程式包。"},"validation":{"en":"Verify a clean production build and confirm the browser cannot retrieve the PAT.","zh-TW":"驗證正式建置成功，並確認瀏覽器無法取得 PAT。"}},{"id":"grpc","name":"gRPC clients","kind":"Typed RPC clients","url":"https://docs.clarifai.com/resources/api-overview/grpc-clients/","audience":{"en":"Backend / polyglot platform team","zh-TW":"後端／多語言平台團隊"},"capability":{"en":"Use official language clients and Protobuf messages.","zh-TW":"使用官方語言 client 與 Protobuf 訊息。"},"io":{"en":"Typed request → typed response or stream","zh-TW":"型別化請求 → 型別化回應或串流"},"runtime":{"en":"Backend with a compatible gRPC transport.","zh-TW":"具備相容 gRPC 傳輸的後端。"},"constraint":{"en":"Verify HTTP/2, proxies and deadlines in your actual hosting environment.","zh-TW":"在實際託管環境確認 HTTP/2、代理與截止時間。"},"validation":{"en":"Test request cancellation, deadline exceeded and connection recovery.","zh-TW":"測試請求取消、超時與連線復原。"}},{"id":"rest","name":"REST API","kind":"HTTPS / JSON interface","url":"https://docs.clarifai.com/resources/api-overview/","audience":{"en":"Backend / integration team","zh-TW":"後端／整合團隊"},"capability":{"en":"Call the platform directly over HTTPS without a language SDK.","zh-TW":"不依賴特定語言 SDK，直接以 HTTPS 呼叫平台。"},"io":{"en":"Authenticated JSON request → JSON response","zh-TW":"經認證 JSON 請求 → JSON 回應"},"runtime":{"en":"Your backend calls api.clarifai.com.","zh-TW":"自有後端呼叫 api.clarifai.com。"},"constraint":{"en":"Transport success alone does not validate an application-level result.","zh-TW":"傳輸成功本身不足以確認應用層結果。"},"validation":{"en":"Check both HTTP and provider status; reject unexpected response shapes.","zh-TW":"同時檢查 HTTP 與供應商狀態，拒絕未預期的回應結構。"}},{"id":"cli","name":"Clarifai CLI","kind":"Terminal tool","url":"https://docs.clarifai.com/resources/api-overview/cli/","audience":{"en":"MLOps / platform engineer","zh-TW":"MLOps／平台工程師"},"capability":{"en":"Run platform tasks from the CLI bundled with the Python SDK.","zh-TW":"使用 Python SDK 附帶的 CLI 執行平台工作。"},"io":{"en":"CLI command and context → operation result","zh-TW":"CLI 指令與環境 → 操作結果"},"runtime":{"en":"Developer workstation or controlled CI environment.","zh-TW":"開發工作站或受控 CI 環境。"},"constraint":{"en":"Confirm active user and app before any resource-changing operation.","zh-TW":"任何變更資源操作前，先確認目前使用者與 app。"},"validation":{"en":"Record CLI version and selected context; rehearse in a test app.","zh-TW":"記錄 CLI 版本與選定環境，在測試 app 演練。"}},{"id":"workflow","name":"Workflow inference","kind":"Multi-step inference API","url":"https://docs.clarifai.com/create/workflows/inference/","audience":{"en":"Solution engineer / technical PM","zh-TW":"解決方案工程師／技術 PM"},"capability":{"en":"Submit compatible inputs to a workflow and retrieve model outputs.","zh-TW":"將相容輸入送入工作流程並取得模型輸出。"},"io":{"en":"Text / image inputs → workflow results","zh-TW":"文字／影像輸入 → 工作流程結果"},"runtime":{"en":"Chosen workflow and its model execution environment.","zh-TW":"選定工作流程與其模型執行環境。"},"constraint":{"en":"Each node has its own output type; inspect the intended node rather than assuming the last is correct.","zh-TW":"各節點輸出型態不同；應確認目標節點，不能假定最後一個必然正確。"},"validation":{"en":"Test each node and the end-to-end chain against a known expected result.","zh-TW":"以已知預期結果測試各節點與完整流程。"}},{"id":"inputs","name":"Input upload API","kind":"Data ingestion API","url":"https://docs.clarifai.com/create/inputs/upload/api/","audience":{"en":"Data engineering / annotation team","zh-TW":"資料工程／標註團隊"},"capability":{"en":"Upload images, text, audio or video for platform processing.","zh-TW":"上傳影像、文字、音訊或視訊供平台處理。"},"io":{"en":"Authorized media → input records and processing status","zh-TW":"經授權媒體 → 輸入紀錄與處理狀態"},"runtime":{"en":"Data is uploaded to the Clarifai platform.","zh-TW":"資料上傳至 Clarifai 平台。"},"constraint":{"en":"Upload acceptance and completed indexing are different states.","zh-TW":"接受上傳與完成索引是不同狀態。"},"validation":{"en":"Follow pending inputs to a terminal state; test an inaccessible URL and duplicate input.","zh-TW":"追蹤等待中輸入直到終態，測試無法存取的網址與重複輸入。"}},{"id":"datasets","name":"Dataset versions","kind":"Dataset management API","url":"https://docs.clarifai.com/create/datasets/create/","audience":{"en":"ML / data operations team","zh-TW":"ML／資料維運團隊"},"capability":{"en":"Create datasets and version snapshots for repeatable iterations.","zh-TW":"建立資料集及版本快照，支援可重複的迭代。"},"io":{"en":"Selected input records → identified dataset version","zh-TW":"選定輸入紀錄 → 具識別碼的資料集版本"},"runtime":{"en":"Platform data resources scoped to your app.","zh-TW":"限定於 app 的平台資料資源。"},"constraint":{"en":"Keep training and evaluation samples separate; record exact versions.","zh-TW":"訓練與評估樣本分離，記錄確切版本。"},"validation":{"en":"Compare counts and membership before and after a version change.","zh-TW":"版本變更前後核對筆數與成員。"}},{"id":"deploy","name":"Model deployment","kind":"Dedicated compute tooling","url":"https://docs.clarifai.com/compute/deployments/deploy-model/","audience":{"en":"MLOps / infrastructure owner","zh-TW":"MLOps／基礎設施負責人"},"capability":{"en":"Deploy a model onto selected compute through the CLI or platform.","zh-TW":"透過 CLI 或平台將模型部署至選定運算資源。"},"io":{"en":"Model and compute configuration → deployment","zh-TW":"模型與運算設定 → 部署"},"runtime":{"en":"Provisioned compute infrastructure.","zh-TW":"已配置的運算基礎設施。"},"constraint":{"en":"Deployment may provision billable resources; review hardware, replicas and teardown.","zh-TW":"部署可能建立計費資源，需確認硬體、副本數與移除流程。"},"validation":{"en":"Record deployment identity, readiness, cold-start latency and resource cleanup.","zh-TW":"記錄部署識別、就緒狀態、冷啟動延遲與資源清理。"}},{"id":"postman","name":"Postman collection","kind":"REST exploration tool","url":"https://docs.clarifai.com/resources/api-references/postman/","audience":{"en":"QA / API evaluator","zh-TW":"QA／API 評估者"},"capability":{"en":"Inspect grouped requests for models, inputs, workflows and compute.","zh-TW":"檢視依模型、輸入、工作流程與運算分類的請求。"},"io":{"en":"Configured request → inspectable HTTP response","zh-TW":"設定請求 → 可檢視的 HTTP 回應"},"runtime":{"en":"Postman client with your permitted API context.","zh-TW":"具備授權 API 環境的 Postman client。"},"constraint":{"en":"Collections include write and delete operations; start with the intended read or inference request.","zh-TW":"集合包含寫入與刪除操作，應先選定需要的讀取或推論請求。"},"validation":{"en":"Keep secrets in private variables and remove them before exporting a collection.","zh-TW":"憑證使用私密變數，匯出集合前移除。"}}],"supporting_references":[{"id":"pat","name":"Personal Access Tokens","url":"https://docs.clarifai.com/control/authentication/pat/","audience":{"en":"Backend / platform owner: understand account-level credentials and resource access.","zh-TW":"後端／平台負責人：了解帳號層級憑證與資源存取。"},"validation":{"en":"Use environment secrets; verify the user/app scope before the first call.","zh-TW":"使用環境機密值；首次呼叫前確認 user／app 範圍。"}},{"id":"status","name":"Status codes","url":"https://docs.clarifai.com/resources/api-overview/status-codes/","audience":{"en":"Backend / QA: distinguish success, failure, throttling and pending states.","zh-TW":"後端／QA：區分成功、失敗、節流與等待狀態。"},"validation":{"en":"Check nested output states too; never convert partial failure into an empty success.","zh-TW":"也檢查內層輸出狀態，不得把部分失敗當作空的成功結果。"}},{"id":"outputs","name":"API outputs","url":"https://docs.clarifai.com/resources/api-overview/api-outputs/","audience":{"en":"Application developer: map provider responses into a stable internal contract.","zh-TW":"應用工程師：將供應商回應轉成穩定內部契約。"},"validation":{"en":"Keep request/model/version identifiers; do not log credentials or private media.","zh-TW":"保留請求、模型、版本識別碼；不記錄憑證或私密媒體。"}},{"id":"inference","name":"Inference API","url":"https://docs.clarifai.com/compute/inference/clarifai/api/","audience":{"en":"Model integrator: choose an operation matching the model input and output.","zh-TW":"模型整合者：選擇符合模型輸入輸出的操作。"},"validation":{"en":"The starter below only covers image concept classification; use a separate adapter for boxes or generated text.","zh-TW":"下方範例僅涵蓋影像概念分類；框選或生成文字需另設轉接器。"}}]},"content_coverage":{"reference_guide":true,"developer_starter":true,"integration_test":"not-run","updated_at":"2026-10-08"},"developer_starter":{"version":"1.0.0","verification":"offline-fixtures-only;live-provider-not-run","filename":"clarifai_smoke.py","code":"\"\"\"Smart Tools starter: one versioned Clarifai image concept classifier.\"\"\"\nimport base64\nimport json\nimport math\nimport os\nimport sys\nfrom datetime import datetime, timezone\nfrom pathlib import Path\nfrom time import monotonic\nfrom urllib.error import HTTPError, URLError\nfrom urllib.parse import quote\nfrom urllib.request import Request, urlopen\n\n\nclass ProviderFailure(Exception):\n    pass\n\n\ndef normalize(raw):\n    if not isinstance(raw, dict) or raw.get('status', {}).get('code') != 10000:\n        raise ProviderFailure()\n    outputs = raw.get('outputs')\n    if not isinstance(outputs, list) or len(outputs) != 1:\n        raise ValueError('unexpected_schema')\n    output = outputs[0]\n    if output.get('status', {}).get('code') != 10000:\n        raise ProviderFailure()\n    concepts = output.get('data', {}).get('concepts')\n    if not isinstance(concepts, list):\n        raise ValueError('unexpected_schema')\n    items = []\n    for concept in concepts:\n        score = concept.get('value')\n        if not isinstance(concept.get('name'), str) or type(score) not in (int, float) or not math.isfinite(score) or not 0 <= score <= 1:\n            raise ValueError('unexpected_schema')\n        items.append({'label': concept['name'], 'score': score})\n    return items\n\n\ndef run():\n    start = monotonic()\n    result = {'schema_version': '1.0.0', 'provider': 'Clarifai', 'status': 'error',\n              'model_version': None, 'data': None, 'error': None,\n              'captured_at': datetime.now(timezone.utc).isoformat()}\n    try:\n        keys = ('CLARIFAI_PAT', 'CLARIFAI_USER_ID', 'CLARIFAI_APP_ID', 'CLARIFAI_MODEL_ID', 'CLARIFAI_MODEL_VERSION', 'IMAGE_PATH')\n        cfg = {key: os.environ[key] for key in keys}\n        if not all(cfg.values()):\n            raise ValueError('configuration')\n        content = Path(cfg['IMAGE_PATH']).read_bytes()\n        if not content or len(content) > 5 * 1024 * 1024:\n            raise ValueError('starter_image_limit')\n        # 5 MiB is this starter's local cap, not a quoted provider limit.\n        model, revision = quote(cfg['CLARIFAI_MODEL_ID'], safe=''), quote(cfg['CLARIFAI_MODEL_VERSION'], safe='')\n        result['model_version'] = cfg['CLARIFAI_MODEL_VERSION']\n        payload = {'user_app_id': {'user_id': cfg['CLARIFAI_USER_ID'], 'app_id': cfg['CLARIFAI_APP_ID']},\n                   'inputs': [{'data': {'image': {'base64': base64.b64encode(content).decode('ascii')}}}]}\n        request = Request(f'https://api.clarifai.com/v2/models/{model}/versions/{revision}/outputs',\n                          data=json.dumps(payload).encode(), method='POST',\n                          headers={'Authorization': 'Key ' + cfg['CLARIFAI_PAT'], 'Content-Type': 'application/json'})\n        with urlopen(request, timeout=30) as response:\n            raw = json.load(response)\n        result['data'] = normalize(raw)\n        result['status'] = 'ok'\n    except HTTPError as exc:\n        result['error'] = 'http_' + str(exc.code)\n    except (URLError, TimeoutError):\n        result['error'] = 'transport_failure'\n    except ProviderFailure:\n        result['error'] = 'provider_status_failure'\n    except (KeyError, OSError):\n        result['error'] = 'configuration'\n    except (ValueError, TypeError, AttributeError):\n        result['error'] = 'configuration_or_schema'\n    result['elapsed_ms'] = round((monotonic() - start) * 1000)\n    return result\n\n\nif __name__ == '__main__':\n    output = run()\n    print(json.dumps(output, ensure_ascii=False, allow_nan=False))\n    sys.exit(0 if output['status'] == 'ok' else 1)\n","scope":{"en":"Single-image concept classification; detection boxes, generated text and workflows need separate adapters.","zh-TW":"單張影像概念分類；偵測框、生成文字與工作流程需另設轉接器。"},"setup":{"en":"Use Python 3 with its standard library. Set CLARIFAI_PAT, CLARIFAI_USER_ID, CLARIFAI_APP_ID, CLARIFAI_MODEL_ID, CLARIFAI_MODEL_VERSION and IMAGE_PATH locally. Choose a compatible image concept model. Save as clarifai_smoke.py and run python clarifai_smoke.py. The request has a 30-second socket timeout; add an overall process deadline for production.","zh-TW":"使用 Python 3 標準函式庫。在本地設定 CLARIFAI_PAT、CLARIFAI_USER_ID、CLARIFAI_APP_ID、CLARIFAI_MODEL_ID、CLARIFAI_MODEL_VERSION 與 IMAGE_PATH；模型需支援影像概念分類。另存為 clarifai_smoke.py，執行 python clarifai_smoke.py。請求設有 30 秒 socket 逾時；正式使用前另加程序整體截止時間。"},"decisions":[[{"en":"Output contract","zh-TW":"輸出契約"},{"en":"status is ok or error. data is a validated array on success (an empty array is valid), otherwise null. error is a redacted category. The envelope is ours, not the provider response.","zh-TW":"status 為 ok 或 error；成功時 data 為驗證過的陣列（可為空），失敗時為 null；error 僅保留去敏後分類。這是本站契約，不是供應商原始格式。"}],[{"en":"Reproducibility","zh-TW":"可重現性"},{"en":"Record model/version, SDK or Python version, sample identifier and environment before comparing results. Keep original media separately in authorized storage.","zh-TW":"比較結果前記錄模型／版本、SDK 或 Python 版本、樣本識別與環境；原始媒體另存於經授權儲存空間。"}],[{"en":"Failure behavior","zh-TW":"失敗處理"},{"en":"No automatic retries in these starters. Fix credentials, scopes and malformed inputs first; design bounded retries and a total deadline before production. Do not replay resource-creating requests blindly.","zh-TW":"範例不自動重試；先修正憑證、權限與輸入。正式使用前設計有限重試與整體截止時間；不可盲目重送建立資源的請求。"}],[{"en":"Acceptance gate — proposed","zh-TW":"建議驗收門檻"},{"en":"Run 20 representative authorized images plus invalid input, missing credentials and a forced timeout. Require zero silent failures. Agree a latency budget, defect recall and false-alarm threshold with the product owner before measuring; passing this smoke test alone is not production approval.","zh-TW":"以 20 張代表性授權影像，加上無效輸入、缺少憑證與強制逾時情境測試；要求零筆隱藏失敗。先與產品負責人約定延遲、缺陷召回率與誤報門檻，再量測；通過此冒煙測試不等於正式驗收。"}],[{"en":"Cost / data decision","zh-TW":"成本／資料決策"},{"en":"Both examples send image bytes to provider cloud. Confirm permitted data, retention, region and current account charges. Measure usage on a small sample before extrapolating; no cost or latency figure has been measured here.","zh-TW":"兩個範例都會將影像位元組送至供應商雲端。確認允許資料、保存期限、區域及帳號現行費用；先量測小樣本用量再推估，本頁尚無實測成本或延遲數據。"}]]},"schema_version":"1.0.0","type":"development-proposal","product_id":"industrial-api:ClarifaiAPI","name":"Clarifai API","provider":"Clarifai","url":"https://smart-tools.ai/product/ClarifaiAPI","localized_urls":{"en":"https://smart-tools.ai/product/ClarifaiAPI","zh-TW":"https://smart-tools.ai/zh-tw/product/ClarifaiAPI"},"category":"vision","capability_id":"cap:computer-vision","technology_hub":"https://smart-tools.ai/industrial-ai/computer-vision","interface_kind":"API / SDK","deployment":"cloud","official_documentation":"https://docs.clarifai.com/resources/api-overview/","sources":["https://docs.clarifai.com/resources/api-overview/","https://clarifai.com/company/about","https://docs.clarifai.com/resources/api-overview/python-sdk/","https://docs.clarifai.com/resources/api-overview/nodejs-sdk/","https://docs.clarifai.com/resources/api-overview/grpc-clients/","https://docs.clarifai.com/resources/api-overview/cli/","https://docs.clarifai.com/create/workflows/inference/","https://docs.clarifai.com/create/inputs/upload/api/","https://docs.clarifai.com/create/datasets/create/","https://docs.clarifai.com/compute/deployments/deploy-model/","https://docs.clarifai.com/resources/api-references/postman/","https://docs.clarifai.com/control/authentication/pat/","https://docs.clarifai.com/resources/api-overview/status-codes/","https://docs.clarifai.com/resources/api-overview/api-outputs/","https://docs.clarifai.com/compute/inference/clarifai/api/"],"source_review":{"level":"P1","status":"official-search-excerpts-reviewed","checked_at":"2026-10-08"},"provider_summary":{"en":"Integrate model inference and visual analysis through documented application interfaces.","zh-TW":"透過官方接口整合模型推論與視覺分析。"},"proposed_product":{"en":"Visual asset classifier","zh-TW":"工業影像分類工作台"},"feasibility":{"tier":"prototype","rationale":{"en":"Test one documented operation with a small real sample after access is confirmed. This is a development judgment, not a delivery estimate.","zh-TW":"確認存取後，用少量真實樣本測試一個有文件的操作。此為開發判斷，不是交期估算。"},"basis":"development-judgment;not-traffic-ranked"},"proposed_inputs":{"en":"A small authorized image dataset, task definition and reference annotations.","zh-TW":"少量經授權影像、任務定義與參考標註。"},"proposed_deliverable":{"en":"A reviewable result with image references, labels or annotation state; keep original files.","zh-TW":"可審核的影像引用、標籤或標註狀態；保留原始檔案。"},"acceptance_criterion":{"en":"Compare the supported operation against a labeled sample; report errors and missing results separately.","zh-TW":"用已標註樣本比對支援的操作；錯誤與缺漏結果分開呈現。"},"dependencies":{"en":"Dataset access, image rights and a supported model or annotation project.","zh-TW":"資料集存取、影像使用權與支援的模型或標註專案。"},"integration_condition":null,"proposed_adapter_envelope":{"provider":"Clarifai","operation":"chosen-documented-operation","source_url":"https://docs.clarifai.com/resources/api-overview/","captured_at":"ISO-8601 timestamp","status":"ok|pending|unknown|failed","data":"provider response mapped by the team","evidence":"source references","errors":"explicit error details"},"adapter_envelope_status":"proposed-internal-contract;not-a-provider-response","development_status":"concept-specification","integration_test":"not-run","pricing_status":"provider-terms-review-required","estimate_status":"requires-access-and-sample-validation","traffic_status":"not-measured-in-this-assessment","measurement_events":["product_view","product_to_docs","product_to_spec","bridge_to_industrial_ai"]}