Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
__pycache__/
*.pyc
dist/
62 changes: 54 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Sonilo for Codex

Generate commercially licensed music, sound effects, and newly mixed videos
Generate commercially licensed music, sound effects, newly mixed videos,
translated subtitles, and dubbed videos
from text or video, directly in Codex — powered by Sonilo's hosted
generation service.

> Status: published. Sonilo 1.0.0 is available in the public
> [Plugins Directory](https://chatgpt.com/plugins/plugin_asdk_app_6a56e50ff2788191a96c7c8cd84bb6c2).
> This repository prepares version **1.1.0**; changing this package does not
> publish a new directory release or deploy the hosted MCP service.

## Requirements

Expand Down Expand Up @@ -41,7 +44,11 @@ The first time Codex calls a Sonilo tool, it opens your browser to sign in to
your [Sonilo Platform](https://platform.sonilo.com) account and approve access
(authorize → consent → callback). Codex stores the resulting token locally per
user; the plugin itself ships no key, secret, or token. Run
`codex mcp login sonilo` anytime to review or refresh the connection.
`codex mcp login sonilo_platform` anytime to review or refresh the connection.
The bundled connection is named `sonilo_platform` so an existing local Python
MCP named `sonilo` cannot override it. When upgrading a local installation,
reinstall the plugin and reconnect this hosted server. If the desktop app still
shows only the old tools, restart the app before starting a new conversation.

## Capabilities

Expand All @@ -50,23 +57,62 @@ user; the plugin itself ships no key, secret, or token. Run
- Generate sound effects from text or a public HTTPS video URL
- Return a new video with generated music while optionally preserving speech
- Return a new video with generated sound effects mixed in
- Generate music and sound effects together in one soundtrack or new video
- Generate multiple music versions and separate instrument stems
- Place sound effects at specified times
- Duck music under voice audio
- Inspect Sonilo Platform account services and usage
- Review translated subtitles before dubbing into the requested languages
- Use an eligible account's 15-second dubbing preview, then request a full video
- Inspect current USD cash balance, account services, trial allowance, and historical usage
- Retrieve an existing generation after waiting or a timeout without resubmission

See the [Sonilo MCP server](https://github.com/sonilo-ai/sonilo-mcp) for tool
details and limits.
Features depend on the connected hosted tool schemas and account access. The
[Sonilo MCP repository](https://github.com/sonilo-ai/sonilo-mcp) is a useful
feature reference, but its local-file and playback tools are not bundled here.

### Example prompts

- "Create 30 seconds of upbeat lo-fi music for a product demo."
- "Create a cinematic 3-second whoosh sound effect."
- "Add cinematic music to this public HTTPS video and return a new video while preserving speech: `<url>`"
- "Give me three music choices for this 30-second café ad: `<public HTTPS video URL>`"
- "Generate 30 seconds of jazz with separate drums and bass tracks."
- "Translate this video into English subtitles first. I will correct the product names before dubbing: `<public HTTPS video URL>`"
- "Let me try English dubbing for free: `<public HTTPS video URL>`"
- "What is my cash balance, and how many free text-to-music runs remain?"

Use real public HTTPS media URLs in place of the labels above. A local file
or attachment is not a hosted media URL. The plugin returns actual result
links for previews, subtitles, videos, variants, and stems.

### Account status and continuation

The plugin reads the current USD cash balance and service-specific trial
allowance from `get_account_services`. Historical spending comes from
`get_usage` and is not used as a balance. A missing balance is reported as
unavailable; zero cash alone does not rule out trials or invoiced billing.
The balance is a query-time snapshot, not a guarantee that the next generation
can run. Credit errors are explained without purchase links, and generation
is not retried automatically.

After a preview or confirmed credit rejection, ask to continue with the same
video. The plugin checks current services and retrieves any existing task
before submitting new work. A full video after a preview is a new generation
of the original source, not a free extension of the preview task.

Credit rejections now include the published
[Balance and free trials](https://platform.sonilo.com/usage-and-entitlements)
guide in the user's language (10 supported languages; English fallback).
The plugin explains the error and keeps known inputs for a user-requested
continuation. See the [1.1.0 implementation notes](docs/IMPLEMENTATION_1.1.0.md)
for service dependencies and the guide's pending directory-review assessment.

## Billing

Generation tools (`text_to_music`, `text_to_sfx`, `video_to_music`,
`video_to_sfx`, `video_to_video_music`, `video_to_video_sfx`, `audio_ducking`)
are **paid** and run against your Sonilo Platform account. Account and usage
Generation, transcription, dubbing, and video-analysis tools can consume
existing account credits. Available free runs depend on the service and
account; dubbing previews require one target language and no supplied script.
Multiple music variants and multi-language dubbing can cost more. Account and usage
tools (`get_account_services`, `get_usage`, `get_generation_task`) are
read-only and never incur a charge. Paid tools run only after you explicitly
ask for them.
Expand Down
71 changes: 71 additions & 0 deletions docs/IMPLEMENTATION_1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Sonilo 1.1.0 implementation

> October 4 update: desktop hosted balance/task reads and all three portal
> refusal scenarios pass. The user accepted the prior listening samples.
> Backend fixes are deployed and the Skill scan passed. A current actual
> walkthrough and final review attestations/submission remain. See
> [the live report](LIVE_TEST_1.1.0.md) for verification scope and limitations.


Scope: the 13 features in the [manager plan](https://docs.google.com/document/d/1woqbRgMlCemdw46mpP6Wz1uDkVUK9_C4QyPi2cX2y0s/edit).
This package updates the hosted-MCP workflow instructions and listing metadata;
it does not deploy the server, publish the plugin, or change account entitlements.

| Plan item | Package behavior |
| --- | --- |
| Subtitle review before dubbing | Route to `proofread`, wait for approval, then use approved target-language subtitle URLs. Requires the service to be enabled. |
| Music and effects together | Use one combined tool, selecting audio or new-video output to match the request. |
| Free dubbing preview | Check trial eligibility, require one explicit target language and no scripts, label the actual preview metadata. |
| Full video after preview | Require the user's full-version request; submit the original source once as a new task, without claiming only the remainder is billed. |
| Balance and trial lookup | Read current `cash_balance` and `currency` from `get_account_services`, alongside actual service trial counts. Preserve USD sub-cent precision; missing values remain unknown. Usage history is separate. |
| Insufficient-credit feedback | Explain the actual error, avoid repeated submissions, and report charging/refunds only when established. Link to the deployed Balance and free trials guide in the conversation language; no automatic retry or direct purchase link. |
| Continue after account update | Refresh services, retain known inputs, and retrieve existing work before any authorized resubmission. |
| Usage examples | Bundle concrete prompts and response patterns; link the public MCP guide for product-help requests. |
| Generation status | Poll the original task; preserve its ID after interruptions and avoid unsupported background-monitoring promises. |
| Multiple variants | Use one supported `variants_num` request and label each returned variant. Do not use a free-only request to authorize paid variants. |
| Audible narration | Use supported speech preservation and ducking parameters; remove obsolete `isolate_vocals` guidance. |
| Timed effects | Follow the hosted JSON-string segment schema, including contiguous quiet gaps. |
| Instrument stems | Request stems of generated music, return actual stem URLs, and handle partial separation failures without regenerating. |

## Backend integration

[Backend PR #384](https://github.com/sonilo-ai/sonilo-api-dashboard/pull/384)
was merged and [deployed to production](https://github.com/sonilo-ai/sonilo-api-dashboard/actions/runs/36210070550)
on 2026-09-26 UTC. The hosted account tool now returns `cash_balance` (decimal
string) and `currency` (`USD`); it does not expose `billing_mode`. No new plugin
endpoint, OAuth scope, or client library is needed.

The manager plan's dollar-balance example is supported using actual returned
data. Its continuation examples are intent illustrations: the plugin reports
current balance, but never promises sufficient funds from a snapshot alone.
“No charge” and “trial exhausted” wording requires evidence in the response.

## Published help page and review status

The [Balance and free trials guide](https://platform.sonilo.com/usage-and-entitlements)
was deployed on 2026-10-02 after dashboard PRs #391 and #392, in
[production run 37076829530](https://github.com/sonilo-ai/sonilo-api-dashboard/actions/runs/37076829530).
The skill links its 10 language routes for confirmed credit rejections and
balance/trial help. It preserves the original request for user-requested continuation.

The page deliberately retains the public site's shared navigation and the
**View pricing / View billing** buttons requested for review. The plugin reply
links to the explanation and does not tell users to click through to purchase.
This is a review candidate, not an assertion that OpenAI has approved the flow.
The commerce rules prohibit direct or indirect digital-service sales; acceptance
of this page with its onward buttons remains unconfirmed. Do not hide those
buttons or describe the page as having no purchase-related links in review materials.

Hosted availability still depends on the connected account. In particular,
`proofread` is feature-gated. Check connected schemas and `available_services`
at runtime; this package does not change backend flags.

## Verification scope

- Package structure, assets, reference links, manifest, and skill validation.
- Documented tool names and parameter types compared with the hosted MCP source.
- Read-only production endpoint and OAuth discovery checks via `check_release.py --live`.
- No paid generation, authenticated end-to-end media run, server deployment,
directory submission, or installed-plugin replacement is performed by these checks.

Reference: [OpenAI commerce and monetization](https://developers.openai.com/plugins/plugin-guidelines#commerce-and-monetization).
Loading
Loading