Studio API
The Studio API provides endpoints for generating and manipulating media — images, videos, audio effects, voiceovers, dialogue, and music. All endpoints are accessed under /api/v1/studio/* and authenticated with your API key.
Authentication
Studio endpoints use the same API key authentication as the Chat API. Include your key in the Authorization header:
Authorization: Bearer sk-tm-YOUR_KEY_HEREBase URL
https://terramind.com/api/v1/studioResponse Format
Most Studio endpoints return a JSON response with a consistent structure:
{
"success": true,
"data": {
"url": "https://...",
"model": "nano-banana",
// ... endpoint-specific fields
},
"credits": {
"used": 1,
"cost": 5.0,
"remaining": 9995.0
}
}Credits
Studio operations consume credits from your organization's balance. The credit cost varies by operation and model. The credits object in the response shows the amount deducted and your remaining balance.
Available Endpoints
POST/api/v1/studio/image/generateGenerate images from text
POST/api/v1/studio/image/editEdit images with text instructions
POST/api/v1/studio/image/upscaleUpscale an image (2x, 4x, 6x)
POST/api/v1/studio/image/remove-backgroundRemove image background
POST/api/v1/studio/image/batchBatch image processing
POST/api/v1/studio/video/generateGenerate videos from text
POST/api/v1/studio/audio/transcribeTranscribe audio to text
POST/api/v1/studio/sfx/generateGenerate sound effects
POST/api/v1/studio/voiceover/generateGenerate voiceovers
POST/api/v1/studio/dialogue/generateGenerate multi-voice dialogue
POST/api/v1/studio/music/planPlan a music composition
POST/api/v1/studio/music/generateGenerate music
Error Codes
| Code | Meaning |
|---|---|
| 400 | Invalid input — missing or invalid parameters |
| 401 | Unauthorized — invalid or expired API key |
| 402 | Insufficient credits |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
| 502 | Provider error — upstream service failed |