Skip to main content
These routes call Magica end to end. They block until the provider finishes, up to 5 minutes, and return the result in the same HTTP response. A provider poll that exceeds that window is 504 TIMEOUT. A success also emits tool.completed. Result URLs are copied to object storage when it is configured.

Crop Image

POST /api/v1/tools/crop_image Provide exactly one complete rectangle: percent fields, pixel x / y / width / height, or crop.{x,y,width,height}.

GPT Image 2

POST /api/v1/tools/gpt_image_2
Add image_url to run edit mode.

Merge Videos

POST /api/v1/tools/merge_videos
transition is none, fade, or dissolve.

Response

string
crop_image, gpt_image_2, or merge_videos.
object
Provider output, including the result URL.
object[]
{ url, mimeType, filename? } after durable copy when storage is configured.
string
Credits charged for this call.
string
Magica run id.
integer
Any other {toolName} returns 404 UNKNOWN_TOOL.