[{"data":1,"prerenderedAt":1274},["ShallowReactive",2],{"docs-nav-en":3,"docs-nav-zh":59,"docs-page-en-ai-playground":95,"docs-page-zh-ai-playground":769,"landing-footer-friend-links":1271},[4,10,16,22,27,32,37,42,48,53],{"path":5,"title":6,"label":7,"description":8,"order":9},"/docs/introduction","web-nuxt template overview","Introduction","What the Nuxt template already ships today, and where to customize it.","1",{"path":11,"title":12,"label":13,"description":14,"order":15},"/docs/quick-start","Quick start for web-nuxt","Quick start","Go from first visit to live demo, dashboard activation, and launch-ready trust surfaces.","2",{"path":17,"title":18,"label":19,"description":20,"order":21},"/docs/billing-and-credits","Billing and credits","Billing","How pricing, credits, subscriptions, and order history fit together in the Nuxt template.","3",{"path":23,"title":24,"label":25,"description":26,"order":21},"/docs/skills-and-vibe-coding","Skills and vibe coding for web-nuxt","Skills & vibe coding","Use repo skills to customize apps/web-nuxt with prompt-driven edits instead of starting from a blank spec.",{"path":28,"title":29,"label":29,"description":30,"order":31},"/docs/auth-and-guest-mode","Auth and guest mode","Understand login, guest access, account conversion, and where each path should lead users.","4",{"path":33,"title":34,"label":34,"description":35,"order":36},"/docs/ai-playground","AI workspace","The user-facing Chat, Image Agent, Studio, and Usage surfaces in web-nuxt.","5",{"path":38,"title":39,"label":39,"description":40,"order":41},"/docs/support-and-refund","Support and refund","Where users should go for help, how refunds are handled, and what to expose on the public site.","6",{"path":43,"title":44,"label":45,"description":46,"order":47},"/docs/analytics","Analytics providers in web-nuxt","Analytics","Optional analytics support for GA4, Plausible, and Microsoft Clarity.","7",{"path":49,"title":50,"label":50,"description":51,"order":52},"/docs/footer-configuration","Footer configuration","Configure footer brand copy, contact email, social links, navigation columns, legal text, and copyright from zship.app.json.","8",{"path":54,"title":55,"label":56,"description":57,"order":58},"/docs/docs-system","How the built-in docs work","Docs system","The Nuxt Content docs setup inside web-nuxt and how to extend it.","9",[60,64,68,71,75,78,81,84,88,91],{"path":5,"title":61,"label":62,"description":63,"order":9},"web-nuxt 模板概览","模板概览","说明 web-nuxt 当前已经具备什么，以及主要改动入口在哪里。",{"path":11,"title":65,"label":66,"description":67,"order":15},"web-nuxt 快速开始","快速开始","从首次访问到真实演示、仪表盘激活路径与对外发布前检查清单。",{"path":17,"title":69,"label":69,"description":70,"order":21},"计费与积分","说明定价、积分、订阅与订单历史在 Nuxt 模板中的关系。",{"path":23,"title":72,"label":73,"description":74,"order":21},"web-nuxt 的 Skills 与 vibe coding","Skills 与 vibe coding","通过 repo 里的 skills，用自然语言驱动方式修改和自定义 apps/web-nuxt。",{"path":28,"title":76,"label":76,"description":77,"order":31},"登录与访客模式","说明登录、访客访问、账户升级以及这些路径应该把用户带到哪里。",{"path":33,"title":79,"label":79,"description":80,"order":36},"AI 工作区","说明 web-nuxt 面向用户的 Chat、Image Agent、Studio 与 Usage 产品面。",{"path":38,"title":82,"label":82,"description":83,"order":41},"支持与退款","说明用户应该去哪里求助、退款如何处理，以及公开站点应暴露哪些信任入口。",{"path":43,"title":85,"label":86,"description":87,"order":47},"web-nuxt 的 Analytics 支持","数据分析","说明 web-nuxt 目前如何接入 GA4、Plausible 和 Clarity。",{"path":49,"title":89,"label":89,"description":90,"order":52},"Footer 配置","通过 zship.app.json 配置 Footer 的品牌文案、联系邮箱、社交链接、导航栏目、法律声明与版权信息。",{"path":54,"title":92,"label":93,"description":94,"order":58},"内置 Docs 系统说明","Docs 系统","说明 web-nuxt 当前基于 Nuxt Content 的站内文档能力，以及如何继续扩展。",{"id":96,"title":34,"body":97,"description":35,"extension":763,"label":34,"meta":764,"navigation":765,"order":36,"path":33,"seo":766,"stem":767,"__hash__":768},"docsEn/docs/ai-playground.md",{"type":98,"value":99,"toc":750},"minimark",[100,108,136,141,144,167,174,178,209,213,228,231,234,237,240,247,288,312,323,326,351,366,380,390,404,411,421,424,427,434,441,452,455,466,469,484,491,494,509,514,545,554,557,560,564,583,586,590,604,618,663,668,694,703,712,726,735,739],[101,102,103,107],"p",{},[104,105,106],"code",{},"web-nuxt"," exposes a complete AI workspace instead of routing every workflow into one playground:",[109,110,111,118,124,130],"ul",{},[112,113,114,117],"li",{},[104,115,116],{},"/dashboard/ai-chat"," is the persistent conversational product surface, including history and multi-turn continuation.",[112,119,120,123],{},[104,121,122],{},"/dashboard/ai-playground"," is AI Studio for image, video, audio, and other structured generation workflows.",[112,125,126,129],{},[104,127,128],{},"/dashboard/image-agent"," is a conversational image editing workspace with saved chats, reference images, generation history, a library, and version previews.",[112,131,132,135],{},[104,133,134],{},"/dashboard/usage"," combines Chat and provider generation usage, including image, video, audio, requests, tokens, credits, daily activity, and model breakdown.",[137,138,140],"h2",{"id":139},"why-it-matters","Why it matters",[101,142,143],{},"These surfaces share the same session lifecycle, so they already understand:",[109,145,146,149,152,155,158,161,164],{},[112,147,148],{},"auth state",[112,150,151],{},"guest sessions",[112,153,154],{},"available credits",[112,156,157],{},"API key lifecycle",[112,159,160],{},"conversation and generation history",[112,162,163],{},"provider-specific inputs",[112,165,166],{},"user-scoped usage and billing data",[101,168,169,170,173],{},"Site owners can keep the native Workers AI binding or configure any HTTPS OpenAI-compatible Base URL and API Key in the admin AI upstream settings. The credential remains server-side in ",[104,171,172],{},"node10-ai-service","; users only see enabled models, never the upstream key.",[137,175,177],{"id":176},"recommended-user-path","Recommended user path",[179,180,181,191,200,203],"ol",{},[112,182,183,184,187,188],{},"Start from ",[104,185,186],{},"/guest-demo"," or ",[104,189,190],{},"/dashboard",[112,192,193,194,196,197,199],{},"Open ",[104,195,116],{}," for conversational work or ",[104,198,122],{}," for generation",[112,201,202],{},"Continue previous conversations or create the first result",[112,204,205,206,208],{},"Review ",[104,207,134],{}," before upgrading to a full account or a higher plan",[137,210,212],{"id":211},"image-agent-setup","Image Agent setup",[101,214,215,216,219,220,223,224,227],{},"Image Agent is currently included only in the Nuxt template. Its navigation is enabled by ",[104,217,218],{},"imageAgent.enabled"," in ",[104,221,222],{},"app/app.config.ts",". The page and API live in ",[104,225,226],{},"apps/web-nuxt","; other frontend templates are not connected.",[101,229,230],{},"Reopening a conversation restores its most recent image model and generation settings. If that model is no longer available, select an available model before sending the next message. Background progress updates preserve the current model selection.",[101,232,233],{},"The composer attachment panel supports file selection, drag and drop, clipboard images, HTTPS image links, and library selection. Each message accepts up to 16 images, with numbered previews, removal, and clear actions. Conversation images remain available for analysis even when the selected image model cannot edit images or accepts fewer source images. Image tools still enforce that model's capabilities and source count. File uploads reuse the platform CDN component with progress, cancellation, and retry, accepting PNG, JPEG, WebP, GIF, and AVIF files up to 10 MB each. Mock mode uses the same controls and validation while retaining files only in the browser, without contacting the CDN.",[101,235,236],{},"You can discuss ideas before uploading an image or completing generation settings. The selected image model and settings apply when the Agent generates or edits an image; they do not prevent text discussion or visual analysis. Uploaded images are conversation context, and the Agent selects the permitted sources for each image operation.",[101,238,239],{},"Assistant replies and activity messages support Markdown headings, emphasis, lists, tables and code blocks. Wide tables and code blocks scroll within the message on small screens. Model-supplied HTML stays plain text; replies do not load Markdown image URLs. Generated images and references are displayed from the saved task records. HTTP(S) links open separately.",[101,241,242,246],{},[243,244,245],"strong",{},"Annotate image"," opens an editor from reference thumbnails or image previews. It supports pen, arrows, rectangles, ellipses, text, colors, line width, movement, undo/redo, and modification notes. Each message accepts up to four annotated sources, with 64 marks and a 1,000-character note per source. The flattened PNG guide is uploaded through the shared CDN transport; the clean source, guide, normalized editable marks, and note are saved with the message. The Agent receives both images, while image editing tools receive only the clean source. Saved marks can be reopened for another edit. Live sources are imported into reference storage and read through an authenticated same-origin endpoint, so the editor does not require third-party browser CORS. Sources must be allowed by the import policy and remain accessible until their first successful copy. Inaccessible or oversized files show a retry state. Exported guides have a longest side of at most 2,048 pixels.",[101,248,249,250,253,254,257,258,261,262,265,266,269,270,273,274,277,278,281,282,273,285,287],{},"The existing node10 Worker exports an Image Agent Cloudflare Workflow. Apply Node1 migrations through ",[104,251,252],{},"0040_credit_debit_cancellation.sql",", enterprise billing through ",[104,255,256],{},"0004_usage_reservation_fences.sql",", Provider1 through ",[104,259,260],{},"0034_task_recovery_legacy_visibility.sql",", and node10 through ",[104,263,264],{},"0016_image_agent_workflow_control.sql",". Release Node1 and enterprise billing, then Provider1, node10, and the Nuxt app. Use each service's ",[104,267,268],{},"db:migrate:local"," script for local development. Node10 needs ",[104,271,272],{},"IMAGE_AGENT_WORKFLOW",", ",[104,275,276],{},"PROVIDER1_SERVICE",", and a dedicated ",[104,279,280],{},"IMAGE_AGENT_CREDENTIAL_KEY"," secret containing 32 random bytes encoded as 64 hexadecimal characters. The frontend uses its existing ",[104,283,284],{},"AI_SERVICE",[104,286,276],{},", and CDN service connections. Configure an image provider with public model metadata, a prompt field, and an image reference field for editing. The model's validation schema supplies image settings and tool source limits. Provider Turnstile, access checks, moderation, credits, refunds, and task status handling still apply.",[101,289,290,291,294,295,297,298,300,301,303,304,307,308,311],{},"In Cloudflare, the Admin AI proxy requires both ",[104,292,293],{},"AUTH_SERVICE"," for administrator verification and ",[104,296,284],{}," for Agent operations. The Nuxt Image Agent proxy requires ",[104,299,284],{},"; legacy image submissions also require ",[104,302,276],{},". Missing or failed bindings return an error without retrying through an HTTP URL, including when a write may already have committed. Local development outside Cloudflare continues to use the configured HTTP services. Run ",[104,305,306],{},"pnpm --filter @zship/node10-ai-service test:admin-pages:local"," to verify the compiled Admin API with actual local service bindings and ",[104,309,310],{},"pnpm --filter @zship/web-nuxt test:server"," for the Nuxt proxy regressions. These checks do not call models or replace hosted deployment verification.",[101,313,314,315,318,319,322],{},"The shared Nuxt authentication and CDN upload proxies also require their configured bindings in Cloudflare. Password/refresh, Google and GitHub login requests are not resent through HTTP after a binding response is lost. Authentication outages preserve existing session cookies; a lost response may still mean the upstream already rotated the refresh credential. ",[104,316,317],{},"pnpm --filter @zship/node10-ai-service test:nuxt-pages:local"," builds and tests the Nuxt API with actual local platform services, including generation, editing, cold recovery, login, refresh, uploads and authenticated media. Inference uses controlled responses and the test stores are temporary. Add ",[104,320,321],{},"--pages-browser"," to serve the compiled page and its static assets after these checks; see the Node10 README for the fixture account, media routing and cleanup. Live OAuth providers, public media domains and hosted deployment still require separate verification.",[101,324,325],{},"The template bundles literal Lucide and Simple Icons used by its active Nuxt layers, app manifest and UI icon defaults. Shared upload controls, model selection and navigation therefore render these icons from the client bundle in the production build. Custom runtime icon names need their own explicit bundle configuration.",[101,327,193,328,331,332,335,336,273,339,342,343,346,347,350],{},[243,329,330],{},"AI Gateway > Image Agent"," in Admin, or ",[104,333,334],{},"/ai?tab=image-agent",", to choose the conversation model, enable new work, and set global limits. Choose an enabled model with valid token pricing that supports vision and tool calls; the model list does not certify its vision or tool quality. This conversation model is separate from the image model selected in the composer and uses the existing Workers AI or OpenAI-compatible gateway. Saving writes ",[104,337,338],{},"IMAGE_AGENT_ENABLED",[104,340,341],{},"IMAGE_AGENT_MODEL",", and ",[104,344,345],{},"IMAGE_AGENT_LIMITS"," atomically through ",[104,348,349],{},"/api/ai/image-agent/config",". Invalid stored policies disable new work and can be repaired from this tab. Without a configured conversation model, live submissions show the assistant as unavailable; local mock mode remains usable.",[101,352,353,354,357,358,361,362,365],{},"The Admin tab lists runs by application, exact email, and status. ",[243,355,356],{},"Needs attention"," includes failed runs, waiting for credits, unpaid model calls, and unknown image operations. Detail shows frozen budgets, model usage, image operations, and event types without exposing prompts, credentials, image URLs, or raw provider payloads. ",[104,359,360],{},"admin.provider.read"," permits diagnostics; ",[104,363,364],{},"admin.provider.write"," permits configuration, stop, and resume. Initial verification must be completed by the user. Resume currently requires an active run with retained, unexpired credentials. Disabling new work preserves settlement for already accepted operations.",[101,367,368,371,372,375,376,379],{},[243,369,370],{},"Response token limit"," and ",[243,373,374],{},"Reasoning effort"," configure the conversation model, separately from image generation settings. The default is 1600 output tokens per call with provider-default reasoning. The output limit accepts 256–8192 tokens and includes reasoning tokens where the upstream counts them. Only select an explicit reasoning level when the upstream supports it. Saving also writes ",[104,377,378],{},"IMAGE_AGENT_INFERENCE"," in the same policy transaction. Each new run freezes these settings; changing them does not alter accepted runs. Higher limits can increase usage and latency.",[101,381,382,385,386,389],{},[243,383,384],{},"Test model"," in the Admin Image Agent tab checks image recognition, a structured tool call and adoption of its returned result through the same model adapter used by the Agent. It tests the selected model and current inference settings without saving the policy. The check makes at most two model calls, disables retries and uses the same 120-second upstream request timeout as live Agent calls. It can incur upstream model usage but creates no images and deducts no customer credits. Only administrators with provider write permission can start it. Configuration indicators mean ",[243,387,388],{},"Configured",", not verified connectivity. Test results apply to the current screen and clear after changing the model or inference settings or refreshing; they are a basic connectivity/capability check, not a quality benchmark or a persistent release approval. A local Workers AI binding still needs authenticated remote inference to pass.",[101,391,392,395,396,399,400,403],{},[243,393,394],{},"Test media"," separately checks the reference-image storage path. It writes a unique tiny PNG to the configured R2 bucket, verifies the exact bytes through the public base URL, and removes the test object. It shows storage, public-read and cleanup results separately, with guidance for failures. This requires provider write permission and performs a few R2 operations without invoking a model, generating images, charging customer credits or adding user media records. A passed result verifies reference-media access from the Worker at that moment; image-provider delivery, model-side access and visual quality still require separate checks. Refreshing clears the result. Node6 honors the object's cache policy, so diagnostic files use ",[104,397,398],{},"no-store",". A short R2 lifecycle rule for ",[104,401,402],{},"image-agent/diagnostics/"," can clean up files left by an interrupted check.",[101,405,406,407,410],{},"If an Agent response reaches its output limit, the run stops before executing tool calls from that truncated response. Measured model usage is retained and settled, and any images created by earlier steps remain available. The workspace shows the response-limit reason and lets the user continue in a new message. Try this state locally with ",[104,408,409],{},"?mock=1&case=workflow-output-limit",".",[101,412,413,414,187,417,420],{},"The AI SDK agent can answer or clarify with text, inspect conversation images, and execute ",[104,415,416],{},"generate_image",[104,418,419],{},"edit_image",". The Workflow waits for Provider results and supplies the resulting images back to the model, which can finish or perform a bounded revision. Image tools retain the selected provider, model and settings; source IDs resolve only to the conversation's images and current attachments. The activity timeline exposes persisted progress and intermediate images. Text-only replies do not create an image task or show an empty-image error.",[101,422,423],{},"The Agent can focus its next visual inspection on one image or compare several selected images in order. Other image versions remain in the conversation and can be viewed again; they are excluded from the focused preview. Associated annotation guides accompany the selected sources. This helps isolate a detail when versions are confusing, but does not guarantee that the model's visual judgment is correct. Inspection uses model steps and tokens without creating an image operation.",[101,425,426],{},"New tasks review newly returned images first. Results produced together are reviewed together; source images and earlier versions remain available for explicit comparison. A subsequent edit starts a fresh review of its outputs. Accepted tasks keep their original review policy during recovery.",[101,428,429,430,433],{},"Conversation usage is charged separately at the configured model's token rates. New calls round positive usage up to whole credits, matching Node1's ledger: a calculated 0.14 credits costs 1 credit, while a free model remains free. Each response and exact billable amount are frozen before debit, using ",[104,431,432],{},"image-agent:run:\u003Crun-id>:model:\u003Cstep>"," as Node1's operation key. New paid runs require at least 1 credit in both balance and budget; D1 prevents a further model call with less than 1 credit remaining. Billing retries reuse the same amount and never repeat a completed inference; unpaid responses stay hidden. Settled calls create one platform usage record per run and step, including token counts and charged credits. Image Agent messages are excluded from ordinary AI Chat history. Defaults are six model steps, two image operations, 100 credits, and 30 minutes. Absolute server ceilings are eight steps, three operations, 1,000 credits, and 30 minutes. Admin can lower these caps for new runs; accepted runs keep their frozen limits. The composer clamps credit and operation inputs to the configured caps. Image-generation failures follow Provider's refund policy and do not refund completed conversation usage.",[101,435,436,437,440],{},"New snapshots freeze billing version 1. Earlier accepted snapshots and saved legacy replies retain their original amounts and are never repriced during retries. Historical fractional debits cannot settle against the current integer-only Node1 ledger; they require explicit accounting reconciliation before a rollout containing such records. The local platform check (",[104,438,439],{},"pnpm --filter @zship/node10-ai-service test:platform:local",") runs the actual node10, Provider1 and Node1 Workers with disposable D1/R2 data and controlled external model responses.",[101,442,443,444,447,448,451],{},"For persisted image tasks, Provider freezes the failure outcome and generation refund before contacting Node1. Failed refunds and lost refund responses remain pending and retry through status, authenticated callbacks, or the five-minute Provider recovery schedule. Refunds reuse ",[104,445,446],{},"provider1:failure-refund:\u003Ctask-id>"," and preserve moderation charges. The Agent shows ",[243,449,450],{},"Returning image credits"," and waits for settlement before its final reply; it does not repeat the failed image operation. A failed image operation leaves the run failed while preserving the assistant's explanation and any earlier successful images. Already completed dialogue usage is still billed. Historical failures without a frozen refund record require separate reconciliation.",[101,453,454],{},"New Provider tasks and their frozen generation prices are persisted before generation billing. Unconfirmed payments cannot submit images. Payment uncertainty or a two-minute admission timeout cancels the original debit identity and refunds only its confirmed amount; Node1 blocks any delayed new debit with that key. Recovery retains the task ID and never submits a replacement image. Enterprise reservations use their original identity for cancellation. Moderation billing still precedes task creation, and acceptance uncertainty after the submission claim remains distinct from an unsubmitted billing failure.",[101,456,457,458,461,462,465],{},"Content review persists its result and frozen price before charging, including reviews that stop before image task creation. If billing confirmation is lost, the Agent shows ",[243,459,460],{},"Confirming content review charges"," until Provider's scheduled recovery settles the original operation and its audit. Completed review fees are retained; no generation charge or refund is invented. Expired admission cannot generate an image even when the original caller returns late. Admin displays pending review charges as pending rather than zero. In local development, ",[104,463,464],{},"?mock=1&case=workflow-review"," previews this state and the final explanation while retaining the first image and draft.",[101,467,468],{},"For enterprise Provider requests, image acceptance reserves usage; only final upstream success commits it. Provider saves the successful result before committing, then publishes task success after ledger confirmation. Lost responses recover the original operation through status, callbacks or the schedule, without generating again. Competing failure callbacks cannot cancel a saved success. Durable image delivery may still be pending after billing. Enterprise prices must use whole credits. Historical committed failures, orphan/fractional charges, permanent reservation denial and ambiguous upstream acceptance require separate reconciliation; existing committed invoices are not automatically cancelled.",[101,470,471,472,475,476,479,480,483],{},"Each message freezes its parameters, ordered references, dialogue model rates, and run limits. Provider operations use ",[104,473,474],{},"image-agent:run:\u003Crun-id>:image:\u003Csequence>","; transport retries and status reconciliation retain the original identity and API key. The browser reads durable progress through node10. ",[243,477,478],{},"Stop task"," revokes permission for further image work and retains results already accepted upstream; ",[243,481,482],{},"Resume task"," wakes the same run after reconnecting or adding credits. Scoped execution credentials are encrypted outside Workflow checkpoints, retained for at most one hour to settle accepted work, and cleared at terminal states. Rotated API keys cannot mutate an old run. Earlier messages retain their legacy execution path and identities.",[101,485,486,487,490],{},"For terminal runs or expired execution credentials, ",[243,488,489],{},"Reconcile existing results"," uses the authenticated original API key to query existing Provider operations, settle saved model responses, and restore missing activity records. It never starts inference, submits images, changes accepted limits, or restarts the run. Pending image counts and frozen unpaid credits remain visible until resolved. Failed runs retain their terminal status; recovered images appear in the conversation and library. Uncertain submissions remain unresolved without authoritative Provider evidence, and lost model responses cannot be reconstructed by this action. Concurrent settlement and response-loss tests verify one ledger operation and one usage record per saved model call.",[101,492,493],{},"Model quality determines how well edits preserve identity. Context uses the latest 24 messages and a bounded image catalog with visual references. Uploads and outputs use existing CDN/R2 delivery policy; authenticated history does not make public CDN URLs private. Chats with active Workflow messages cannot be archived. Archiving completed chats hides their history and library entries without deleting files. Recent chats, conversation history, and library reads are bounded at 100 records. Local authenticated start/events/resume/reconcile and Workerd restart tests use controlled model, Provider, and ledger substitutes. Admin browser tests cover desktop/mobile light/dark layouts, policy saves, permissions, filtering, and run controls with controlled Agent responses. Recovery browser tests cover pending results, partial settlement followed by an error, retry, and desktop/mobile light/dark layouts. Annotation tests cover editing, source/guide separation, save/reopen, touch input, cancellation, and transport retries. Real provider validation, complete source lineage, durable-media guarantees, and the release audit remain required before production release.",[101,495,496,497,500,501,504,505,508],{},"New Workflow runs also require Provider migration ",[104,498,499],{},"0027_required_image_delivery.sql",". Configure file transfer with an enabled R2 destination, a public base URL that serves that actual bucket, allowed upstream HTTPS origins, and rules selecting images from the mapped response. Provider currently binds the ",[104,502,503],{},"zship-provider1"," bucket; an unrelated CDN bucket cannot serve its objects. Missing storage configuration blocks authorization before model inference. When generation finishes but copying is pending, the timeline shows ",[243,506,507],{},"Saving generated images",". Only fully saved results are delivered to the Agent. Storage retries retain the original task and fees, without generating again; terminal runs can continue delivery through reconciliation. Old accepted runs preserve their previous delivery policy. Complete historical source lineage, real configured inference, and release verification remain separate production requirements.",[510,511,513],"h3",{"id":512},"reference-media","Reference media",[101,515,516,517,520,521,524,525,528,529,532,533,536,537,540,541,544],{},"Live image links are copied before entering the reference list. Node10's ",[104,518,519],{},"IMAGE_AGENT_MEDIA"," R2 binding uses the existing ",[104,522,523],{},"zship-cdn"," bucket, under ",[104,526,527],{},"image-agent/references/",". Set ",[104,530,531],{},"IMAGE_AGENT_MEDIA_PUBLIC_URL"," to a public address that serves this bucket. For Node6's Worker file route, include ",[104,534,535],{},"/file"," in the base; a direct R2 custom domain uses its root. Both Workers must bind the same bucket. Set ",[104,538,539],{},"IMAGE_AGENT_MEDIA_ALLOWED_ORIGINS"," to a JSON array of trusted HTTPS origins, such as ",[104,542,543],{},"[\"https://images.example.com\"]","; the public media origin is also allowed. Up to 32 explicit origins are supported. The importer checks every redirect, never forwards user credentials, and limits downloads to 20 seconds, 10 MB and 32 million pixels. Supported formats are PNG, JPEG, WebP, GIF and AVIF. Model input support still depends on the selected upstream model.",[101,546,547,371,550,553],{},[104,548,549],{},"POST /ai/image-agent/media/import",[104,551,552],{},"GET /ai/image-agent/media/:id/content"," use normal Node1 API-key authentication and app/account ownership. D1 freezes each imported source identity and manifest. Conditional R2 writes let a retry recover already copied bytes after a lost checkpoint or an expired upstream URL. Original signed URLs are represented by hashes in the manifest storage and object metadata. Limits are 30 new import records per hour, 500 records per account/application, and two simultaneous transfers; failed records count toward the limits. A repeated source reuses its existing snapshot. Public result URLs still follow the platform's public CDN policy.",[101,555,556],{},"The link panel retains the URL on failure, supports cancellation, and continues an import when closed. The editor reads stored bytes through Nuxt's authenticated same-origin proxy. New Workflow runs also copy every image in their bounded catalog and its associated annotation guides before model inference. This covers the latest 48 catalog entries plus current attachments, using the latest 24 messages. The activity timeline shows reference preparation. Each import has a recoverable checkpoint; a separate immutable D1 context freezes managed URLs, catalog IDs and attachment order. Storage failure or cancellation prevents new inference and image submission. The same import quotas and source allowlist apply to background imports, including legacy images that have never been copied.",[101,558,559],{},"Historical guides become visible when the Agent inspects their clean source, labeled as past context. Guides never enter the editing tool's source catalog. Existing accepted runs retain their original replay behavior, and original message records are not rewritten. History, library and task reads project known references, guides and outputs to their saved URLs. Files that expired before any successful import cannot be recovered from a URL alone. Local checks cover actual Nuxt, node10, Node1, D1 and R2 using a public ZShip image. Controlled Workerd checks additionally verify reference/guide storage and frozen context across runtime restart, without paid inference.",[510,561,563],{"id":562},"image-versions","Image Versions",[101,565,566,567,570,571,574,575,578,579,582],{},"Workflow results retain their run, operation and image IDs across later edits. Optional ordered ",[104,568,569],{},"reference_ids"," bind each selected version to its URL and owner when accepting a message; the field is immutable. New contexts assign stable media IDs to uploaded references, while generated versions retain their operation IDs. ",[104,572,573],{},"GET /ai/image-agent/versions/:id"," returns a version and its ordered sources using existing immutable operation records. The Nuxt preview exposes ",[243,576,577],{},"Source images"," and supports following parents, including compositions with multiple sources. The ",[104,580,581],{},"composition"," mock demonstrates this without uploading or generating images.",[101,584,585],{},"Archiving hides conversations and library entries; owned image provenance remains readable for existing references. Older Workflow source IDs are resolved through their accepted catalog where possible. Legacy client-synchronized tasks lack authoritative operation records, and are not presented as verified Workflow provenance. Real configured model/provider validation and the release audit remain required.",[510,587,589],{"id":588},"local-mock-cases","Local mock cases",[101,591,592,593,596,597,600,601,410],{},"In ",[104,594,595],{},"nuxt dev",", open ",[104,598,599],{},"/dashboard/image-agent?mock=1",". The case menu includes single-image success, multi-turn edits (the default), multiple outputs, pending generation, failed generation, interrupted submission, an empty result, insufficient credits, and a new conversation. A case can also be linked directly, for example ",[104,602,603],{},"?mock=1&case=failed",[101,605,606,607,609,610,613,614,617],{},"Mock conversations, models, credits, uploads, and task responses stay in the page instance. Generation, billing, Turnstile, and CDN upload APIs are not called; ordinary app authentication checks may still run. Uploaded references use browser object URLs. Sending creates a pending task that completes on the next poll; ",[243,608,482],{}," resolves the seeded pending case, and ",[243,611,612],{},"Try again"," restores a failed request for resubmission. Rename, archive, library, preview, and download work with the sample records. Reloading or switching cases resets the sample data. The images are bundled demo fixtures, not responses from an AI model. Production builds ignore ",[104,615,616],{},"mock=1"," and retain normal authentication and generation.",[101,619,620,621,273,624,273,627,273,630,273,633,273,636,273,639,273,642,273,645,273,648,273,651,273,654,273,657,273,660,410],{},"Case values: ",[104,622,623],{},"success",[104,625,626],{},"edits",[104,628,629],{},"annotated",[104,631,632],{},"multiple",[104,634,635],{},"pending",[104,637,638],{},"failed",[104,640,641],{},"prepared",[104,643,644],{},"no-output",[104,646,647],{},"insufficient",[104,649,650],{},"empty",[104,652,653],{},"clarify",[104,655,656],{},"discussion",[104,658,659],{},"planning",[104,661,662],{},"agent-error",[101,664,665,667],{},[104,666,629],{}," includes an original portrait, a background guide with editable rectangle/arrow marks, notes, and a sample warmer result. Selecting the original as a reference restores the saved guide for further annotation. The editing tool retains the clean original as its reference.",[101,669,670,671,273,674,273,677,273,680,342,683,686,687,689,690,693],{},"Workflow cases: ",[104,672,673],{},"workflow",[104,675,676],{},"workflow-delivery",[104,678,679],{},"workflow-credits",[104,681,682],{},"workflow-completed",[104,684,685],{},"workflow-cancelled",". They show the shared activity timeline, intermediate results, saving generated images, stop controls, and waiting for credits. ",[243,688,482],{}," completes the running fixture; the credit-waiting fixture requires ",[243,691,692],{},"Add demo credits"," first. Cancelling preserves the first image. These cases simulate task states locally and do not start Cloudflare Workflows.",[101,695,696,699,700,702],{},[104,697,698],{},"workflow-recovery"," starts with an interrupted run, one retained image, one unresolved image, and one unpaid demo credit. ",[243,701,489],{}," restores the second image and activity record, settles the demo credit once, and leaves the original run failed. It does not start another generation.",[101,704,705,708,709,711],{},[104,706,707],{},"workflow-refund"," shows a failed revision waiting for its image refund. ",[243,710,482],{}," confirms the simulated refund, retains the first image, and finishes the run as failed with an explanatory reply. It returns 4 demo image credits and charges 1 demo credit for that final reply exactly once.",[101,713,714,715,717,718,720,721,371,723,725],{},"The ",[104,716,653],{}," case shows a follow-up question; the next message proceeds to a demo image task. The ",[104,719,656],{}," case answers with text and does not generate another image. ",[104,722,659],{},[104,724,662],{}," can be resumed through the reply controls. These are deterministic fixtures, not local LLM inference. A new mock conversation response uses 1 demo credit, in addition to any demo image charge.",[101,727,193,728,731,732,734],{},[104,729,730],{},"?mock=1&case=insufficient"," to see the balance warning above the composer. It shows a balance of 0 and the selected model's estimated cost. ",[243,733,692],{}," adds 240 local credits, preserves the draft, and lets generation continue without a payment request. In live mode, the warning links to pricing in a new tab and offers a balance refresh; rejected submissions retain the draft.",[137,736,738],{"id":737},"what-product-teams-should-avoid","What product teams should avoid",[109,740,741,744,747],{},[112,742,743],{},"Do not ask first-time users to paste a manual API key before they understand the product.",[112,745,746],{},"Do not collapse Chat and structured generation into competing interfaces; keep each entry point tied to a distinct job.",[112,748,749],{},"Do not separate credits, AI generation, and account state into unrelated pages without a guided default path.",{"title":751,"searchDepth":752,"depth":752,"links":753},"",2,[754,755,756,762],{"id":139,"depth":752,"text":140},{"id":176,"depth":752,"text":177},{"id":211,"depth":752,"text":212,"children":757},[758,760,761],{"id":512,"depth":759,"text":513},3,{"id":562,"depth":759,"text":563},{"id":588,"depth":759,"text":589},{"id":737,"depth":752,"text":738},"md",{},true,{"title":34,"description":35},"docs/ai-playground","AKGaEyDSCYuToYVTFJvSykTNAYaIzdRwYRzCdA6pZfM",{"id":770,"title":79,"body":771,"description":80,"extension":763,"label":79,"meta":1268,"navigation":765,"order":36,"path":33,"seo":1269,"stem":767,"__hash__":1270},"docsZh/docs/ai-playground.md",{"type":98,"value":772,"toc":1258},[773,778,800,803,806,829,835,838,866,870,882,885,888,891,894,897,900,903,935,956,965,968,990,999,1005,1011,1020,1026,1034,1040,1046,1052,1055,1061,1064,1070,1073,1076,1085,1088,1112,1119,1122,1125,1128,1140,1143,1147,1158,1164,1196,1201,1215,1220,1225,1238,1244,1247],[101,774,775,777],{},[104,776,106],{}," 现在提供完整的 AI 工作区，而不是把所有任务都导向一个 Playground：",[109,779,780,785,790,795],{},[112,781,782,784],{},[104,783,116],{}," 是正式的持久化对话产品面，支持历史记录与多轮续聊",[112,786,787,789],{},[104,788,122],{}," 是 AI 创作室，承载图像、视频、音频等结构化生成流程",[112,791,792,794],{},[104,793,128],{}," 是对话式图片编辑工作台，包含持久化对话、参考图、生成历史、素材库与版本预览",[112,796,797,799],{},[104,798,134],{}," 合并对话与 Provider 生成用量，覆盖图片、视频、音频、请求、Token、积分、每日活动和模型明细",[137,801,802],{"id":802},"为什么要统一到这里",[101,804,805],{},"这些产品面共用同一套会话生命周期，因此都能理解：",[109,807,808,811,814,817,820,823,826],{},[112,809,810],{},"当前登录状态",[112,812,813],{},"访客会话",[112,815,816],{},"当前积分余额",[112,818,819],{},"API Key 生命周期",[112,821,822],{},"对话与生成记录",[112,824,825],{},"模型差异化输入",[112,827,828],{},"按用户隔离的用量与计费数据",[101,830,831,832,834],{},"站长可以继续使用原生 Workers AI Binding，也可以在管理端 AI 上游配置中填写任意 HTTPS OpenAI 兼容 Base URL 与 API Key。凭证只保存在 ",[104,833,172],{}," 服务端，用户只能看到已启用模型，不会接触上游密钥。",[137,836,837],{"id":837},"推荐的用户路径",[179,839,840,849,857,860],{},[112,841,842,843,845,846,848],{},"从 ",[104,844,186],{}," 或 ",[104,847,190],{}," 进入",[112,850,851,852,854,855],{},"对话任务进入 ",[104,853,116],{},"，生成任务进入 ",[104,856,122],{},[112,858,859],{},"继续历史对话或完成第一次生成",[112,861,862,863,865],{},"在 ",[104,864,134],{}," 查看消耗，再按需升级正式账户或更高套餐",[137,867,869],{"id":868},"image-agent-接入","Image Agent 接入",[101,871,872,873,875,876,878,879,881],{},"目前仅 Nuxt 模板接入。",[104,874,222],{}," 中的 ",[104,877,218],{}," 控制导航入口；页面与 API 均位于 ",[104,880,226],{},"，其他前端模板不受影响。",[101,883,884],{},"重新打开对话会恢复最近使用的图片模型与生成设置；如果原模型已经不可用，需要先选择可用模型再发送下一条消息。后台进度更新会保留当前模型选择。",[101,886,887],{},"输入区的图片附件面板支持文件选择、拖拽、剪贴板图片、HTTPS 图片链接和素材库多选。每条消息最多添加 16 张图片，显示缩略图与顺序编号，可预览、移除或清空。即使所选图片模型不支持编辑，或每次只接受较少的参考图，Agent 仍可查看这些对话附件；真正执行图片工具时，仍遵守该模型的能力与参考图数量限制。文件上传复用平台 CDN 上传组件，支持进度、取消和失败重试，接受单张最大 10 MB 的 PNG、JPEG、WebP、GIF、AVIF。Mock 使用相同界面和校验，文件仅保留在浏览器内，不请求 CDN。",[101,889,890],{},"没有上传图片或补齐出图设置时，也可以先讨论创意。所选图片模型与设置用于 Agent 生成和编辑图片，不会阻止纯文字讨论或看图分析。上传图片作为对话上下文保存，Agent 在每次图片操作中选择符合模型限制的来源图。",[101,892,893],{},"助手回复和执行记录支持 Markdown 标题、强调、列表、表格和代码块。小屏幕上的宽表格、代码块在消息内横向滚动。模型返回的 HTML 按普通文字展示，回复不会加载 Markdown 中的图片链接；生成图片与参考图通过已保存的任务记录展示。HTTP(S) 链接会单独打开。",[101,895,896],{},"参考图缩略图和图片预览中的“标注图片”可打开编辑器，支持画笔、箭头、矩形、椭圆、文字、颜色、粗细、移动、撤销重做和修改备注。每条消息最多包含四张已标注原图，每张最多 64 个标记和 1,000 字备注。合成的 PNG 指引图通过共用 CDN 上传，原图、指引图、可编辑的归一化标记和备注一起随消息保存。Agent 同时查看原图与指引图，图片编辑工具只使用不含标记的原图。保存后可重新打开并继续修改标记。真实模式先将原图导入参考图存储，再通过鉴权同源接口读取，因此编辑器不依赖第三方浏览器 CORS。来源须符合导入策略，并在首次转存成功前保持可访问；无法读取或超过大小上限时显示重试状态。导出指引图的最长边不超过 2,048 像素。",[101,898,899],{},"Agent 可将下一次视觉查看聚焦到单张图片，也可按所选顺序对比多张图片。其他版本仍保留在对话中，可再次查看，但不会混入聚焦预览。标注指引会随对应原图一起提供。这有助于在多个版本容易混淆时单独复核细节，但不保证模型判断必然正确。查看会消耗模型步骤与 token，不会执行图片生成操作。",[101,901,902],{},"新任务在出图后会先检查最新返回的图片，同一步产生的多张结果一起复核。原图和旧版本仍可主动选中进行对比；再次编辑后，重新检查本次输出。已接收任务在恢复时继续使用原有复核策略。",[101,904,905,906,908,909,911,912,914,915,917,918,920,921,923,924,926,927,929,930,923,932,934],{},"现有 node10 Worker 导出 Image Agent 的 Cloudflare Workflow。应用 Node1 截至 ",[104,907,252],{},"、企业账单服务截至 ",[104,910,256],{},"、Provider1 截至 ",[104,913,260],{},"、node10 截至 ",[104,916,264],{}," 的迁移，先发布 Node1 和企业账单服务，再按 Provider1、node10、Nuxt 的顺序发布。本地使用各服务的 ",[104,919,268],{}," 脚本。node10 需要 ",[104,922,272],{},"、",[104,925,276],{}," 绑定，以及独立的 ",[104,928,280],{}," Secret，值为 32 字节随机数编码成的 64 位十六进制字符串。前端沿用已有 ",[104,931,284],{},[104,933,276],{}," 和 CDN 服务连接。图片 Provider 应配置公开模型信息、提示词字段和参考图字段，模型校验规则决定出图设置与工具可用的参考图数量。继续沿用 Provider 的 Turnstile、权限、内容审核、积分、退款和任务状态机制。",[101,936,937,938,940,941,943,944,946,947,949,950,952,953,955],{},"Cloudflare 环境中的 Admin AI 代理需要 ",[104,939,293],{}," 验证管理员，并通过 ",[104,942,284],{}," 调用 Agent。Nuxt Image Agent 代理需要 ",[104,945,284],{},"，旧式图片提交还需要 ",[104,948,276],{},"。绑定缺失或失败时直接返回错误，不改走 HTTP 地址重试，包括写入可能已提交但响应丢失的情况。非 Cloudflare 本地开发继续使用配置的 HTTP 服务。可运行 ",[104,951,306],{}," 验证编译后的 Admin API 与实际本地服务绑定，并运行 ",[104,954,310],{}," 检查 Nuxt 代理回归。这些检查不调用模型，也不替代远端部署验证。",[101,957,958,959,961,962,964],{},"共用 Nuxt 认证代理与 CDN 上传代理在 Cloudflare 环境中同样要求对应服务绑定。密码登录、刷新、Google 和 GitHub 登录不会在绑定响应丢失后改走 HTTP 重发。鉴权服务不可用时保留原会话 Cookie，但响应丢失仍可能意味着上游已轮换刷新凭据。",[104,960,317],{}," 构建 Nuxt API 并连接实际本地平台服务，检查生成、编辑、冷恢复、登录、刷新、上传与鉴权媒体读取。模型推理使用受控响应，测试存储为临时数据。追加 ",[104,963,321],{}," 可在检查通过后启动编译后的完整页面与静态资源；测试账户、媒体路由和清理方式见 Node10 README。实际 OAuth 供应商、公开媒体域名和云端部署仍需单独验证。",[101,966,967],{},"模板会将当前 Nuxt 层、应用清单和 UI 默认配置中使用的 Lucide、Simple Icons 字面量图标打入客户端包，生产构建中的上传控件、模型选择器和导航可直接显示这些图标。运行时动态提供的自定义图标名称仍需显式配置打包。",[101,969,970,971,974,975,978,979,981,982,923,984,986,987,989],{},"在 Admin 的 ",[243,972,973],{},"AI Gateway > 图片 Agent"," 中配置对话模型、新任务开关与全局额度，也可直接访问 ",[104,976,977],{},"/zh-CN/ai?tab=image-agent","。请选择已启用、Token 定价有效且支持视觉输入和工具调用的模型；模型列表本身不证明其视觉或工具调用质量。这个对话模型与输入区选择的图片模型相互独立，沿用现有 Workers AI 或 OpenAI 兼容网关。保存通过 ",[104,980,349],{}," 一次写入 ",[104,983,338],{},[104,985,341],{}," 和 ",[104,988,345],{},"。已存策略无效时会禁止新任务，可在此页面修复。未配置对话模型时，真实提交会显示图片助手暂不可用；本地 Mock 仍可体验。",[101,991,992,993,995,996,998],{},"管理页可按应用、完整邮箱和状态筛选任务。“需要处理”包含失败任务、等待积分、待付模型费用和图片状态待核实的记录。详情展示固定额度、模型用量、图片操作和事件类型，不返回提示词、凭据、图片 URL 或 Provider 原始响应。",[104,994,360],{}," 可查看诊断，",[104,997,364],{}," 可保存配置、停止和恢复任务。首次验证须由用户完成；当前恢复功能要求任务未结束，且保留的凭据未过期。关闭新任务不会阻止已接受操作继续结算。",[101,1000,1001,1002,1004],{},"“回复 Token 上限”和“推理强度”配置对话模型，与图片生成参数相互独立。默认每次调用最多输出 1600 Token，推理强度跟随上游默认值。输出上限可设为 256–8192；上游将推理 Token 计入输出用量时，二者共用此额度。仅在上游支持时指定推理强度。保存时在同一策略事务中写入 ",[104,1003,378],{},"，新任务会固定这些参数，之后修改配置不会改变已接受的任务。提高上限可能增加费用和等待时间。",[101,1006,1007,1008,1010],{},"Admin 图片 Agent 页的“测试模型”通过 Agent 使用的同一套模型适配器，检查图片识别、结构化工具调用和工具结果回传。可以使用当前推理参数测试所选模型而不保存策略；最多调用两次模型，关闭自动重试，上游请求超时与实际 Agent 调用一致，为 120 秒。测试可能产生上游模型用量，但不生成图片、不扣用户积分，仅 ",[104,1009,364],{}," 权限可执行。运行依赖中的“已配置”不代表连接已验证。结果只保留在当前页面，修改模型或推理参数、刷新后清除；这是基础连接与能力检查，不替代实际图片质量验证，也不是持久化的发布批准。本地 Workers AI 绑定仍需具备身份认证的远程推理能力才能通过。",[101,1012,1013,1014,1016,1017,1019],{},"“测试媒体”单独验证参考图存储链路：向配置的 R2 桶写入随机小 PNG，经公开地址核对原始字节后删除测试对象。页面分别显示写入、公开读取和清理结果，并提供失败处理提示。操作需要 Provider 写权限，会产生少量 R2 请求，但不调用模型、不生成图片、不扣用户积分，也不创建用户媒体记录。通过只代表当时 Worker 能访问参考图公开地址；图片 Provider 的交付、模型端访问和视觉质量仍需单独验证。刷新页面会清除结果。Node6 遵守对象缓存策略，诊断文件使用 ",[104,1015,398],{},"。可为 ",[104,1018,402],{}," 配置较短的 R2 生命周期规则，以清理测试中断遗留的文件。",[101,1021,1022,1023,1025],{},"Agent 回复达到输出上限时，会在执行该条截断回复中的工具调用之前停止任务，保留并结算真实模型用量。此前步骤已生成的图片仍可查看和继续编辑，界面会明确说明回复未完成，可以发送新消息继续。本地可用 ",[104,1024,409],{}," 体验此状态。",[101,1027,1028,1029,845,1031,1033],{},"AI SDK Agent 可以直接回答或追问、查看对话图片，并执行 ",[104,1030,416],{},[104,1032,419],{},"。Workflow 等待 Provider 完成后将实际图片结果交回模型，由模型决定结束或在额度内继续调整。图片工具保留用户所选 Provider、模型和设置，来源 ID 只能解析到当前对话图片和本次附件。执行过程展示持久化的步骤和中间图片。纯文字回复不会创建图片任务，也不会显示“没有返回图片”的错误。",[101,1035,1036,1037,1039],{},"对话按所配置模型的 Token 费率单独计费。新调用的正费用按整积分向上取整，与 Node1 账本一致：计算费用为 0.14 积分时实际扣 1 积分，免费模型仍不收费。每步回复和准确的应付金额先保存，再以 ",[104,1038,432],{}," 作为 Node1 操作键扣费；新付费任务的余额和预算均至少为 1 积分，D1 在剩余额度不足 1 积分时阻止下一次模型调用。结算重试复用原金额，不重复已完成的推理，未结算的回复不会展示。已结算模型调用按任务和步骤生成唯一的平台用量记录，包含 Token 数和已付积分；Image Agent 消息不会混入普通 AI Chat 历史。默认上限为六个模型步骤、两次图片操作、100 积分和 30 分钟；服务端绝对上限为八步、三次图片操作、1,000 积分和 30 分钟。Admin 可为新任务设置更低上限，已接受任务保留原额度；输入区的积分和操作次数会限制在已配置范围内。图片生成失败沿用 Provider 的退款规则，不退还已完成的对话费用。",[101,1041,1042,1043,1045],{},"新快照固定计费版本 1。此前已接受的快照和已保存的旧回复保留原金额，重试时不会重新定价。历史小数扣费无法在当前仅支持整数的 Node1 账本结算；如待发布环境存在这类记录，须先明确核对账务。",[104,1044,439],{}," 使用实际 node10、Provider1、Node1 Worker 和独立临时 D1/R2 数据执行平台检查，仅外部模型响应受控。",[101,1047,1048,1049,1051],{},"对于已经保存的图片任务，Provider 会先固定失败结果和生成退款金额，再调用 Node1。退款失败或退款响应丢失时保留待处理状态，通过状态查询、已认证回调或 Provider 的五分钟定时恢复任务重试。各路径复用 ",[104,1050,446],{},"，保留已收取的审核费用。Agent 显示“正在退回图片积分”，确认结算后才继续最终回复，不重复失败的图片操作。图片操作失败会让整轮任务保留失败状态，同时保留解释文字和此前成功的图片；已完成的对话用量仍然计费。没有固定退款记录的历史失败需要单独核对账务。",[101,1053,1054],{},"新 Provider 任务与固定生成价格先入库，再处理生成扣费。未确认付款的任务不能提交图片；扣费结果不明或支付准入超过两分钟时，会取消原扣费键，仅退回已确认扣除的部分，Node1 阻止该键后续的新扣款。恢复保留原任务 ID，不提交替代图片。企业用量预约通过原身份取消。审核费用仍先于任务创建处理，取得提交资格后上游是否已接单不明，也与尚未提交的支付故障分别处理。",[101,1056,1057,1058,1060],{},"内容审核在扣费前保存审核结果与固定价格，涵盖图片任务创建前就中止的请求。扣费确认丢失时，Agent 显示“正在确认内容审核费用”，等待 Provider 定时恢复原计费操作并更新审核记录。已完成的审核仍收取审核费，不会虚构生成扣费或退款。生成准入过期后，即使旧请求迟到返回也不能生成图片。Admin 将待确认费用单独标记，不显示为零。本地可通过 ",[104,1059,464],{}," 查看待确认状态与最终说明，第一版图片和草稿都会保留。",[101,1062,1063],{},"企业 Provider 请求在图片接单时仅预约用量，上游最终成功后才提交费用。Provider 先保存成功结果，账本确认后才发布任务成功；响应丢失时通过状态查询、回调或定时任务恢复原操作，不重新生成。竞争的失败回调不能取消已保存的成功，图片转存可在计费后继续等待。企业生成与审核价格均须使用整数积分。历史已提交但生成失败的账单、孤立或小数扣费、永久预约拒绝、上游接单结果不明仍需单独核账，不自动取消已提交账单。",[101,1065,1066,1067,1069],{},"每条消息固定生成参数、有顺序的参考图、对话模型费率和运行额度。Provider 操作键为 ",[104,1068,474],{},"，网络重试和状态核对复用原身份及 API Key。浏览器通过 node10 查询持久化进度。“停止任务”撤销继续生成的授权，并保留上游已接受任务的结果；断线或补充积分后，“恢复任务”唤醒同一个后台任务。执行凭据按账号与应用加密保存在 Workflow 检查点之外，最长保留一小时用于核对已接受操作，结束后清除。切换 API Key 后不能修改旧任务。此前保存的消息仍沿用原执行路径和操作键。",[101,1071,1072],{},"任务已结束或执行凭据过期后，“核对已有结果”使用当前登录账号的原 API Key 查询原 Provider 操作、结算已保存模型回复，并补齐缺失的执行记录。它不启动推理、不提交图片、不修改原额度，也不重启任务。界面显示待核对图片数量和固定的待付积分，直至核对完成。失败任务保留原终态，恢复出的图片可在对话与素材库中使用。缺少 Provider 明确证据的提交继续标为待核实；丢失的模型响应不能由此操作重建。并发结算和响应丢失测试验证每个已保存模型调用只对应一笔账本操作和一条用量记录。",[101,1074,1075],{},"人物与产品的一致性取决于所选模型。上下文使用最近 24 轮消息和有数量上限的图片目录，包含视觉参考图。上传和生成结果沿用现有 CDN/R2 分发策略，对话鉴权不代表公开 CDN URL 自动成为私有文件。存在运行中 Workflow 消息的对话不能归档；归档已完成对话会隐藏历史和素材条目，不删除文件。最近对话、对话历史和素材库读取分别限制为 100 条记录。本地认证启动、事件、恢复、核对接口及 Workerd 重启测试使用受控模型、Provider 和账本替身。Admin 浏览器测试使用受控 Agent 响应，覆盖桌面和手机明暗主题、配置保存、权限、筛选与任务操作。核对界面测试覆盖等待结果、部分结算后报错、再次核对及桌面和手机明暗主题。标注验证覆盖编辑、原图与指引图分离、保存重开、触屏、取消与上传重试。正式发布前仍需完成真实 Provider 验证、完整图片来源关系、持久化媒体保障，以及发布审计。",[101,1077,1078,1079,1081,1082,1084],{},"新建 Workflow 还需要 Provider 迁移 ",[104,1080,499],{},"。请开启文件转存，配置能实际读取目标桶的公开地址、允许下载的上游 HTTPS 来源域名，以及从映射后响应中选取图片的规则。Provider 当前绑定 ",[104,1083,503],{}," 桶，绑定其他桶的 CDN 入口不能读取这些结果。缺少存储配置时，会在对话模型运行前阻止授权。生成完成但图片仍在转存时，时间线显示“正在保存生成的图片”；只有全部保存成功后，结果才交给 Agent。文件重试保留原任务与费用，不重新生成；已结束任务可通过核对继续保存。此前已接受的任务保留原交付策略。完整历史来源关系、真实模型执行和发布验证仍是独立的上线要求。",[510,1086,1087],{"id":1087},"参考图存储",[101,1089,1090,1091,1093,1094,1096,1097,1099,1100,1102,1103,1105,1106,1108,1109,1111],{},"真实模式会先转存图片链接，再将其加入参考图。node10 的 ",[104,1092,519],{}," R2 绑定使用现有 ",[104,1095,523],{}," 桶，文件路径位于 ",[104,1098,527],{}," 下。",[104,1101,531],{}," 必须指向实际提供这个桶内容的公开地址。使用 Node6 Worker 的文件路由时，基础地址须包含 ",[104,1104,535],{},"；直接绑定 R2 的自定义域名使用根路径。两个 Worker 必须绑定同一个桶。",[104,1107,539],{}," 是允许下载的 HTTPS 来源 JSON 数组，例如 ",[104,1110,543],{},"，最多 32 个；公开存储地址的来源也默认允许。每次重定向都重新检查来源，不向第三方发送用户凭据。下载限时 20 秒，单图不超过 10 MB、3200 万像素，支持 PNG、JPEG、WebP、GIF 和 AVIF。实际模型可接收的图片格式仍由所选上游模型决定。",[101,1113,1114,986,1116,1118],{},[104,1115,549],{},[104,1117,552],{}," 沿用 Node1 API Key 鉴权，按应用与账户校验归属。D1 固定导入身份与文件清单，R2 使用条件写入；即使检查点保存失败或上游链接过期，重试也可恢复已保存的图片。存储记录和对象元数据仅保留原始签名链接的哈希。每个账户、应用每小时最多创建 30 条导入记录，总共 500 条，最多同时进行两次转存；失败记录也计入限额。重复链接沿用已保存的快照。公开图片地址仍遵循平台 CDN 的公开访问策略。",[101,1120,1121],{},"链接面板在失败时保留地址，支持取消，关闭面板后仍可继续导入。标注编辑器通过 Nuxt 的鉴权同源代理读取已保存字节。新建 Workflow 在调用模型前，也会转存有限图片目录中的全部图片及其标注指引：基于最近 24 轮消息，保留最近 48 个目录条目和当前附件。执行过程会显示参考图准备状态。每次导入有可恢复的检查点，独立且不可变的 D1 上下文固定存储地址、图片编号和附件顺序。存储失败或取消后不会开始模型调用或图片生成。后台转存沿用相同导入限额和来源白名单，包括此前尚未转存的旧图片。",[101,1123,1124],{},"Agent 查看历史原图时可同时查看标注指引，且明确标为过去的上下文；指引图不会进入编辑工具的原图目录。此前已接受的任务保持原来的重放行为，原始消息记录不会改写。历史、素材库和任务读取会将已保存的参考图、指引图和结果展示为存储地址。首次转存前就已过期的文件，无法仅凭链接恢复。本地验证覆盖真实 Nuxt、node10、Node1、D1、R2 和一张 ZShip 公开图片；受控 Workerd 测试还验证了参考图、指引图和固定上下文在服务重启后保持一致，未调用付费模型。",[510,1126,1127],{"id":1127},"图片版本",[101,1129,1130,1131,1133,1134,1136,1137,1139],{},"Workflow 结果在后续编辑中保留任务、操作和图片编号。可选的有序 ",[104,1132,569],{}," 在消息接受时校验每个版本对应的 URL 和账户归属，接受后不可修改。新上下文为上传参考图分配稳定的媒体编号，生成版本保留原操作编号。",[104,1135,573],{}," 根据现有不可变操作记录返回当前版本与有序来源。Nuxt 预览中的“来源图片”支持逐级查看父版本，也支持多张来源图合成；本地 ",[104,1138,581],{}," 案例可直接体验，不上传或调用模型。",[101,1141,1142],{},"归档会隐藏对话和素材库条目，已有引用仍可读取本账户的图片来源。早期 Workflow 的编号会尽可能通过已接受的目录还原；由旧客户端自行同步的任务缺少权威操作记录，不会冒充经过核实的 Workflow 来源。真实模型与 Provider 联调以及发布审计仍需完成。",[510,1144,1146],{"id":1145},"本地-mock-案例","本地 Mock 案例",[101,1148,862,1149,1151,1152,1154,1155,1157],{},[104,1150,595],{}," 中打开 ",[104,1153,599],{},"。页面案例菜单包含单张成功、多轮改图（默认）、一次返回多张、生成中、失败重试、中断后恢复、成功但无图片、积分不足和空白对话。也可以直接通过 ",[104,1156,603],{}," 分享具体案例。",[101,1159,1160,1161,1163],{},"Mock 对话、模型、积分、上传和任务响应仅存在于当前页面实例中，不调用生成、扣费、Turnstile 或 CDN 上传接口；应用原有的登录状态检查仍可能执行。上传参考图使用浏览器对象 URL。发送后先显示生成中，下次轮询返回图片；“恢复任务”可完成预置的生成中案例，“重试”可恢复失败请求并重新提交。重命名、归档、素材库、预览和下载均可操作样例记录。刷新或切换案例会重置数据。图片是随模板提供的演示素材，不是模型实际生成结果。生产构建忽略 ",[104,1162,616],{},"，仍执行正常鉴权和生成流程。",[101,1165,1166,1167,923,1169,923,1171,923,1173,923,1175,923,1177,923,1179,923,1181,923,1183,923,1185,923,1187,923,1189,923,1191,923,1193,1195],{},"案例参数：",[104,1168,623],{},[104,1170,626],{},[104,1172,629],{},[104,1174,632],{},[104,1176,635],{},[104,1178,638],{},[104,1180,641],{},[104,1182,644],{},[104,1184,647],{},[104,1186,650],{},[104,1188,653],{},[104,1190,656],{},[104,1192,659],{},[104,1194,662],{},"。",[101,1197,1198,1200],{},[104,1199,629],{}," 预置人像原图、带可编辑矩形和箭头的背景指引、修改备注及暖色结果样例。将原图用作参考图后可恢复已有标注继续修改，编辑工具仍以不含标记的原图作为参考。",[101,1202,1203,1204,923,1206,923,1208,923,1210,923,1212,1214],{},"后台任务案例：",[104,1205,673],{},[104,1207,676],{},[104,1209,679],{},[104,1211,682],{},[104,1213,685],{},"，展示同一套执行过程、中间图片、生成结果保存中、停止和积分等待界面。运行中案例点击“恢复任务”后完成；等待积分案例需要先“补充模拟积分”。停止后保留第一版图片。这些案例仅在本地模拟任务状态，不启动 Cloudflare Workflow。",[101,1216,1217,1219],{},[104,1218,698],{}," 预置一个已中断任务，保留第一张图，另有一张图片待核对和 1 模拟积分待结算。“核对已有结果”补回第二张图及执行记录，仅结算一次模拟积分，原任务仍保留失败终态，不发起新生成。",[101,1221,1222,1224],{},[104,1223,707],{}," 展示图片调整失败后等待退款的过程。点击“恢复任务”会确认模拟退款，保留第一张图片，并以失败状态结束任务、展示解释回复。此过程仅退回一次 4 模拟图片积分，并收取一次最终回复的 1 模拟积分。",[101,1226,1227,1229,1230,1232,1233,986,1235,1237],{},[104,1228,653],{}," 展示追问，补充下一条消息后进入演示图片任务；",[104,1231,656],{}," 只返回文字，不生成新图片；",[104,1234,659],{},[104,1236,662],{}," 可通过回复操作恢复。这些是固定案例数据，不是本地大模型推理。新一轮 Mock 对话消耗 1 模拟积分，图片任务另按演示模型计费。",[101,1239,1240,1241,1243],{},"通过 ",[104,1242,730],{}," 可直接查看输入区上方的积分不足提示，显示当前余额 0 和所选模型的预计消耗。点击“补充模拟积分”会增加 240 本地积分，保留草稿并允许继续生成，不会发起支付请求。真实模式提供新标签页打开价格页面和刷新余额的入口；提交被拒绝时保留草稿。",[137,1245,1246],{"id":1246},"产品上应避免的做法",[109,1248,1249,1252,1255],{},[112,1250,1251],{},"不要在用户还没理解产品前，就先要求他们粘贴手动 API Key",[112,1253,1254],{},"不要把 Chat 与结构化生成塞进语义重复的界面；每个入口应对应明确任务",[112,1256,1257],{},"不要把积分、AI 生成与账户状态拆成彼此孤立的页面，却又没有默认引导路径",{"title":751,"searchDepth":752,"depth":752,"links":1259},[1260,1261,1262,1267],{"id":802,"depth":752,"text":802},{"id":837,"depth":752,"text":837},{"id":868,"depth":752,"text":869,"children":1263},[1264,1265,1266],{"id":1087,"depth":759,"text":1087},{"id":1127,"depth":759,"text":1127},{"id":1145,"depth":759,"text":1146},{"id":1246,"depth":752,"text":1246},{},{"title":79,"description":80},"jg6B7EQIIUPwNNsh5ILiZsUdKS2eeFZMajTqHEF3A8Q",{"code":1272,"data":1273},200,[],1791362210714]