mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7922] [Feature]: Optional ToAPIs async scene-image and scene-video provider (tested community adapter) #4354
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @YamiAnn on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7922
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Hi @SpicyMarinara — Yami from ToAPIs here. Following your invitation to submit a focused feature request, we would like to propose ToAPIs as an optional asynchronous scene-image / scene-video API provider.
We understand that another chat provider already covered by Custom-OAI is not needed. This request is limited to the media contract: ToAPIs returns an async task
id, uses dedicated image/video status routes, and accepts uploaded image URLs for reference images / first frames. Those paths differ from the pinned OpenAI-image and Seedance implementations; changing Base URL alone does not enable them.Proposed solution
Evaluate a narrowly scoped media adapter while retaining Custom-OAI for text. We prepared a community patch against Marinara 2.5.1, staging commit
d0e481913f9a0e3bab0e9b767009500d0577f98a, for assessment rather than claiming an official integration.Initial API Provider plan:
gpt-image-2(1k, one image) andseedance-2-mini(initial acceptance preset: 4s, 480p, 16:9, first frame, audio off).Published, reproducible materials:
Alternatives considered
toapis.com/toapis.cnorigins. A dedicated service entry may be preferable upstream; we welcome your direction.Additional context
Tests completed on 2026-10-21
pnpm checkpassed, including production build; one existing unrelated hook warning, zero errors.These are local community-build results, not upstream acceptance. The optional Illustrator installation / Illustrate button, native UI reference-image editing, mobile WebKit, other model variants, concurrency and production deployment remain unverified. Historical task identity is saved privately, but there is no automatic resume UI or live billing panel.
API calling costs
gpt-image-2, 1k, n=1seedance-2-minideepseek-v4-flashPrompt ModelOnly $0.13338 is confirmed media settlement for this run; the image quote and unknown-phase text logs are not a confirmed combined net total. Text prices are public catalog references, not a
/v1/pricingtext quote. The first video preview was stopped before paid video submission to correct defaults, accounting for the two text logs.API documentation and request mapping
POST /v1/images/generations/POST /v1/videos/generationsreturn a taskid; poll the corresponding/generations/{id}route and downloadresult.data[0].urlafterstatus: completed. Upload inputs viaPOST /v1/uploads/images; image edits usereference_images, video first frames useimage_with_roles: [{url, role: "first_frame"}]. Full runnable request/response mapping is included in the linked materials.The tested server used
https://toapis.cn/v1. The international option ishttps://toapis.com/v1; regional URL differences and network-test limits are documented. Does this scoped asynchronous media provider fit the integration path you would consider?Thanks for taking a look!
Yami · ToAPIs
Template check
@SpicyMarinara commented on GitHub (Oct 21, 2026):
Hi Yami, thanks for the detailed proposal and the reproducible patch and evidence.
We're open to making Marinara Engine compatible with ToAPIs through the existing connection types. We want to reserve new branded provider entries for official model providers, so we would keep ToAPIs out of the provider and service lists.
The integration direction is:
We understand that changing the base URL alone is insufficient with the current media implementation. Your patch already demonstrates the endpoint-based adapter approach, which fits this direction.
We'll handle the upstream follow-up from here. The patch and reported test results are useful references; acceptance will still require our own review and validation. Thanks for keeping the request focused.
@SpicyMarinara commented on GitHub (Oct 21, 2026):
Ownership: Codex is handling the upstream compatibility work for @SpicyMarinara in
codex/7922-toapis-media. The change will reuse the existing OpenAI image and Seedance video selections with a ToAPIs base URL; it will not add a provider or service list entry. I will validate the asynchronous request, upload, polling, cancellation and result download paths before marking the linked PR ready.@YamiAnn commented on GitHub (Oct 21, 2026):
Thanks @SpicyMarinara for taking ownership of the upstream work, and for moving the compatibility forward in #7941. We’re happy to follow the existing connection and service selections as you described.
Beyond the integration, we’d love to explore a longer-term API supply partnership with Marinara. ToAPIs can support your image, video and text model needs, and we’re happy to discuss preferential pricing based on the models and expected usage, along with trial credits for evaluation.
We’re also available to help troubleshoot request parameters, reference uploads, asynchronous task handling and billing receipts as the implementation is reviewed and tested.
Would you be open to discussing an API supply collaboration alongside the compatibility work? We can continue here, or you’re welcome to reach me at yami@toapis.com to discuss the commercial details.
Thanks again — we’d be glad to support the project and build a lasting collaboration.
YamiAnn · ToAPIs team
@SpicyMarinara commented on GitHub (Oct 21, 2026):
Implemented in #7941 and merged into
staging, with no new provider or service option.Use the existing Image Generation → OpenAI (DALL-E) or Video Generation → Seedance 2.0 connection, with
https://toapis.com/v1orhttps://toapis.cn/v1, your key and the model ID entered manually. Text continues through Custom (OAI-Compatible).The initial scope is ordinary
gpt-image-2: one 1k image, Auto quality and at most one reference; andseedance-2-mini: 4 seconds, 480p, 16:9, audio off, with an optional first frame. Save those video defaults before using Test Video or Gallery. Unsupported settings are rejected before task submission.The adapter handles uploads, asynchronous polling, safe output downloads, cancellation and private reconciliation receipts. Ambiguous paid submissions cannot trigger an automatic replacement through Engine fallback. Provider reasons remain available in the UI and debug logs; operational error logs use safe metadata, including the local receipt ID when the task flow has it. A deadline message can omit the receipt identifier, so reconciliation may require locating the durable receipt manually. For package automation, update Noodle to 1.5.9 and Slurp to 0.3.53; the companion safety changes are merged and publication-verified in Marinara-Agents #1530. Existing installations are not automatically upgraded by that publication.
pnpm check, 45 offline integration checks through actual app routes and serialized logs, neighboring image-reference/timeout/security and logging regressions, and desktop/mobile Gallery playback checks passed. Final-head hosted review and required checks completed before merging. Provider HTTP was mocked in our checks: no fresh paid generation, billing settlement, live Illustrator installation or physical-device proof is claimed.@YamiAnn commented on GitHub (Oct 23, 2026):
Thanks @SpicyMarinara for implementing #7941 and merging the compatibility work into
staging. We’ve noted the existing OpenAI image / Seedance video selections and the initial supported settings, and we’ll keep our community guide aligned with that scope.Following up on the API supply discussion: if Marinara currently runs, or plans to run, its own hosted service, API gateway or managed model offering, ToAPIs could also serve as an optional upstream supplier. We can prepare preferential pricing around the specific image, video and text models, settings and expected usage, and coordinate evaluation credits for a small real-key acceptance run.
We respect your policy on branded provider entries; upstream supply can be evaluated through the existing connection types. Would this be relevant to your plans, and who would be the right person to discuss model supply and commercial terms with?
If useful, please share the models you care about and an approximate usage range privately at yami@toapis.com, or via business WeChat. We can then put together a focused quote and test plan.
Thank you again for the implementation and validation notes.
Yami · ToAPIs
@SpicyMarinara commented on GitHub (Oct 23, 2026):
@YamiAnn Thanks for the offer, but we’re not interested in an API supply or commercial partnership. We do not run, plan, or intend to host any services, API gateways, or managed model offerings.
Marinara Engine is self-hosted: users choose their own providers and supply their own API keys. We therefore have no centralized model usage or upstream supply requirements to discuss.
Thanks for understanding.