@fotor-ai/dsh-fotor-plugin 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL.md +7 -1
- package/README.md +6 -4
- package/configuration.example.yml +3 -3
- package/package.json +2 -2
- package/runtime/config.mjs +3 -2
- package/skills/fotor-audio/SKILL.md +27 -0
- package/skills/fotor-audio/references/authentication.md +68 -0
- package/skills/fotor-audio/references/credits.md +11 -0
- package/skills/fotor-audio/references/mcp-integration.md +140 -0
- package/skills/fotor-audio/references/media-upload.md +34 -0
- package/skills/fotor-connect/SKILL.md +2 -2
- package/skills/fotor-connect/references/credits.md +5 -30
- package/skills/fotor-connect/references/mcp-integration.md +20 -14
- package/skills/fotor-connect/references/media-upload.md +2 -2
- package/skills/fotor-credits/SKILL.md +3 -7
- package/skills/fotor-credits/references/credits.md +5 -30
- package/skills/fotor-credits/references/mcp-integration.md +20 -14
- package/skills/fotor-credits/references/media-upload.md +2 -2
- package/skills/fotor-image/references/credits.md +5 -30
- package/skills/fotor-image/references/mcp-integration.md +20 -14
- package/skills/fotor-image/references/media-upload.md +2 -2
- package/skills/fotor-upload/SKILL.md +2 -2
- package/skills/fotor-upload/references/credits.md +5 -30
- package/skills/fotor-upload/references/mcp-integration.md +20 -14
- package/skills/fotor-upload/references/media-upload.md +2 -2
- package/skills/fotor-video/SKILL.md +1 -1
- package/skills/fotor-video/references/credits.md +5 -30
- package/skills/fotor-video/references/mcp-integration.md +20 -14
- package/skills/fotor-video/references/media-upload.md +2 -2
|
@@ -21,7 +21,7 @@ Use the runtime routing, authentication, and website flow below. Keep credential
|
|
|
21
21
|
| Connect to Fotor, connect to the Fotor website, or connect and open Fotor | Authenticate MCP, then follow the website flow below |
|
|
22
22
|
| Connect to Fotor MCP or check MCP connectivity without a website request; explicitly keep the website closed | Perform the requested MCP check; omit the website handoff |
|
|
23
23
|
| Introduce features or query models | Answer from current tool descriptions or model queries; omit website navigation unless also requested |
|
|
24
|
-
|
|
|
24
|
+
| The user asks for their own Fotor credit balance | Follow the [credits workflow](credits.md); ordinary connection does not query balance |
|
|
25
25
|
|
|
26
26
|
Equivalent wording in other languages follows the same routing. Uploads, image processing, and media generation alone do not request website access. Ordinary website connection requests authorize the final visible navigation; they do not authorize media submissions.
|
|
27
27
|
|
|
@@ -67,7 +67,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
67
67
|
|
|
68
68
|
### Connect to the website
|
|
69
69
|
|
|
70
|
-
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without
|
|
70
|
+
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without claiming an ordinary page visit established automatic login.
|
|
71
71
|
2. Call `get_website_url` without arguments. Its public response contains `handoff_url` and integer `expires_in` from 0 to 600; it does not expose `target_url`. Require a usable link and remaining lifetime greater than zero. A zero lifetime is already expired: use the bounded replacement rule below. Missing, malformed, or out-of-range fields are a handoff failure. The server configures and validates the destination; before navigation, the plugin can check only the handoff endpoint against the [connection table](#connection), not the hidden target. Never decode the ticket, rewrite its URL, or change environments to recover a mismatch.
|
|
72
72
|
3. Follow [one-time browser links](#one-time-browser-links) for the returned `handoff_url`, using the actual remaining lifetime. This final visible navigation is the requested website visit and consumes the ticket.
|
|
73
73
|
4. Inspect the resulting page in that same browser session. Compare its HTTPS origin with the selected website in the connection table and verify authenticated state before reporting the website connected. A valid handoff endpoint alone does not prove the hidden redirect target is correct. On a different environment or unexpected origin, stop further interaction and report the mismatch; do not follow it as a fallback. A link, a generic page, or a login/error screen is insufficient. If state is unclear, ask the user to confirm it. Website failure does not justify resetting working MCP credentials.
|
|
@@ -75,7 +75,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
75
75
|
|
|
76
76
|
### One-time browser links
|
|
77
77
|
|
|
78
|
-
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
78
|
+
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
79
79
|
|
|
80
80
|
- Parse the returned URL before use. It must have the exact HTTPS origin and path of the selected environment's [login handoff endpoint](#connection), no username/password or fragment, and one nonempty `code` query parameter only. Check URL components rather than hostname substrings. Reject an unknown environment or mismatch without fetching the address, rewriting the host, or switching services.
|
|
81
81
|
- Immediately navigate once in the selected visible host browser. Do not first fetch, preview, probe, or open the ticket in a hidden tab. After navigation, treat it as consumed and never offer it as a reusable login link.
|
|
@@ -97,13 +97,20 @@ Inspect the connected service's actual tool descriptions and input schemas. The
|
|
|
97
97
|
| `submit_first_frame_video_task` | Animate `image_url` as the first frame; a successful call may consume Fotor credits |
|
|
98
98
|
| `submit_first_last_frame_video_task` | Use ordered `start_image_url` and `end_image_url`; a successful call may consume Fotor credits |
|
|
99
99
|
| `submit_multimodal_video_task` | Use supported image, video, and/or audio references; a successful call may consume Fotor credits |
|
|
100
|
-
| `
|
|
100
|
+
| `submit_soundtrack_task` | Compose a separate MP3 from exactly one source image or video |
|
|
101
|
+
| `submit_audio_track_task` | Generate a new track from reference audio |
|
|
102
|
+
| `submit_song_edit_task` | Extend, remix or edit a section of a song |
|
|
103
|
+
| `submit_speech_task` | Generate speech or a scripted podcast with built-in voices |
|
|
104
|
+
| `submit_audio_separation_task` | Separate existing vocals and accompaniment into a ZIP |
|
|
105
|
+
| `get_task` | Look up one known image, video or audio task using existing credentials |
|
|
101
106
|
| `get_website_url` | Obtain an environment-bound, one-time website login link for the verified MCP user |
|
|
102
|
-
| `get_credits` | Query
|
|
107
|
+
| `get_credits` | Query only the authenticated user's own balance; follow the [balance lookup](credits.md#query-the-selected-account) |
|
|
103
108
|
|
|
104
109
|
For model-based generation/editing, start with `list_models`, optionally filtering by `media_type` and `mode`. Uploads and fixed image-processing operations use their own tool contracts without model selection. Filters combine with AND; an empty filtered result is not evidence of a failed connection. Then query `list_models` with the chosen `model_id` before submitting. Model IDs, available modes, and catalog sizes can change; an unknown or retired ID requires a new selection, not an invented replacement.
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
For standalone audio, read the selected model’s `operations[]`. Use its tool, selector, required parameters, result format and synchronous behavior. Only soundtrack creation accepts a model ID.
|
|
112
|
+
|
|
113
|
+
For images and videos, use the returned resolutions, aspect ratios, qualities, duration values/ranges, reference types, and defaults. Honor an explicit model or output preference; explain an unsupported constraint before changing it. When no preference is given, choose a suitable supported model and use its reported defaults. `duration=0` selects `default_duration`; duration ranges are inclusive integer seconds, while a list permits only its listed values. `explicit_aspect_ratio_modes` requires a concrete supported ratio instead of `auto`; for multimodal references this condition applies when images are supplied without videos.
|
|
107
114
|
|
|
108
115
|
### Inputs and native capabilities
|
|
109
116
|
|
|
@@ -113,7 +120,7 @@ Use native model resolutions and supported output options for generation. Explic
|
|
|
113
120
|
|
|
114
121
|
### Credit consumption before submission
|
|
115
122
|
|
|
116
|
-
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image and
|
|
123
|
+
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image, video and audio submissions, including future tools matching that name pattern; discovery and the actual schema still determine whether a tool can be called.
|
|
117
124
|
|
|
118
125
|
Before submitting, briefly tell the user in their conversation language that the successful call may consume Fotor credits. Continue under an already explicit task request without adding a blanket confirmation step. Preserve the user's budget, requested scope, and host approval requirements. For an explicitly requested sequence, one notice before the first submission may cover every named step; disclose newly added steps or scope changes before submitting them.
|
|
119
126
|
|
|
@@ -121,14 +128,13 @@ Do not apply this notice to model discovery, balance queries, uploads or task po
|
|
|
121
128
|
|
|
122
129
|
### Submission, recovery, and results
|
|
123
130
|
|
|
124
|
-
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video submission mode; it does not make balance queries a prerequisite.
|
|
131
|
+
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video and audio submission mode; it does not make balance queries a prerequisite.
|
|
125
132
|
|
|
126
|
-
1. Submit the
|
|
127
|
-
2.
|
|
128
|
-
3.
|
|
129
|
-
4.
|
|
130
|
-
5. An explicit `submission_uncertain` error or a lost submission response can mean a task was created and charged. Use a known task ID for recovery. Without one, report the uncertain submission and stop; do not automatically resubmit or assume an unprovided idempotency mechanism. On a query error or polling limit, preserve the same ID and report the last observed state.
|
|
133
|
+
1. Submit once. Retain the returned task ID, environment, selected operation and expected output format. Image and video calls normally return an accepted task. Audio may already have completed. Inspect both the MCP error flag and the structured content, including on `isError=true`. Retain any known task ID, safe `failure_reason` and reported credit value.
|
|
134
|
+
2. On completion, deliver the actual `result_url` immediately without polling. Prefer a host-supported preview for playable media. Offer an audio separation ZIP as a download. If the URL is absent, report completion without an available link. Describe quality only after inspecting the artifact.
|
|
135
|
+
3. For an accepted or processing task, query the same ID with `get_task`. Each call performs one lookup. Within the task budget, wait between checks. The query can omit the model and result format, so retain the originating operation. Stop on completion, `failed`, `timed_out` or `cancelled`. Report unknown or conflicting state as uncertain. A safe failure summary may be generic.
|
|
136
|
+
4. A transport timeout, lost response or `submission_uncertain` may follow an accepted, chargeable submission. Recover only by looking up a known ID. Without an ID, report the uncertain outcome and stop. Never automatically resubmit. On a lookup error or polling limit, preserve the ID and last observed state.
|
|
131
137
|
|
|
132
138
|
`credits_increment` reports the increment returned by that particular submission or query, not a balance or a price quote. Preserve `0` as zero and `null` as unknown. Do not add submission and polling values together as if each observation were a new charge. Report missing or inconsistent values without estimating usage.
|
|
133
139
|
|
|
134
|
-
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure.
|
|
140
|
+
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure. Task lookup uses existing credentials. If none are usable, report `credentials_unavailable`. It creates no developer, key or task and consumes no credits. Use `list_models` for connection checks.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fotor Media Upload
|
|
2
2
|
|
|
3
|
-
Read this workflow for standalone uploads and when an image or
|
|
3
|
+
Read this workflow for standalone uploads and when an image, video or audio task needs local references. Use already accessible HTTPS references directly for creation; upload only the specific local files or client-accessible attachments needed by the user's request. An attachment label without readable bytes is not an uploadable file.
|
|
4
4
|
|
|
5
5
|
## Prepare the input
|
|
6
6
|
|
|
@@ -29,6 +29,6 @@ If the file changes after signing, recalculate its metadata and request a new li
|
|
|
29
29
|
|
|
30
30
|
Process multiple files one at a time, preserving input order and the association between each file and its successful URL. Report name, media type, exact byte size, and `file_url` for successes; report a concise reason for each failure without exposing signatures. A partial batch is not an all-success result. If a creation task needs a failed input, resolve it before submission rather than silently omitting it.
|
|
31
31
|
|
|
32
|
-
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
32
|
+
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or the selected audio operation’s source URL or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
33
33
|
|
|
34
34
|
`expires_in` describes the maximum upload-address lifetime; temporary signing credentials may expire earlier. It does not describe file retention. Signature expiry does not delete an uploaded file, and `file_url` is not a presigned download URL. Do not promise permanent storage, a deletion time, or long-term URL availability unless the service provides that information.
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fotor-credits
|
|
3
|
-
description:
|
|
3
|
+
description: Query the authenticated user's own Fotor credit balance. Use when the user asks how many Fotor credits they have.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Fotor
|
|
6
|
+
# Check my Fotor credits
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Report the actual balance and deliver a pricing link only when selected by that workflow. Let the user click it; a pricing link does not sign them in. A credits request alone does not open a browser or request a website-login link. Respect explicit balance-only, no-link, and no-browser restrictions.
|
|
11
|
-
|
|
12
|
-
Keep payment under the user's control. Neither a returned link nor an opened page establishes that a purchase or recharge completed.
|
|
8
|
+
Use this skill only for the signed-in user's own balance. For other requests, explain its scope without calling a tool. Follow the [balance lookup](references/credits.md#query-the-selected-account) and report the number returned, including zero, or explain why the balance is unavailable.
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
# Fotor
|
|
2
|
-
|
|
3
|
-
Read this workflow for a balance question or an explicit recharge request. Media submission and ordinary website connection do not require a preliminary balance query.
|
|
1
|
+
# Fotor credit balance
|
|
4
2
|
|
|
5
3
|
## Query the selected account
|
|
6
4
|
|
|
7
|
-
1.
|
|
8
|
-
2. Call `get_credits` without arguments.
|
|
9
|
-
3.
|
|
10
|
-
4. Treat `credits_unavailable`, authentication errors, invalid/missing balance values, and other failures as unavailable information, never as zero. Do not create accounts, keys, replacement tasks, or credentials to work around a balance error. If a successful response has a valid balance but an unusable pricing link, report the balance and, when a link is selected below, the separate link problem.
|
|
11
|
-
|
|
12
|
-
## Select the response
|
|
13
|
-
|
|
14
|
-
| Request and result | Action |
|
|
15
|
-
| --- | --- |
|
|
16
|
-
| Balance below 100, or an explicit request to top up | Report the balance and deliver the validated pricing link as described below. Let the user click it. |
|
|
17
|
-
| Balance of 100 or more; no top-up request | Report only the balance. Keep the returned link out of the response. |
|
|
18
|
-
| Explicit balance-only or no-link instruction | Report only the balance, including when it is below 100. |
|
|
19
|
-
| Browser navigation is forbidden or unavailable | Deliver the selected link if the user permits links; link delivery needs no browser automation. |
|
|
20
|
-
| Query failed | Report the failure; do not infer a low balance or invent a pricing link. |
|
|
21
|
-
|
|
22
|
-
## Validate and deliver pricing links
|
|
23
|
-
|
|
24
|
-
Use this rule for both `get_credits.top_up_url` and a submission error's `top_up_url`:
|
|
25
|
-
|
|
26
|
-
1. Require a nonempty absolute HTTPS URL whose origin exactly matches the selected environment's website in the [connection table](mcp-integration.md#connection), with no embedded username/password. Check URL components rather than hostname substrings. Reject an unknown environment, malformed URL, or origin mismatch without visiting it, changing environments, or rewriting its host.
|
|
27
|
-
2. Use the exact returned URL as the Markdown target, with a label meaning "View Fotor plans" in the conversation language. Preserve its path, query, and fragment; the login handoff endpoint, `code` parameter, expiry, and single-consumption rules do not apply to ordinary pricing links. If the link is missing or invalid, explain that the pricing entry is unavailable instead of constructing a replacement.
|
|
28
|
-
3. Let the user click the link. A balance or recharge request alone does not call `get_website_url`, open a browser, or refresh a supposed ticket. If the user also explicitly requests a signed-in website session, complete the [website connection flow](mcp-integration.md#connect-to-the-website) separately, then provide the pricing link for them to open in that same browser.
|
|
29
|
-
|
|
30
|
-
Leave plan selection and payment to the user. A link or a loaded page does not establish website login, a completed payment, or an increased balance. Keep credentials and website-login tickets out of files and diagnostic logs.
|
|
5
|
+
1. When the user requests their own balance, follow [MCP authentication](mcp-integration.md#authenticate-mcp). Reuse valid authorization and discover `get_credits`. If it is unavailable, report that and stop.
|
|
6
|
+
2. Call `get_credits` without arguments. The authenticated session identifies the account. Report only the nonnegative numeric `credits` value, including zero, and finish. A balance query needs no website visit.
|
|
7
|
+
3. If authentication fails, the service reports an error, or the balance is missing or invalid, report it as unavailable. An unknown balance is not zero. Never infer a balance from task consumption.
|
|
31
8
|
|
|
32
9
|
## Insufficient credits during media submission
|
|
33
10
|
|
|
34
|
-
When
|
|
35
|
-
|
|
36
|
-
Stop dependent operations and retain any task ID returned. Do not automatically resubmit, infer that payment completed, or turn the error into `submission_uncertain`. A lost response or an explicit uncertain-submission result still follows the [task recovery workflow](mcp-integration.md#submission-recovery-and-results).
|
|
11
|
+
When a submission explicitly reports `insufficient_credits`, explain that the task could not proceed for that reason. Retain any known task ID and reported consumption, stop dependent operations, and finish without extra links, a balance query or another submission. A lost response is a different outcome; follow [task recovery](mcp-integration.md#submission-recovery-and-results).
|
|
@@ -21,7 +21,7 @@ Use the runtime routing, authentication, and website flow below. Keep credential
|
|
|
21
21
|
| Connect to Fotor, connect to the Fotor website, or connect and open Fotor | Authenticate MCP, then follow the website flow below |
|
|
22
22
|
| Connect to Fotor MCP or check MCP connectivity without a website request; explicitly keep the website closed | Perform the requested MCP check; omit the website handoff |
|
|
23
23
|
| Introduce features or query models | Answer from current tool descriptions or model queries; omit website navigation unless also requested |
|
|
24
|
-
|
|
|
24
|
+
| The user asks for their own Fotor credit balance | Follow the [credits workflow](credits.md); ordinary connection does not query balance |
|
|
25
25
|
|
|
26
26
|
Equivalent wording in other languages follows the same routing. Uploads, image processing, and media generation alone do not request website access. Ordinary website connection requests authorize the final visible navigation; they do not authorize media submissions.
|
|
27
27
|
|
|
@@ -67,7 +67,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
67
67
|
|
|
68
68
|
### Connect to the website
|
|
69
69
|
|
|
70
|
-
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without
|
|
70
|
+
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without claiming an ordinary page visit established automatic login.
|
|
71
71
|
2. Call `get_website_url` without arguments. Its public response contains `handoff_url` and integer `expires_in` from 0 to 600; it does not expose `target_url`. Require a usable link and remaining lifetime greater than zero. A zero lifetime is already expired: use the bounded replacement rule below. Missing, malformed, or out-of-range fields are a handoff failure. The server configures and validates the destination; before navigation, the plugin can check only the handoff endpoint against the [connection table](#connection), not the hidden target. Never decode the ticket, rewrite its URL, or change environments to recover a mismatch.
|
|
72
72
|
3. Follow [one-time browser links](#one-time-browser-links) for the returned `handoff_url`, using the actual remaining lifetime. This final visible navigation is the requested website visit and consumes the ticket.
|
|
73
73
|
4. Inspect the resulting page in that same browser session. Compare its HTTPS origin with the selected website in the connection table and verify authenticated state before reporting the website connected. A valid handoff endpoint alone does not prove the hidden redirect target is correct. On a different environment or unexpected origin, stop further interaction and report the mismatch; do not follow it as a fallback. A link, a generic page, or a login/error screen is insufficient. If state is unclear, ask the user to confirm it. Website failure does not justify resetting working MCP credentials.
|
|
@@ -75,7 +75,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
75
75
|
|
|
76
76
|
### One-time browser links
|
|
77
77
|
|
|
78
|
-
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
78
|
+
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
79
79
|
|
|
80
80
|
- Parse the returned URL before use. It must have the exact HTTPS origin and path of the selected environment's [login handoff endpoint](#connection), no username/password or fragment, and one nonempty `code` query parameter only. Check URL components rather than hostname substrings. Reject an unknown environment or mismatch without fetching the address, rewriting the host, or switching services.
|
|
81
81
|
- Immediately navigate once in the selected visible host browser. Do not first fetch, preview, probe, or open the ticket in a hidden tab. After navigation, treat it as consumed and never offer it as a reusable login link.
|
|
@@ -97,13 +97,20 @@ Inspect the connected service's actual tool descriptions and input schemas. The
|
|
|
97
97
|
| `submit_first_frame_video_task` | Animate `image_url` as the first frame; a successful call may consume Fotor credits |
|
|
98
98
|
| `submit_first_last_frame_video_task` | Use ordered `start_image_url` and `end_image_url`; a successful call may consume Fotor credits |
|
|
99
99
|
| `submit_multimodal_video_task` | Use supported image, video, and/or audio references; a successful call may consume Fotor credits |
|
|
100
|
-
| `
|
|
100
|
+
| `submit_soundtrack_task` | Compose a separate MP3 from exactly one source image or video |
|
|
101
|
+
| `submit_audio_track_task` | Generate a new track from reference audio |
|
|
102
|
+
| `submit_song_edit_task` | Extend, remix or edit a section of a song |
|
|
103
|
+
| `submit_speech_task` | Generate speech or a scripted podcast with built-in voices |
|
|
104
|
+
| `submit_audio_separation_task` | Separate existing vocals and accompaniment into a ZIP |
|
|
105
|
+
| `get_task` | Look up one known image, video or audio task using existing credentials |
|
|
101
106
|
| `get_website_url` | Obtain an environment-bound, one-time website login link for the verified MCP user |
|
|
102
|
-
| `get_credits` | Query
|
|
107
|
+
| `get_credits` | Query only the authenticated user's own balance; follow the [balance lookup](credits.md#query-the-selected-account) |
|
|
103
108
|
|
|
104
109
|
For model-based generation/editing, start with `list_models`, optionally filtering by `media_type` and `mode`. Uploads and fixed image-processing operations use their own tool contracts without model selection. Filters combine with AND; an empty filtered result is not evidence of a failed connection. Then query `list_models` with the chosen `model_id` before submitting. Model IDs, available modes, and catalog sizes can change; an unknown or retired ID requires a new selection, not an invented replacement.
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
For standalone audio, read the selected model’s `operations[]`. Use its tool, selector, required parameters, result format and synchronous behavior. Only soundtrack creation accepts a model ID.
|
|
112
|
+
|
|
113
|
+
For images and videos, use the returned resolutions, aspect ratios, qualities, duration values/ranges, reference types, and defaults. Honor an explicit model or output preference; explain an unsupported constraint before changing it. When no preference is given, choose a suitable supported model and use its reported defaults. `duration=0` selects `default_duration`; duration ranges are inclusive integer seconds, while a list permits only its listed values. `explicit_aspect_ratio_modes` requires a concrete supported ratio instead of `auto`; for multimodal references this condition applies when images are supplied without videos.
|
|
107
114
|
|
|
108
115
|
### Inputs and native capabilities
|
|
109
116
|
|
|
@@ -113,7 +120,7 @@ Use native model resolutions and supported output options for generation. Explic
|
|
|
113
120
|
|
|
114
121
|
### Credit consumption before submission
|
|
115
122
|
|
|
116
|
-
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image and
|
|
123
|
+
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image, video and audio submissions, including future tools matching that name pattern; discovery and the actual schema still determine whether a tool can be called.
|
|
117
124
|
|
|
118
125
|
Before submitting, briefly tell the user in their conversation language that the successful call may consume Fotor credits. Continue under an already explicit task request without adding a blanket confirmation step. Preserve the user's budget, requested scope, and host approval requirements. For an explicitly requested sequence, one notice before the first submission may cover every named step; disclose newly added steps or scope changes before submitting them.
|
|
119
126
|
|
|
@@ -121,14 +128,13 @@ Do not apply this notice to model discovery, balance queries, uploads or task po
|
|
|
121
128
|
|
|
122
129
|
### Submission, recovery, and results
|
|
123
130
|
|
|
124
|
-
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video submission mode; it does not make balance queries a prerequisite.
|
|
131
|
+
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video and audio submission mode; it does not make balance queries a prerequisite.
|
|
125
132
|
|
|
126
|
-
1. Submit the
|
|
127
|
-
2.
|
|
128
|
-
3.
|
|
129
|
-
4.
|
|
130
|
-
5. An explicit `submission_uncertain` error or a lost submission response can mean a task was created and charged. Use a known task ID for recovery. Without one, report the uncertain submission and stop; do not automatically resubmit or assume an unprovided idempotency mechanism. On a query error or polling limit, preserve the same ID and report the last observed state.
|
|
133
|
+
1. Submit once. Retain the returned task ID, environment, selected operation and expected output format. Image and video calls normally return an accepted task. Audio may already have completed. Inspect both the MCP error flag and the structured content, including on `isError=true`. Retain any known task ID, safe `failure_reason` and reported credit value.
|
|
134
|
+
2. On completion, deliver the actual `result_url` immediately without polling. Prefer a host-supported preview for playable media. Offer an audio separation ZIP as a download. If the URL is absent, report completion without an available link. Describe quality only after inspecting the artifact.
|
|
135
|
+
3. For an accepted or processing task, query the same ID with `get_task`. Each call performs one lookup. Within the task budget, wait between checks. The query can omit the model and result format, so retain the originating operation. Stop on completion, `failed`, `timed_out` or `cancelled`. Report unknown or conflicting state as uncertain. A safe failure summary may be generic.
|
|
136
|
+
4. A transport timeout, lost response or `submission_uncertain` may follow an accepted, chargeable submission. Recover only by looking up a known ID. Without an ID, report the uncertain outcome and stop. Never automatically resubmit. On a lookup error or polling limit, preserve the ID and last observed state.
|
|
131
137
|
|
|
132
138
|
`credits_increment` reports the increment returned by that particular submission or query, not a balance or a price quote. Preserve `0` as zero and `null` as unknown. Do not add submission and polling values together as if each observation were a new charge. Report missing or inconsistent values without estimating usage.
|
|
133
139
|
|
|
134
|
-
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure.
|
|
140
|
+
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure. Task lookup uses existing credentials. If none are usable, report `credentials_unavailable`. It creates no developer, key or task and consumes no credits. Use `list_models` for connection checks.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fotor Media Upload
|
|
2
2
|
|
|
3
|
-
Read this workflow for standalone uploads and when an image or
|
|
3
|
+
Read this workflow for standalone uploads and when an image, video or audio task needs local references. Use already accessible HTTPS references directly for creation; upload only the specific local files or client-accessible attachments needed by the user's request. An attachment label without readable bytes is not an uploadable file.
|
|
4
4
|
|
|
5
5
|
## Prepare the input
|
|
6
6
|
|
|
@@ -29,6 +29,6 @@ If the file changes after signing, recalculate its metadata and request a new li
|
|
|
29
29
|
|
|
30
30
|
Process multiple files one at a time, preserving input order and the association between each file and its successful URL. Report name, media type, exact byte size, and `file_url` for successes; report a concise reason for each failure without exposing signatures. A partial batch is not an all-success result. If a creation task needs a failed input, resolve it before submission rather than silently omitting it.
|
|
31
31
|
|
|
32
|
-
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
32
|
+
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or the selected audio operation’s source URL or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
33
33
|
|
|
34
34
|
`expires_in` describes the maximum upload-address lifetime; temporary signing credentials may expire earlier. It does not describe file retention. Signature expiry does not delete an uploaded file, and `file_url` is not a presigned download URL. Do not promise permanent storage, a deletion time, or long-term URL availability unless the service provides that information.
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
# Fotor
|
|
2
|
-
|
|
3
|
-
Read this workflow for a balance question or an explicit recharge request. Media submission and ordinary website connection do not require a preliminary balance query.
|
|
1
|
+
# Fotor credit balance
|
|
4
2
|
|
|
5
3
|
## Query the selected account
|
|
6
4
|
|
|
7
|
-
1.
|
|
8
|
-
2. Call `get_credits` without arguments.
|
|
9
|
-
3.
|
|
10
|
-
4. Treat `credits_unavailable`, authentication errors, invalid/missing balance values, and other failures as unavailable information, never as zero. Do not create accounts, keys, replacement tasks, or credentials to work around a balance error. If a successful response has a valid balance but an unusable pricing link, report the balance and, when a link is selected below, the separate link problem.
|
|
11
|
-
|
|
12
|
-
## Select the response
|
|
13
|
-
|
|
14
|
-
| Request and result | Action |
|
|
15
|
-
| --- | --- |
|
|
16
|
-
| Balance below 100, or an explicit request to top up | Report the balance and deliver the validated pricing link as described below. Let the user click it. |
|
|
17
|
-
| Balance of 100 or more; no top-up request | Report only the balance. Keep the returned link out of the response. |
|
|
18
|
-
| Explicit balance-only or no-link instruction | Report only the balance, including when it is below 100. |
|
|
19
|
-
| Browser navigation is forbidden or unavailable | Deliver the selected link if the user permits links; link delivery needs no browser automation. |
|
|
20
|
-
| Query failed | Report the failure; do not infer a low balance or invent a pricing link. |
|
|
21
|
-
|
|
22
|
-
## Validate and deliver pricing links
|
|
23
|
-
|
|
24
|
-
Use this rule for both `get_credits.top_up_url` and a submission error's `top_up_url`:
|
|
25
|
-
|
|
26
|
-
1. Require a nonempty absolute HTTPS URL whose origin exactly matches the selected environment's website in the [connection table](mcp-integration.md#connection), with no embedded username/password. Check URL components rather than hostname substrings. Reject an unknown environment, malformed URL, or origin mismatch without visiting it, changing environments, or rewriting its host.
|
|
27
|
-
2. Use the exact returned URL as the Markdown target, with a label meaning "View Fotor plans" in the conversation language. Preserve its path, query, and fragment; the login handoff endpoint, `code` parameter, expiry, and single-consumption rules do not apply to ordinary pricing links. If the link is missing or invalid, explain that the pricing entry is unavailable instead of constructing a replacement.
|
|
28
|
-
3. Let the user click the link. A balance or recharge request alone does not call `get_website_url`, open a browser, or refresh a supposed ticket. If the user also explicitly requests a signed-in website session, complete the [website connection flow](mcp-integration.md#connect-to-the-website) separately, then provide the pricing link for them to open in that same browser.
|
|
29
|
-
|
|
30
|
-
Leave plan selection and payment to the user. A link or a loaded page does not establish website login, a completed payment, or an increased balance. Keep credentials and website-login tickets out of files and diagnostic logs.
|
|
5
|
+
1. When the user requests their own balance, follow [MCP authentication](mcp-integration.md#authenticate-mcp). Reuse valid authorization and discover `get_credits`. If it is unavailable, report that and stop.
|
|
6
|
+
2. Call `get_credits` without arguments. The authenticated session identifies the account. Report only the nonnegative numeric `credits` value, including zero, and finish. A balance query needs no website visit.
|
|
7
|
+
3. If authentication fails, the service reports an error, or the balance is missing or invalid, report it as unavailable. An unknown balance is not zero. Never infer a balance from task consumption.
|
|
31
8
|
|
|
32
9
|
## Insufficient credits during media submission
|
|
33
10
|
|
|
34
|
-
When
|
|
35
|
-
|
|
36
|
-
Stop dependent operations and retain any task ID returned. Do not automatically resubmit, infer that payment completed, or turn the error into `submission_uncertain`. A lost response or an explicit uncertain-submission result still follows the [task recovery workflow](mcp-integration.md#submission-recovery-and-results).
|
|
11
|
+
When a submission explicitly reports `insufficient_credits`, explain that the task could not proceed for that reason. Retain any known task ID and reported consumption, stop dependent operations, and finish without extra links, a balance query or another submission. A lost response is a different outcome; follow [task recovery](mcp-integration.md#submission-recovery-and-results).
|
|
@@ -21,7 +21,7 @@ Use the runtime routing, authentication, and website flow below. Keep credential
|
|
|
21
21
|
| Connect to Fotor, connect to the Fotor website, or connect and open Fotor | Authenticate MCP, then follow the website flow below |
|
|
22
22
|
| Connect to Fotor MCP or check MCP connectivity without a website request; explicitly keep the website closed | Perform the requested MCP check; omit the website handoff |
|
|
23
23
|
| Introduce features or query models | Answer from current tool descriptions or model queries; omit website navigation unless also requested |
|
|
24
|
-
|
|
|
24
|
+
| The user asks for their own Fotor credit balance | Follow the [credits workflow](credits.md); ordinary connection does not query balance |
|
|
25
25
|
|
|
26
26
|
Equivalent wording in other languages follows the same routing. Uploads, image processing, and media generation alone do not request website access. Ordinary website connection requests authorize the final visible navigation; they do not authorize media submissions.
|
|
27
27
|
|
|
@@ -67,7 +67,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
67
67
|
|
|
68
68
|
### Connect to the website
|
|
69
69
|
|
|
70
|
-
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without
|
|
70
|
+
1. Complete MCP authentication and authenticated tool discovery, using [bounded connection recovery](#bounded-connection-recovery) for eligible failures. When available, require a successful `list_models` read-only check without dumping its catalog before requesting a website link. Determine browser availability before creating the short-lived link, following the browser route in the packaged [authentication guidance](authentication.md). Otherwise prepare the manual fallback. Only a successful discovery that omits `get_website_url` establishes a missing website capability; an unavailable chat tool surface or failed discovery does not establish the service version. Report MCP and website outcomes separately, without claiming an ordinary page visit established automatic login.
|
|
71
71
|
2. Call `get_website_url` without arguments. Its public response contains `handoff_url` and integer `expires_in` from 0 to 600; it does not expose `target_url`. Require a usable link and remaining lifetime greater than zero. A zero lifetime is already expired: use the bounded replacement rule below. Missing, malformed, or out-of-range fields are a handoff failure. The server configures and validates the destination; before navigation, the plugin can check only the handoff endpoint against the [connection table](#connection), not the hidden target. Never decode the ticket, rewrite its URL, or change environments to recover a mismatch.
|
|
72
72
|
3. Follow [one-time browser links](#one-time-browser-links) for the returned `handoff_url`, using the actual remaining lifetime. This final visible navigation is the requested website visit and consumes the ticket.
|
|
73
73
|
4. Inspect the resulting page in that same browser session. Compare its HTTPS origin with the selected website in the connection table and verify authenticated state before reporting the website connected. A valid handoff endpoint alone does not prove the hidden redirect target is correct. On a different environment or unexpected origin, stop further interaction and report the mismatch; do not follow it as a fallback. A link, a generic page, or a login/error screen is insufficient. If state is unclear, ask the user to confirm it. Website failure does not justify resetting working MCP credentials.
|
|
@@ -75,7 +75,7 @@ This budget covers automatic MCP connection recovery, not website navigation, cr
|
|
|
75
75
|
|
|
76
76
|
### One-time browser links
|
|
77
77
|
|
|
78
|
-
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
78
|
+
Apply this section only to `get_website_url.handoff_url`. This plugin's selected website connection flow uses one final visible navigation in the browser specified by the packaged [authentication guidance](authentication.md). The service description instead prescribes a user-clicked link to prevent early consumption; the plugin's selected browser action is the intended final visit, never a pre-opening check. Honor an explicit user preference for manual delivery and any host restriction; use the manual fallback when direct navigation is unavailable.
|
|
79
79
|
|
|
80
80
|
- Parse the returned URL before use. It must have the exact HTTPS origin and path of the selected environment's [login handoff endpoint](#connection), no username/password or fragment, and one nonempty `code` query parameter only. Check URL components rather than hostname substrings. Reject an unknown environment or mismatch without fetching the address, rewriting the host, or switching services.
|
|
81
81
|
- Immediately navigate once in the selected visible host browser. Do not first fetch, preview, probe, or open the ticket in a hidden tab. After navigation, treat it as consumed and never offer it as a reusable login link.
|
|
@@ -97,13 +97,20 @@ Inspect the connected service's actual tool descriptions and input schemas. The
|
|
|
97
97
|
| `submit_first_frame_video_task` | Animate `image_url` as the first frame; a successful call may consume Fotor credits |
|
|
98
98
|
| `submit_first_last_frame_video_task` | Use ordered `start_image_url` and `end_image_url`; a successful call may consume Fotor credits |
|
|
99
99
|
| `submit_multimodal_video_task` | Use supported image, video, and/or audio references; a successful call may consume Fotor credits |
|
|
100
|
-
| `
|
|
100
|
+
| `submit_soundtrack_task` | Compose a separate MP3 from exactly one source image or video |
|
|
101
|
+
| `submit_audio_track_task` | Generate a new track from reference audio |
|
|
102
|
+
| `submit_song_edit_task` | Extend, remix or edit a section of a song |
|
|
103
|
+
| `submit_speech_task` | Generate speech or a scripted podcast with built-in voices |
|
|
104
|
+
| `submit_audio_separation_task` | Separate existing vocals and accompaniment into a ZIP |
|
|
105
|
+
| `get_task` | Look up one known image, video or audio task using existing credentials |
|
|
101
106
|
| `get_website_url` | Obtain an environment-bound, one-time website login link for the verified MCP user |
|
|
102
|
-
| `get_credits` | Query
|
|
107
|
+
| `get_credits` | Query only the authenticated user's own balance; follow the [balance lookup](credits.md#query-the-selected-account) |
|
|
103
108
|
|
|
104
109
|
For model-based generation/editing, start with `list_models`, optionally filtering by `media_type` and `mode`. Uploads and fixed image-processing operations use their own tool contracts without model selection. Filters combine with AND; an empty filtered result is not evidence of a failed connection. Then query `list_models` with the chosen `model_id` before submitting. Model IDs, available modes, and catalog sizes can change; an unknown or retired ID requires a new selection, not an invented replacement.
|
|
105
110
|
|
|
106
|
-
|
|
111
|
+
For standalone audio, read the selected model’s `operations[]`. Use its tool, selector, required parameters, result format and synchronous behavior. Only soundtrack creation accepts a model ID.
|
|
112
|
+
|
|
113
|
+
For images and videos, use the returned resolutions, aspect ratios, qualities, duration values/ranges, reference types, and defaults. Honor an explicit model or output preference; explain an unsupported constraint before changing it. When no preference is given, choose a suitable supported model and use its reported defaults. `duration=0` selects `default_duration`; duration ranges are inclusive integer seconds, while a list permits only its listed values. `explicit_aspect_ratio_modes` requires a concrete supported ratio instead of `auto`; for multimodal references this condition applies when images are supplied without videos.
|
|
107
114
|
|
|
108
115
|
### Inputs and native capabilities
|
|
109
116
|
|
|
@@ -113,7 +120,7 @@ Use native model resolutions and supported output options for generation. Explic
|
|
|
113
120
|
|
|
114
121
|
### Credit consumption before submission
|
|
115
122
|
|
|
116
|
-
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image and
|
|
123
|
+
Every discovered tool whose name matches `submit_*_task` may consume Fotor credits when its call succeeds. This applies to all image, video and audio submissions, including future tools matching that name pattern; discovery and the actual schema still determine whether a tool can be called.
|
|
117
124
|
|
|
118
125
|
Before submitting, briefly tell the user in their conversation language that the successful call may consume Fotor credits. Continue under an already explicit task request without adding a blanket confirmation step. Preserve the user's budget, requested scope, and host approval requirements. For an explicitly requested sequence, one notice before the first submission may cover every named step; disclose newly added steps or scope changes before submitting them.
|
|
119
126
|
|
|
@@ -121,14 +128,13 @@ Do not apply this notice to model discovery, balance queries, uploads or task po
|
|
|
121
128
|
|
|
122
129
|
### Submission, recovery, and results
|
|
123
130
|
|
|
124
|
-
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video submission mode; it does not make balance queries a prerequisite.
|
|
131
|
+
For an explicit `insufficient_credits` submission error, follow [insufficient credits during media submission](credits.md#insufficient-credits-during-media-submission). This applies to image generation, fixed image processing, and every video and audio submission mode; it does not make balance queries a prerequisite.
|
|
125
132
|
|
|
126
|
-
1. Submit the
|
|
127
|
-
2.
|
|
128
|
-
3.
|
|
129
|
-
4.
|
|
130
|
-
5. An explicit `submission_uncertain` error or a lost submission response can mean a task was created and charged. Use a known task ID for recovery. Without one, report the uncertain submission and stop; do not automatically resubmit or assume an unprovided idempotency mechanism. On a query error or polling limit, preserve the same ID and report the last observed state.
|
|
133
|
+
1. Submit once. Retain the returned task ID, environment, selected operation and expected output format. Image and video calls normally return an accepted task. Audio may already have completed. Inspect both the MCP error flag and the structured content, including on `isError=true`. Retain any known task ID, safe `failure_reason` and reported credit value.
|
|
134
|
+
2. On completion, deliver the actual `result_url` immediately without polling. Prefer a host-supported preview for playable media. Offer an audio separation ZIP as a download. If the URL is absent, report completion without an available link. Describe quality only after inspecting the artifact.
|
|
135
|
+
3. For an accepted or processing task, query the same ID with `get_task`. Each call performs one lookup. Within the task budget, wait between checks. The query can omit the model and result format, so retain the originating operation. Stop on completion, `failed`, `timed_out` or `cancelled`. Report unknown or conflicting state as uncertain. A safe failure summary may be generic.
|
|
136
|
+
4. A transport timeout, lost response or `submission_uncertain` may follow an accepted, chargeable submission. Recover only by looking up a known ID. Without an ID, report the uncertain outcome and stop. Never automatically resubmit. On a lookup error or polling limit, preserve the ID and last observed state.
|
|
131
137
|
|
|
132
138
|
`credits_increment` reports the increment returned by that particular submission or query, not a balance or a price quote. Preserve `0` as zero and `null` as unknown. Do not add submission and polling values together as if each observation were a new charge. Report missing or inconsistent values without estimating usage.
|
|
133
139
|
|
|
134
|
-
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure.
|
|
140
|
+
Task lookup is scoped to the selected API key's Business. Another Business cannot retrieve its results, and a task ID must not be moved between environments to recover a failure. Task lookup uses existing credentials. If none are usable, report `credentials_unavailable`. It creates no developer, key or task and consumes no credits. Use `list_models` for connection checks.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fotor Media Upload
|
|
2
2
|
|
|
3
|
-
Read this workflow for standalone uploads and when an image or
|
|
3
|
+
Read this workflow for standalone uploads and when an image, video or audio task needs local references. Use already accessible HTTPS references directly for creation; upload only the specific local files or client-accessible attachments needed by the user's request. An attachment label without readable bytes is not an uploadable file.
|
|
4
4
|
|
|
5
5
|
## Prepare the input
|
|
6
6
|
|
|
@@ -29,6 +29,6 @@ If the file changes after signing, recalculate its metadata and request a new li
|
|
|
29
29
|
|
|
30
30
|
Process multiple files one at a time, preserving input order and the association between each file and its successful URL. Report name, media type, exact byte size, and `file_url` for successes; report a concise reason for each failure without exposing signatures. A partial batch is not an all-success result. If a creation task needs a failed input, resolve it before submission rather than silently omitting it.
|
|
31
31
|
|
|
32
|
-
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
32
|
+
For standalone uploads, deliver those results and finish. For requested creation, use the uploaded URLs in the appropriate reference fields or the selected audio operation’s source URL or image-processing `image_url`, keeping the same environment. File acceptance by storage does not establish model compatibility or media-task success.
|
|
33
33
|
|
|
34
34
|
`expires_in` describes the maximum upload-address lifetime; temporary signing credentials may expire earlier. It does not describe file retention. Signature expiry does not delete an uploaded file, and `file_url` is not a presigned download URL. Do not promise permanent storage, a deletion time, or long-term URL availability unless the service provides that information.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fotor-upload
|
|
3
|
-
description: Upload local images, videos, or audio to Fotor and return usable media URLs. Use for standalone Fotor uploads or preparing local references for Fotor image and
|
|
3
|
+
description: Upload local images, videos, or audio to Fotor and return usable media URLs. Use for standalone Fotor uploads or preparing local references for Fotor image, video and audio tasks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Fotor Upload
|
|
@@ -9,4 +9,4 @@ Follow the shared [media upload workflow](references/media-upload.md) for file c
|
|
|
9
9
|
|
|
10
10
|
For a standalone request, finish with each file's name, media type, byte size, and successfully uploaded `file_url`; report failures separately. Uploading alone does not request media generation or website navigation.
|
|
11
11
|
|
|
12
|
-
For a combined creation request, preserve the file-to-URL mapping and reference order, then continue the requested image or
|
|
12
|
+
For a combined creation request, preserve the file-to-URL mapping and reference order, then continue the requested image, video or audio workflow with successfully uploaded inputs. Resolve missing required inputs before submitting that task.
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
# Fotor
|
|
2
|
-
|
|
3
|
-
Read this workflow for a balance question or an explicit recharge request. Media submission and ordinary website connection do not require a preliminary balance query.
|
|
1
|
+
# Fotor credit balance
|
|
4
2
|
|
|
5
3
|
## Query the selected account
|
|
6
4
|
|
|
7
|
-
1.
|
|
8
|
-
2. Call `get_credits` without arguments.
|
|
9
|
-
3.
|
|
10
|
-
4. Treat `credits_unavailable`, authentication errors, invalid/missing balance values, and other failures as unavailable information, never as zero. Do not create accounts, keys, replacement tasks, or credentials to work around a balance error. If a successful response has a valid balance but an unusable pricing link, report the balance and, when a link is selected below, the separate link problem.
|
|
11
|
-
|
|
12
|
-
## Select the response
|
|
13
|
-
|
|
14
|
-
| Request and result | Action |
|
|
15
|
-
| --- | --- |
|
|
16
|
-
| Balance below 100, or an explicit request to top up | Report the balance and deliver the validated pricing link as described below. Let the user click it. |
|
|
17
|
-
| Balance of 100 or more; no top-up request | Report only the balance. Keep the returned link out of the response. |
|
|
18
|
-
| Explicit balance-only or no-link instruction | Report only the balance, including when it is below 100. |
|
|
19
|
-
| Browser navigation is forbidden or unavailable | Deliver the selected link if the user permits links; link delivery needs no browser automation. |
|
|
20
|
-
| Query failed | Report the failure; do not infer a low balance or invent a pricing link. |
|
|
21
|
-
|
|
22
|
-
## Validate and deliver pricing links
|
|
23
|
-
|
|
24
|
-
Use this rule for both `get_credits.top_up_url` and a submission error's `top_up_url`:
|
|
25
|
-
|
|
26
|
-
1. Require a nonempty absolute HTTPS URL whose origin exactly matches the selected environment's website in the [connection table](mcp-integration.md#connection), with no embedded username/password. Check URL components rather than hostname substrings. Reject an unknown environment, malformed URL, or origin mismatch without visiting it, changing environments, or rewriting its host.
|
|
27
|
-
2. Use the exact returned URL as the Markdown target, with a label meaning "View Fotor plans" in the conversation language. Preserve its path, query, and fragment; the login handoff endpoint, `code` parameter, expiry, and single-consumption rules do not apply to ordinary pricing links. If the link is missing or invalid, explain that the pricing entry is unavailable instead of constructing a replacement.
|
|
28
|
-
3. Let the user click the link. A balance or recharge request alone does not call `get_website_url`, open a browser, or refresh a supposed ticket. If the user also explicitly requests a signed-in website session, complete the [website connection flow](mcp-integration.md#connect-to-the-website) separately, then provide the pricing link for them to open in that same browser.
|
|
29
|
-
|
|
30
|
-
Leave plan selection and payment to the user. A link or a loaded page does not establish website login, a completed payment, or an increased balance. Keep credentials and website-login tickets out of files and diagnostic logs.
|
|
5
|
+
1. When the user requests their own balance, follow [MCP authentication](mcp-integration.md#authenticate-mcp). Reuse valid authorization and discover `get_credits`. If it is unavailable, report that and stop.
|
|
6
|
+
2. Call `get_credits` without arguments. The authenticated session identifies the account. Report only the nonnegative numeric `credits` value, including zero, and finish. A balance query needs no website visit.
|
|
7
|
+
3. If authentication fails, the service reports an error, or the balance is missing or invalid, report it as unavailable. An unknown balance is not zero. Never infer a balance from task consumption.
|
|
31
8
|
|
|
32
9
|
## Insufficient credits during media submission
|
|
33
10
|
|
|
34
|
-
When
|
|
35
|
-
|
|
36
|
-
Stop dependent operations and retain any task ID returned. Do not automatically resubmit, infer that payment completed, or turn the error into `submission_uncertain`. A lost response or an explicit uncertain-submission result still follows the [task recovery workflow](mcp-integration.md#submission-recovery-and-results).
|
|
11
|
+
When a submission explicitly reports `insufficient_credits`, explain that the task could not proceed for that reason. Retain any known task ID and reported consumption, stop dependent operations, and finish without extra links, a balance query or another submission. A lost response is a different outcome; follow [task recovery](mcp-integration.md#submission-recovery-and-results).
|