Skip to main content

Video API Reference (coming soon)

Introduction

This API reference describes the RESTful, streaming, and realtime APIs you can use to interact with the GMI Inference Engine. REST APIs are usable via HTTP in any environment that supports HTTP requests.

Authentication

The GMI API uses API keys for authentication. Create, manage, and learn more about API keys in your organization settings.

Important Security Notes:

  • API keys should be provided via HTTP Bearer authentication:
    Authorization: Bearer GMI_API_KEY
  • Never expose API keys in client-side code
  • Load keys from environment variables or key management services
  • For multi-organization access, specify headers:
    curl https://api.gmi-serving.com/v1/models \
    -H "Authorization: Bearer $GMI_API_KEY" \
    -H "X-Organization-ID: your_org_id"

List Video Models

GET https://api.gmi-serving.com/video/models

Lists available models with basic information about each model, including capabilities, ownership, and permissions.

Example Request

curl https://api.gmi-serving.com/video/models \
-H "Authorization: Bearer $GMI_API_KEY"

Response

{
"object": "list",
"data": [
{
"id": "",
"object": "Wan-AI/Wan2.1",
"created": 1687530000,
"owned_by": "Wan-AI",
},
// ... other models ...
]
}

Submit a Request

The client API handles the full request/response cycle. It submits the job, polls for status, and returns the result once processing completes.

response=$(curl --request POST \
--url https://queue.gmi-serving.com/video/Wan2_1 \
--header "Authorization: Key $GMI_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"prompt": "Baseball player hiting the ball, slow motion.",
"image_url": "PUT YOUR IMAGE URL HERE"
}')

The command itself is async and will returns a request_id even the run time is short.
User is expected to use the Queue API (below) to poll status and fetch the final output.


Queue API

Long-running jobs (e.g., video or batch LLM inference) should use the Queue API.

Check Status

curl --request GET \
--url https://queue.gmi-serving.com/video/requests/$REQUEST_ID/status \
--header "Authorization: Key $GMI_API_KEY"

Get the Result

curl --request GET \
--url https://queue.gmi-serving.com/video/requests/$REQUEST_ID \
--header "Authorization: Key $GMI_API_KEY"

File Handling

Some endpoints accept file URLs or Base64 data URIs.

MethodNotes
Data URIConvenient for small files. Large payloads may slow requests.
Hosted URLMust be publicly accessible; some hosts block cross-site or rate-limit.
Upload APIGMI provides an upload endpoint returning a URL you can reuse in requests. (Not available in all SDKs)

Check each model's discription for details.


Schemas

Image-to-Video (Input)

FieldTypeDefaultNotes / Enum Values
promptstringPrompt describing the desired video
image_urlstring (URL)Source image
durationenum"5"5, 10 (seconds)
aspect_ratioenum"16:9"16:9, 9:16, 1:1
negative_promptstring"blur, distort, and low quality"Undesired features
seed_valuestring90347039510843Seed value

Image-to-Video (Output)

{
"video": {
"url": "https://storage.gmi-serving.com/blablabla.mp4"
}
}