Summary from the chat in Remy:
1. What happens
Two separate SDK actions in @mindstudio-ai/agent are consistently failing with server-side errors, blocking the end-to-end pipeline in my app. Both are reproducible with minimal inputs. Other SDK actions in the same execution environment (generateText, generateImage, textToSpeech, runTask, runFromConnectorRegistry) work fine.
Issue A: mindstudio.uploadFile() returns 403 Forbidden
Minimal reproduction inside a backend method:
typescript
import { mindstudio } from '@mindstudio-ai/agent';
export async function testUpload() {
const buf = Buffer.from('hello world', 'utf8'); // 11 bytes
const { url } = await mindstudio.uploadFile(buf, {
extension: 'txt',
type: 'text/plain',
});
}
Result: MindStudioError: Forbidden with status: 403, code: 'api_error'. No additional detail in err.details.
The same failure occurs via the mindstudio upload /path/to/file.txt CLI, which returns {"error":{"message":"400 Bad Request"}}.
Size is not the issue (11 bytes fails). MIME type is not the issue (tested with text/plain, image/jpeg, audio/mpeg — all fail). Auth context is present and valid (other SDK actions in the same method succeed).
Issue B: mindstudio.generateAsset() with outputFormat: 'mp4' returns step_execution_error
Minimal reproduction:
typescript
const result = await mindstudio.generateAsset({
source: '<html>...</html>',
sourceType: 'html',
outputFormat: 'mp4',
pageSize: 'custom',
testData: {},
options: {
pageWidthPx: 1080,
pageHeightPx: 1920,
videoDurationSeconds: 25,
rehostMedia: true,
},
intermediateAsset: true,
});
Result: MindStudioError: [generatePdf] step_execution_error with status: 500. Error message references generatePdf even though we’re requesting mp4 output. No additional detail available. Fails consistently on every call.
2. Intended behavior
Issue A
mindstudio.uploadFile(buffer, { extension, type }) should accept a Buffer or Uint8Array and return { url: string } pointing to a permanent f.mscdn.ai CDN URL, as documented in the SDK reference.
Issue B
mindstudio.generateAsset({ sourceType: 'html', outputFormat: 'mp4', options: { pageWidthPx, pageHeightPx, videoDurationSeconds, rehostMedia } }) should render the provided HTML to a 1080×1920 mp4 video and return { url: string } pointing to the rendered video on the CDN.
3. Link to AI Agent
App ID: 316ea642-9ebc-45bd-b999-087acecd9e98
Editor: https://app.mindstudio.ai/agents/316ea642-9ebc-45bd-b999-087acecd9e98
4. Supporting detail
-
The failures began sometime between when my scenario seed data was built (which successfully used both actions) and now. Listing records in the database created earlier show successful voiceover URLs on
f.mscdn.ai; newer records created today fail at the upload step. -
For Issue A, I have a verified, working ElevenLabs connection on the workspace and have confirmed via
runFromConnectorRegistry('elevenlabs/create-speech', ...)that the connector path returns a permanentf.mscdn.aiURL. So the CDN itself is writable via connector actions, but directuploadFilecalls are being rejected. -
For Issue B, the same failure hits scenario seed scripts (
renderSampleReel) in addition to live pipeline invocations. Logs captured in.logs/requests.ndjsonshow the error recurring on every attempt.