Beta

This API is in beta. Endpoints, request/response formats, and behavior may change without notice.

API Reference

Terramind Documentation

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:

Header
Authorization: Bearer sk-tm-YOUR_KEY_HERE

Base URL

https://terramind.com/api/v1/studio

Response Format

Most Studio endpoints return a JSON response with a consistent structure:

Success Response
{
  "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/generate

Generate images from text

POST
/api/v1/studio/image/edit

Edit images with text instructions

POST
/api/v1/studio/image/upscale

Upscale an image (2x, 4x, 6x)

POST
/api/v1/studio/image/remove-background

Remove image background

POST
/api/v1/studio/image/batch

Batch image processing

POST
/api/v1/studio/video/generate

Generate videos from text

POST
/api/v1/studio/audio/transcribe

Transcribe audio to text

POST
/api/v1/studio/sfx/generate

Generate sound effects

POST
/api/v1/studio/voiceover/generate

Generate voiceovers

POST
/api/v1/studio/dialogue/generate

Generate multi-voice dialogue

POST
/api/v1/studio/music/plan

Plan a music composition

POST
/api/v1/studio/music/generate

Generate music

Error Codes

CodeMeaning
400Invalid input — missing or invalid parameters
401Unauthorized — invalid or expired API key
402Insufficient credits
429Rate limit exceeded
500Internal server error
502Provider error — upstream service failed