docs: add attachment params to POST /api/content/create#91
docs: add attachment params to POST /api/content/create#91sweetmantech merged 2 commits intomainfrom
Conversation
Document the new optional attachment parameters for POST /api/content/create. These allow callers to provide custom audio and face-guide images that override the defaults from the artist's GitHub repo. Companion to recoupable/api#381 and recoupable/tasks#116. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 24 minutes and 31 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change extends the OpenAPI schema for the content creation endpoint by introducing two optional URI parameters ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
api-reference/openapi.json
Outdated
| "attached_audio_url": { | ||
| "type": "string", | ||
| "format": "uri", | ||
| "description": "Public URL of an audio file to use instead of selecting from the artist's Git repo songs. When provided, the pipeline downloads this audio, transcribes it, and selects a clip from it. Overrides the `songs` parameter.", |
There was a problem hiding this comment.
Did we consider expanding the songs param to allow http override instead of adding a attached_audio_url param?
api-reference/openapi.json
Outdated
| "description": "Public URL of an audio file to use instead of selecting from the artist's Git repo songs. When provided, the pipeline downloads this audio, transcribes it, and selects a clip from it. Overrides the `songs` parameter.", | ||
| "example": "https://example.com/my-song.mp3" | ||
| }, | ||
| "attached_image_url": { |
There was a problem hiding this comment.
KISS principle
- actual: attached_image_url
- required: images. array to match songs array.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
api-reference/openapi.json (1)
10742-10752: Document concrete constraints for attached media URLs.These new fields are great, but the contract is still underspecified (accepted formats, max file size/duration, and URL accessibility requirements). Adding those details will reduce integration errors and support churn.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-reference/openapi.json` around lines 10742 - 10752, Update the OpenAPI schema entries for attached_audio_url and attached_image_url to include concrete constraints: specify allowed file formats (e.g., audio: mp3, wav, m4a; image: png, jpg, jpeg, webp) in the description, add max file size (e.g., "max 50MB") and for audio include max duration (e.g., "max 5 minutes"), declare that URLs must be publicly accessible via HTTPS and return 200 on GET (no auth/redirects), add a pattern or format hint if desired (e.g., must be https://) and update the examples/descriptions to reflect these limits so integrators know accepted formats, size/duration caps, and accessibility requirements for attached_audio_url and attached_image_url.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api-reference/openapi.json`:
- Line 3788: Update the /api/content/validate operation description to clarify
that required-file checks (face guide, songs, etc.) are conditional: if request
includes attached_audio_url or attached_image_url those override the need for
stored artist files and will cause the endpoint to succeed where it otherwise
would fail; reference the artist_account_id parameter and describe that the
endpoint validates presence of either the artist's stored assets or the provided
attached_* URLs, and returns validation details (errors/warnings) accordingly so
clients don't reject requests that include override media.
---
Nitpick comments:
In `@api-reference/openapi.json`:
- Around line 10742-10752: Update the OpenAPI schema entries for
attached_audio_url and attached_image_url to include concrete constraints:
specify allowed file formats (e.g., audio: mp3, wav, m4a; image: png, jpg, jpeg,
webp) in the description, add max file size (e.g., "max 50MB") and for audio
include max duration (e.g., "max 5 minutes"), declare that URLs must be publicly
accessible via HTTPS and return 200 on GET (no auth/redirects), add a pattern or
format hint if desired (e.g., must be https://) and update the
examples/descriptions to reflect these limits so integrators know accepted
formats, size/duration caps, and accessibility requirements for
attached_audio_url and attached_image_url.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ef82e13b-61d4-46ef-8846-5c101a12c554
📒 Files selected for processing (1)
api-reference/openapi.json
api-reference/openapi.json
Outdated
| "/api/content/create": { | ||
| "post": { | ||
| "description": "Trigger the content creation pipeline for an artist. Provide `artist_account_id` to identify the target artist. Validates the artist has all required files (face guide, songs), then triggers a background task that generates a short-form video. Returns `runIds` \u2014 an array of run IDs that can each be polled via [GET /api/tasks/runs](/api-reference/tasks/runs). Authentication is handled via the x-api-key header.", | ||
| "description": "Trigger the content creation pipeline for an artist. Provide `artist_account_id` to identify the target artist. Validates the artist has all required files (face guide, songs) unless overridden by attached media, then triggers a background task that generates a short-form video. Returns `runIds` \u2014 an array of run IDs that can each be polled via [GET /api/tasks/runs](/api-reference/tasks/runs). Authentication is handled via the x-api-key header.", |
There was a problem hiding this comment.
Clarify /api/content/validate semantics after introducing override media.
Line 3788 correctly introduces conditional required-file validation, but /api/content/validate still reads as unconditional. That can cause clients to reject requests that would succeed with attached_audio_url or attached_image_url.
💡 Suggested wording update
- "description": "Check whether an artist has all the required files to run the content creation pipeline. Returns a structured report of each required and recommended file with its status. Required files must be present or the pipeline will fail. Recommended files improve output quality but are not strictly necessary. Provide `artist_account_id` as a query parameter.",
+ "description": "Check whether an artist has the required repository files to run the default content creation pipeline. Returns a structured report of each required and recommended file with its status. Note: POST /api/content/create can bypass some required repository assets when `attached_audio_url` and/or `attached_image_url` are provided. Recommended files improve output quality but are not strictly necessary. Provide `artist_account_id` as a query parameter.",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-reference/openapi.json` at line 3788, Update the /api/content/validate
operation description to clarify that required-file checks (face guide, songs,
etc.) are conditional: if request includes attached_audio_url or
attached_image_url those override the need for stored artist files and will
cause the endpoint to succeed where it otherwise would fail; reference the
artist_account_id parameter and describe that the endpoint validates presence of
either the artist's stored assets or the provided attached_* URLs, and returns
validation details (errors/warnings) accordingly so clients don't reject
requests that include override media.
…places attached_image_url Address sweetmantech's review: - Extend songs param to accept both slugs and public URLs (no separate attached_audio_url) - Replace attached_image_url with images array to match songs pattern (KISS) - Add Create Content to Guides navbar above Create Sandbox Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
attached_audio_urlandattached_image_urloptional parameters to theContentCreateRequestschema inopenapi.jsonContext
Companion to recoupable/api#381 and recoupable/tasks#116, which add support for extracting Slack message attachments and using them in the content creation pipeline.
Test plan
npx mintlify@latest devand verify the new params appear on the content/create page🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
/api/content/createendpoint documentation to reflect conditional file validation when attached media is provided.New Features