-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser-manual.html
More file actions
548 lines (520 loc) · 29.8 KB
/
user-manual.html
File metadata and controls
548 lines (520 loc) · 29.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web2Comics User Manual</title>
<style>
:root {
--bg: #f8fafc;
--card: #ffffff;
--text: #0f172a;
--muted: #475569;
--border: #e2e8f0;
--accent: #2563eb;
--accent-soft: #dbeafe;
--ok: #166534;
--warn: #92400e;
--code: #0b1220;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
background: linear-gradient(180deg, #f8fafc, #eef2ff 60%, #f8fafc);
color: var(--text);
line-height: 1.5;
}
.layout {
max-width: 1100px;
margin: 0 auto;
padding: 24px;
display: grid;
grid-template-columns: 260px 1fr;
gap: 20px;
}
.toc {
position: sticky;
top: 16px;
align-self: start;
background: rgba(255,255,255,.9);
backdrop-filter: blur(8px);
border: 1px solid var(--border);
border-radius: 14px;
padding: 14px;
}
.toc h2 {
margin: 0 0 10px;
font-size: 14px;
text-transform: uppercase;
letter-spacing: .05em;
color: var(--muted);
}
.toc a {
display: block;
color: var(--text);
text-decoration: none;
padding: 6px 8px;
border-radius: 8px;
font-size: 14px;
}
.toc a:hover { background: var(--accent-soft); color: #1d4ed8; }
.content {
background: rgba(255,255,255,.85);
border: 1px solid var(--border);
border-radius: 18px;
padding: 24px;
}
h1, h2, h3 { line-height: 1.25; }
h1 { margin: 0 0 8px; font-size: 30px; }
h2 {
margin-top: 28px;
padding-top: 18px;
border-top: 1px solid var(--border);
font-size: 22px;
}
h3 { margin-top: 18px; font-size: 16px; }
p, li { color: var(--text); }
.lead { color: var(--muted); margin: 0 0 12px; }
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 14px;
margin: 12px 0;
}
.grid-2 {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.tag {
display: inline-block;
background: var(--accent-soft);
color: #1d4ed8;
border-radius: 999px;
padding: 2px 8px;
font-size: 12px;
font-weight: 600;
margin-right: 6px;
}
code {
background: #eef2f7;
border: 1px solid var(--border);
border-radius: 6px;
padding: 1px 5px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 13px;
}
pre {
background: var(--code);
color: #e2e8f0;
border-radius: 12px;
padding: 12px;
overflow: auto;
border: 1px solid #1f2937;
}
a { color: var(--accent); }
.note, .warn {
border-radius: 12px;
padding: 12px;
margin: 12px 0;
border: 1px solid var(--border);
}
.note { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.warn { background: #fffbeb; color: var(--warn); border-color: #fcd34d; }
table {
width: 100%;
border-collapse: collapse;
margin: 12px 0;
font-size: 14px;
}
th, td {
border: 1px solid var(--border);
padding: 8px 10px;
vertical-align: top;
}
th { background: #f8fafc; text-align: left; }
@media (max-width: 900px) {
.layout { grid-template-columns: 1fr; }
.toc { position: static; }
.grid-2 { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="layout">
<nav class="toc" aria-label="Table of contents">
<h2>Manual Sections</h2>
<a href="#overview">Overview</a>
<a href="#popup-overview">Popup / Generator Wizard</a>
<a href="#popup-create">Create Comic (Popup)</a>
<a href="#popup-progress">Progress View</a>
<a href="#popup-history">Popup My Collection</a>
<a href="#options-overview">Options / Settings</a>
<a href="#options-general">Options: General</a>
<a href="#options-providers">Options: Providers</a>
<a href="#options-prompts">Options: Prompts</a>
<a href="#options-storage">Options: Storage</a>
<a href="#options-about">Options: About</a>
<a href="#sidepanel-overview">Comic Viewer (Side Panel)</a>
<a href="#sidepanel-comic-view">Side Panel: Comic View</a>
<a href="#sidepanel-generation-view">Side Panel: Generation View</a>
<a href="#sidepanel-history-browser">Side Panel: My Collection</a>
<a href="#appendix-keys">Appendix: API Keys</a>
<a href="#appendix-openai">OpenAI Key</a>
<a href="#appendix-gemini">Google Gemini Key</a>
<a href="#appendix-cloudflare">Cloudflare Workers AI</a>
<a href="#appendix-openrouter">OpenRouter Key</a>
<a href="#appendix-huggingface">Hugging Face Token</a>
</nav>
<main class="content">
<header id="overview">
<h1>Web2Comics User Manual</h1>
<p class="lead">Complete guide for configuring providers, generating comics, understanding the UI, and obtaining API credentials for supported providers.</p>
<p class="lead"><strong>Last updated:</strong> March 2026 (aligned with current extension behavior).</p>
<div class="note">
The extension uses <strong>Web2Comics</strong> as the product name across the popup, Options page, and comic viewer side panel.
</div>
</header>
<section>
<h2 id="popup-overview">Popup / Generator Wizard Overview</h2>
<p>The popup is the main entry point from the extension toolbar icon. It contains the action launcher, the comic generator wizard, progress view, and a lightweight history modal.</p>
<div class="grid-2">
<div class="card">
<h3>Launcher</h3>
<ul>
<li><strong>Create Comic</strong>: opens the generator wizard for the current page.</li>
<li><strong>My Collection</strong>: opens your saved comics list in the popup.</li>
</ul>
</div>
<div class="card">
<h3>Top-right buttons</h3>
<ul>
<li><strong>Settings</strong> (gear): opens the Options page.</li>
<li><strong>?</strong> help icon: opens this manual at the popup section.</li>
</ul>
</div>
</div>
<div class="card">
<h3>Right-click selection actions</h3>
<ul>
<li><strong>Generate comic from selected text (Default)</strong>: starts generation immediately using default settings.</li>
<li><strong>Open Create Comic with selected text</strong>: opens popup composer prefilled with your selected text so you can adjust options first.</li>
<li><strong>Toolbar context menu</strong> also provides quick actions (open composer / open collection) from the extension icon menu.</li>
</ul>
</div>
</section>
<section>
<h2 id="popup-create">Create Comic (Popup Generator Wizard)</h2>
<h3>Source Text</h3>
<ul>
<li><code>Auto (full page)</code>: extracts readable page content from the current tab.</li>
<li><code>My highlighted text</code>: uses text you selected on the page.</li>
<li><code>Re-scan</code>: retries extraction.</li>
<li><code>Extracted Source Text</code> preview: verify what is used for generation.</li>
<li><code>AI Input Preview</code>: first 1,000 chars that are sent to storyboard generation.</li>
<li><code>Article Section</code> dropdown: appears when multiple extraction candidates are available.</li>
</ul>
<h3>Customize</h3>
<table>
<tr><th>Control</th><th>Meaning</th></tr>
<tr><td>Comic Length</td><td>Number of comic panels to generate (3–12).</td></tr>
<tr><td>Story Goal</td><td>Objective preset (for example Summary, ELI5, Timeline, Meeting Recap).</td></tr>
<tr><td>Language</td><td>Output language for captions and narrative text.</td></tr>
<tr><td>AI Provider</td><td>Primary text/storyboard provider. Some providers are hidden until configured and validated.</td></tr>
<tr><td>Advanced Options</td><td>Shows narrative detail level, style presets, and custom style creation/selection.</td></tr>
<tr><td>Narrative Detail</td><td>Controls storyboard richness (low/medium/high).</td></tr>
<tr><td>Visual Style</td><td>Preset art direction or a custom saved style.</td></tr>
<tr><td>Custom (One-off)</td><td>Uses current custom-style defaults without creating a saved style entry.</td></tr>
<tr><td>Create New Style…</td><td>Opens a modal to enter style name + description, saves it, and adds it to the style list for future sessions.</td></tr>
</table>
<h3>Readiness and Generate</h3>
<ul>
<li>The wizard shows readiness chips for <strong>Content</strong>, <strong>Provider</strong>, and <strong>Generate</strong>.</li>
<li><strong>Grounding Confidence</strong> appears before generation with High/Medium/Low guidance and an <code>Auto-pick best story section</code> action.</li>
<li>The <code>Generate Comic</code> button is disabled until content and provider settings are ready.</li>
<li>The readiness box explains what to fix and can provide a <code>Fix next step</code> shortcut.</li>
<li>When full-page extraction fails, selection fallback guidance is shown with quick actions (<code>Show Selection Hint</code>, <code>Retry Full Page</code>).</li>
</ul>
</section>
<section>
<h2 id="popup-progress">Popup Progress View</h2>
<p>After generation starts, Web2Comics can attempt to open the side panel while the popup shows progress (Chrome may block auto-open unless it is triggered by a direct user gesture).</p>
<ul>
<li><strong>Status text</strong>: current phase (storyboard or image rendering).</li>
<li><strong>Progress bar</strong>: panel-level completion progress.</li>
<li><strong>Panel progress list</strong>: per-panel statuses such as <code>Pending</code>, <code>Sent</code>, <code>Receiving</code>, <code>Rendering</code>, <code>Completed</code>.</li>
<li><strong>Debug progress log</strong> (when debug flag is enabled): prompt/response step entries.</li>
<li><strong>Cancel</strong>: requests cancellation of the current generation job.</li>
</ul>
</section>
<section>
<h2 id="popup-history">Popup My Collection</h2>
<p>The popup history modal is a quick-access list of previously generated comics.</p>
<ul>
<li>Shows recent items with thumbnails and source metadata.</li>
<li>Each item has an individual <strong>Delete</strong> action (with confirmation).</li>
<li>Useful when you want to reopen a comic quickly without opening the side panel browser.</li>
<li>The full browsing experience is available in the side panel <em>My Collection</em> view.</li>
</ul>
</section>
<section>
<h2 id="options-overview">Options / Settings Overview</h2>
<p>The Options page manages defaults, providers, prompt templates, local storage, and general extension information.</p>
<div class="warn">
Provider-dependent options in the popup may be hidden until the provider is configured and validated in the Options page.
</div>
</section>
<section>
<h2 id="options-general">Options: General</h2>
<h3>Generation Defaults</h3>
<ul>
<li><strong>Default Panel Count</strong>: starting value used in popup.</li>
<li><strong>Detail Level</strong>: default storyboard detail level.</li>
<li><strong>Default Output Language</strong>: default language used for captions and narrative text.</li>
<li><strong>Default Style</strong>: default art style preset or saved custom style for new generations.</li>
<li><strong>Custom Style Name / Description</strong>: shown when creating a new reusable custom style entry from Options.</li>
<li><strong>Caption Length</strong>: preferred caption length for generated panels.</li>
</ul>
<p>If you choose <code>Custom...</code> in <strong>Default Style</strong>, the inline custom-style editor appears with a <strong>Create Style</strong> button. After creating a style, it is selected in the list and the inline editor is hidden again.</p>
<p><strong>Free-tier-first default setup:</strong> Web2Comics starts with <strong>Google Gemini</strong> selected for both text and image generation (when eligible/configured), plus a low-cost default generation profile (fewer panels and lower detail) to maximize the chance that a first run succeeds on free-tier limits.</p>
<h3>Behavior</h3>
<ul>
<li><strong>Automatically open comic viewer after generation</strong>: attempts to open the side panel on completion (Chrome may block auto-open without a user gesture).</li>
<li><strong>Enable character consistency mode</strong>: provider hint to keep characters visually consistent across panels.</li>
<li><strong>Debug flag</strong>: shows detailed provider/panel errors and enables richer local debugging behavior.</li>
</ul>
<h3>Image Generation → Content Filtering Handling</h3>
<p>Controls what happens when an image provider blocks a panel prompt.</p>
<table>
<tr><th>Mode</th><th>Behavior</th></tr>
<tr><td><code>rewrite_and_retry</code></td><td>Rewrites the prompt into a more neutral editorial framing and retries once.</td></tr>
<tr><td><code>replace_people_and_triggers</code></td><td>Replaces real-person names and sensitive trigger terms, then retries once.</td></tr>
<tr><td><code>show_blocked</code></td><td>No retry. A blocked placeholder panel is inserted so the comic still completes.</td></tr>
</table>
<ul>
<li><strong>Show "Rewritten" badge</strong>: marks panels that succeeded after a retry rewrite/sanitize pass.</li>
<li><strong>Log original + rewritten prompt locally</strong>: stores prompt details in local debug logs/panel metadata for troubleshooting.</li>
</ul>
</section>
<section>
<h2 id="options-providers">Options: Providers</h2>
<p>Configure and validate provider credentials. Web2Comics supports mixed-provider setups and provider-specific model selection for both text and image generation where available.</p>
<h3>Provider Cards</h3>
<ul>
<li><strong>Google Gemini</strong>: text + image generation.</li>
<li><strong>Cloudflare Workers AI</strong>: text + image generation (account-scoped auth).</li>
<li><strong>OpenRouter</strong>: text + image generation (image support depends on your OpenRouter account/model availability and may route/fallback to a different backend model).</li>
<li><strong>Hugging Face Inference API</strong>: text + image generation (chat for text, <code>hf-inference</code> image tasks for images).</li>
<li><strong>OpenAI</strong>: text + image generation (GPT + DALL-E).</li>
</ul>
<h3>Validation</h3>
<ul>
<li>Use each provider card’s <strong>Validate</strong> button after entering credentials (buttons show a spinner while waiting).</li>
<li>Web2Comics persists provider validation state in local storage and uses it to gate popup provider visibility/readiness.</li>
<li>If a selected provider fails due to quota/budget/billing limits during generation, Web2Comics can automatically fall back to other configured providers (free-tier-first) for text and/or image generation.</li>
<li>Google Gemini is the default first-run provider because it can cover both text and image generation with one key, but free-tier availability depends on Google account/project eligibility and region.</li>
</ul>
<h3>OpenAI Model / Speed Controls</h3>
<table>
<tr><th>Control</th><th>Purpose</th></tr>
<tr><td>Text Model</td><td>Selects GPT model for storyboard generation.</td></tr>
<tr><td>Image Model</td><td>Selects DALL-E 2 / DALL-E 3 for panel image generation.</td></tr>
<tr><td>Image Quality</td><td><code>standard</code> is faster; <code>hd</code> is slower (DALL-E 3 only).</td></tr>
<tr><td>Image Size</td><td>Smaller images are faster; invalid combinations are auto-normalized.</td></tr>
</table>
</section>
<section>
<h2 id="options-prompts">Options: Prompts</h2>
<p>Prompt templates let you customize storyboard and image prompts per provider scope.</p>
<h3>Current support</h3>
<ul>
<li>Provider scopes in the UI: <strong>OpenAI</strong>, <strong>Google Gemini</strong>, <strong>Cloudflare Workers AI</strong>, <strong>OpenRouter</strong>, and <strong>Hugging Face</strong>.</li>
<li>Runtime template consumption (current build): provider templates are consumed for all configured providers during storyboard/image generation flows.</li>
<li>Template types: <strong>Storyboard</strong> and <strong>Image</strong>.</li>
<li>Prompt Library presets can be applied by use-case group to current provider or all providers.</li>
<li>You can import prompt-library presets from a JSON array using <code>Import Prompt Library JSON</code>. Imported presets are saved and available in future sessions.</li>
</ul>
<h3>Validation behavior</h3>
<ul>
<li>Required placeholder checks prevent invalid saves.</li>
<li>Unknown placeholder warnings are shown but can be used for future expansion.</li>
</ul>
<h3>Common placeholders</h3>
<ul>
<li>Storyboard: <code>{{source_title}}</code>, <code>{{source_url}}</code>, <code>{{panel_count}}</code>, <code>{{detail_level}}</code>, <code>{{objective}}</code>, <code>{{objective_label}}</code>, <code>{{objective_guidance}}</code>, <code>{{output_language}}</code>, <code>{{output_language_label}}</code>, <code>{{output_language_instruction}}</code>, <code>{{style_prompt}}</code>, <code>{{content}}</code></li>
<li>Image: <code>{{panel_caption}}</code>, <code>{{panel_summary}}</code>, <code>{{style_prompt}}</code>, <code>{{panel_index}}</code>, <code>{{panel_count}}</code>, <code>{{output_language}}</code>, <code>{{output_language_label}}</code>, <code>{{output_language_instruction}}</code></li>
</ul>
</section>
<section>
<h2 id="options-storage">Options: Storage</h2>
<ul>
<li><strong>Storage Usage</strong>: shows history count and rough storage data indicators.</li>
<li><strong>Maximum Cache Size</strong>: intended cap for local image/cache data handling.</li>
<li><strong>History Retention</strong>: target retention duration in days.</li>
<li><strong>Clear History</strong>: removes saved comics history.</li>
<li><strong>Clear Image Cache</strong>: clears cached image data (if used by current build).</li>
<li><strong>Export All Data</strong>: exports extension storage to JSON.</li>
<li><strong>Export Debug Logs</strong>: exports local debug logs to JSON.</li>
<li><strong>Google Drive Backup (Optional)</strong>: connect OAuth and auto-save generated comics as interactive HTML into Drive folder <code>MyComics</code>.</li>
<li><strong>Connections (Optional)</strong>: Google Drive, Facebook, and X use built-in OAuth flows; additional share-target connection toggles exist for Instagram and other targets such as LinkedIn, Reddit, and Email.</li>
</ul>
</section>
<section>
<h2 id="options-about">Options: About</h2>
<p>Displays product/version information and informational links. This is also the safest place to confirm branding and extension identity when testing multiple local builds.</p>
</section>
<section>
<h2 id="sidepanel-overview">Comic Viewer Side Panel Overview</h2>
<p>The side panel is the main viewing surface for generated comics, in-progress generation, and historical browsing.</p>
<div class="grid-2">
<div class="card">
<h3>Primary views</h3>
<ul>
<li><strong>Comic View</strong>: single-comic display and generation progress shell.</li>
<li><strong>My Collection</strong>: dedicated collection browser with keyboard support.</li>
</ul>
</div>
<div class="card">
<h3>Header actions</h3>
<ul>
<li><strong>New Comic</strong>: opens the popup.</li>
<li><strong>Open in Tab</strong>: opens the current comic in a full browser tab view.</li>
<li><strong>Download</strong>: exports a single composite PNG image.</li>
<li><strong>Share</strong>: opens target-specific sharing flow (social/email/copy targets).</li>
<li><strong>?</strong> help icon: opens this manual at the side panel section.</li>
</ul>
</div>
</div>
<p>The header also shows live viewer counters for generated comics, panels, pages processed, and current local storage usage.</p>
</section>
<section>
<h2 id="sidepanel-comic-view">Side Panel: Comic View</h2>
<h3>Display modes</h3>
<ul>
<li><strong>Strip View</strong>: horizontal comic strip layout.</li>
<li><strong>Carousel</strong>: focused panel view with thumbnails.</li>
<li><strong>Panel View</strong>: grid/list view of all panels.</li>
</ul>
<h3>Layout Presets</h3>
<p>Web2Comics includes a broad layout preset library (for example <em>Single panel</em>, <em>4-panel grid</em>, <em>Classic comic page</em>, <em>Manga page</em>, <em>Webtoon scroll</em>, <em>Masonry</em>, <em>Guided path</em>, and <em>Carousel</em>). In the current implementation, presets are fully functional layout/view variants built on the side panel render engines and preset-specific styling rules.</p>
<h3>Download Export</h3>
<ul>
<li>Exports a single composite PNG image using the currently selected layout preset.</li>
<li>Includes source title, source URL, source short-name (for example <code>cnn</code>), panel thumbnails, captions, and attribution line <code>Made with Web2Comics</code>.</li>
</ul>
<h3>Per-panel controls</h3>
<ul>
<li><strong>Regenerate panel</strong>, <strong>Regenerate caption</strong>, <strong>Make more factual</strong>, and <strong>Make simpler</strong> run scoped panel edits without rerunning the whole comic.</li>
<li><strong>Facts used</strong> blocks (when available) show entities, dates, numbers, and source snippet grounding.</li>
<li><strong>Jump to source</strong> opens the source and copies the source snippet for quick verification.</li>
</ul>
<h3>Policy handling indicators</h3>
<ul>
<li><span class="tag">Rewritten</span> panel succeeded after prompt rewrite/sanitization retry.</li>
<li><span class="tag">Blocked</span> panel is a provider-policy placeholder panel.</li>
<li><strong>View prompt</strong> button appears when debugging is enabled and prompt logging metadata is available.</li>
</ul>
</section>
<section>
<h2 id="sidepanel-generation-view">Side Panel: Generation View</h2>
<ul>
<li>Shows a comic-like placeholder shell during generation.</li>
<li>Uses live panel statuses: <code>Pending</code>, <code>Sent</code>, <code>Receiving</code>, <code>Rendering</code>, <code>Completed</code>, <code>Error</code>.</li>
<li>Matches the currently selected view mode/layout preset for continuity.</li>
<li><strong>Cancel</strong> stops the active job and shows a <code>Canceling...</code> state while cancellation is being processed.</li>
</ul>
</section>
<section>
<h2 id="sidepanel-history-browser">Side Panel: My Collection</h2>
<ul>
<li>Dedicated browsing grid of previous comics.</li>
<li>Cards include source short name and <strong>Original</strong> link.</li>
<li>Keyboard support: tab focus, <code>Enter</code>/<code>Space</code> to open, tablist navigation for primary view tabs.</li>
<li>Chunked loading with <strong>Show More</strong> for larger histories.</li>
</ul>
</section>
<section>
<h2 id="appendix-keys">Appendix: How to Obtain Provider Keys / Tokens</h2>
<p>Use local-only storage (Options page or local env files for tests). Do not commit secrets to git.</p>
<div class="warn">
If a key/token is pasted into chat, treat it as exposed and rotate/revoke it.
</div>
</section>
<section>
<h2 id="appendix-openai">OpenAI (API Key)</h2>
<ol>
<li>Open the OpenAI Platform API keys page: <a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener noreferrer">platform.openai.com/api-keys</a></li>
<li>Sign in to the correct organization/project.</li>
<li>Create a new secret key.</li>
<li>Copy the key immediately (you may not be able to view it again).</li>
<li>In Web2Comics Options → Providers → OpenAI, paste it and click <strong>Validate</strong>.</li>
</ol>
<p>Reference: <a href="https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key" target="_blank" rel="noopener noreferrer">OpenAI Help: Where do I find my API key?</a></p>
</section>
<section>
<h2 id="appendix-gemini">Google Gemini (Google AI Studio API Key)</h2>
<ol>
<li>Open Google AI Studio: <a href="https://aistudio.google.com/" target="_blank" rel="noopener noreferrer">aistudio.google.com</a></li>
<li>Open the API key page (Get API key / API keys).</li>
<li>Select or create the correct Google Cloud project.</li>
<li>Enable the <strong>Generative Language API</strong> for that project if prompted.</li>
<li>Create an API key.</li>
<li>Paste it into Web2Comics Options → Providers → Google Gemini and click <strong>Validate</strong>.</li>
</ol>
<p>References:</p>
<ul>
<li><a href="https://ai.google.dev/gemini-api/docs/api-key" target="_blank" rel="noopener noreferrer">Gemini API docs: API keys</a></li>
<li><a href="https://ai.google.dev/gemini-api/docs/rate-limits" target="_blank" rel="noopener noreferrer">Gemini API docs: rate limits / free tier notes</a></li>
</ul>
</section>
<section>
<h2 id="appendix-cloudflare">Cloudflare Workers AI (Account ID + API Token)</h2>
<ol>
<li>Sign in to Cloudflare Dashboard: <a href="https://dash.cloudflare.com/" target="_blank" rel="noopener noreferrer">dash.cloudflare.com</a></li>
<li>Get your <strong>Account ID</strong> (Dashboard sidebar/account overview area).</li>
<li>Create an API token with access to Workers AI / AI inference for that account.</li>
<li>(Recommended) Use token auth instead of global key + email.</li>
<li>For E2E tests, store <code>CLOUDFLARE_ACCOUNT_ID</code> and <code>CLOUDFLARE_API_TOKEN</code> in local env.</li>
<li>For extension runtime, configure Cloudflare credentials in the build/runtime path used by your current test setup.</li>
</ol>
<p>Reference: <a href="https://developers.cloudflare.com/workers-ai/" target="_blank" rel="noopener noreferrer">Cloudflare Workers AI documentation</a></p>
</section>
<section>
<h2 id="appendix-openrouter">OpenRouter (API Key)</h2>
<ol>
<li>Open OpenRouter keys page: <a href="https://openrouter.ai/keys" target="_blank" rel="noopener noreferrer">openrouter.ai/keys</a></li>
<li>Create a new API key.</li>
<li>Copy the key and paste into Web2Comics Options → Providers → OpenRouter.</li>
<li>Click <strong>Validate</strong>.</li>
<li>Optional but recommended: test OpenRouter text and image models from the provider card using <strong>Test Text Model</strong> / <strong>Test Image Model</strong> because model availability varies by account and route.</li>
</ol>
<p>Reference: <a href="https://openrouter.ai/docs/quickstart" target="_blank" rel="noopener noreferrer">OpenRouter Quickstart</a></p>
</section>
<section>
<h2 id="appendix-huggingface">Hugging Face Inference API (User Access Token)</h2>
<ol>
<li>Sign in to Hugging Face: <a href="https://huggingface.co/" target="_blank" rel="noopener noreferrer">huggingface.co</a></li>
<li>Open your access tokens page: <a href="https://huggingface.co/settings/tokens" target="_blank" rel="noopener noreferrer">huggingface.co/settings/tokens</a></li>
<li>Create a token with appropriate inference permissions.</li>
<li>Copy the token and paste into Web2Comics Options → Providers → Hugging Face.</li>
<li>Click <strong>Validate</strong>.</li>
<li>Select Hugging Face text and image models in the provider card (image generation uses Hugging Face <code>hf-inference</code> image endpoints).</li>
</ol>
<p>Reference: <a href="https://huggingface.co/docs/api-inference/index" target="_blank" rel="noopener noreferrer">Hugging Face Inference documentation</a></p>
</section>
<section>
<h2>Testing Keys Locally (E2E)</h2>
<p>For local E2E testing, Web2Comics supports loading secrets from a git-ignored file such as <code>.env.e2e.local</code>.</p>
<pre><code>OPENAI_API_KEY=...
GEMINI_API_KEY=...
OPENROUTER_API_KEY=...
HUGGINGFACE_INFERENCE_API_TOKEN=...
CLOUDFLARE_ACCOUNT_ID=...
CLOUDFLARE_API_TOKEN=...</code></pre>
</section>
</main>
</div>
</body>
</html>