{"openapi":"3.0.0","info":{"description":"LLM, image, video, and audio inference via GMI Cloud. OpenAI-compatible chat completions, Anthropic Messages API, video generation with async jobs, and 200+ models behind one API.","version":[{"name":"v1","value":"v1"}]},"servers":[{"description":"LLM, image, video, and audio inference via GMI Cloud. OpenAI-compatible chat completions, Anthropic Messages API, video generation with async jobs, and 200+ models behind one API.","url":"https://api.apirails.com/gmicloudinference"}],"paths":{"/v1/models":{"get":{"tags":["Models"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference","api_endpoint":"https://api.gmi-serving.com/v1/models"},"summary":"List available models","description":"Lists available models with basic information about each model, including capabilities, ownership, and permissions.","security":[{"bearerAuth":[]}]}},"/v1/chat/completions":{"post":{"tags":["Chat"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference","api_endpoint":"https://api.gmi-serving.com/v1/chat/completions"},"summary":"Create chat completion","description":"Creates a model response for the given chat conversation. Supports text, images, and audio modalities. OpenAI-compatible.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"Model identifier (e.g. deepseek-ai/DeepSeek-R1, anthropic/claude-opus-4.8, openai/gpt-5.6)","required":true},"messages":{"type":"array","description":"Conversation history as an array of message objects with role and content","required":true,"items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the message sender","required":true,"enum":["system","user","assistant","tool"]},"content":{"type":"string","description":"Message content. Can be a string, or an array of content parts (text, image_url, input_audio)","required":true}}}},"tools":{"type":"array","description":"List of tools/functions the model may call","items":{"type":"object","properties":{"type":{"type":"string","description":"Tool type (OpenAI function-calling format).","required":true,"enum":["function"]},"function":{"type":"object","description":"The function definition.","required":true}}}},"max_tokens":{"type":"number","description":"Maximum number of tokens to generate in the completion"},"temperature":{"type":"number","description":"Sampling randomness between 0 and 2. Higher values = more random"},"top_p":{"type":"number","description":"Nucleus sampling threshold between 0 and 1"},"top_k":{"type":"number","description":"Top-k sampling value between 1 and 128"},"ignore_eos":{"type":"boolean","description":"If true, continue generating past the end-of-sequence token","enum":[true,false]},"stop":{"type":"array","description":"Up to 4 stop sequences where the model will stop generating","items":{"type":"string"}},"response_format":{"type":"object","description":"Force output format. Use {\"type\": \"json_object\"} for JSON mode","properties":{"type":{"type":"string","description":"Format type","required":true,"enum":["json_object","text"]}}},"stream":{"type":"boolean","description":"If true, stream partial progress as server-sent events","enum":[true,false]},"context_length_exceeded_behavior":{"type":"string","description":"Behavior when input exceeds model context length","enum":["truncate","error"]}}},"example":{"model":["deepseek-ai/DeepSeek-R1"],"messages":[[{"role":"user","content":"Hello!"}]],"tools":[[{"type":"function","function":{"name":"get_weather","description":"Get weather for a location","parameters":{"type":"object","properties":{"location":{"type":"string"}}}}}]],"max_tokens":[2000],"temperature":[1],"top_p":[1],"top_k":[50],"ignore_eos":[false],"stop":[["\n"]],"response_format":[{"type":"json_object"}],"stream":[false],"context_length_exceeded_behavior":["truncate"]}}}}}},"/v1/responses":{"post":{"tags":["Responses"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference","api_endpoint":"https://api.gmi-serving.com/v1/responses"},"summary":"Create response (OpenAI Responses API)","description":"OpenAI Responses API. Creates a response using the latest OpenAI response format with built-in tool use, web search, and file handling.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"Model identifier","required":true},"input":{"type":"string","description":"The input message(s) to respond to. Can be a string or array of input items","required":true},"instructions":{"type":"string","description":"System-level instructions that guide the model's behavior"},"max_output_tokens":{"type":"number","description":"Maximum number of output tokens"},"temperature":{"type":"number","description":"Sampling randomness between 0 and 2"},"top_p":{"type":"number","description":"Nucleus sampling threshold between 0 and 1"},"stream":{"type":"boolean","description":"If true, stream partial progress as server-sent events","enum":[true,false]},"tools":{"type":"array","description":"List of tools the model may call","items":{"type":"object","properties":{"type":{"type":"string","description":"Tool type (OpenAI function-calling format).","required":true,"enum":["function"]},"function":{"type":"object","description":"The function definition.","required":true}}}}}},"example":{"model":["openai/gpt-5.6"],"input":["Explain quantum computing in simple terms"],"instructions":["You are a helpful assistant."],"max_output_tokens":[4096],"temperature":[1],"top_p":[1],"stream":[false],"tools":[[]]}}}}}},"/v1/messages":{"post":{"tags":["Messages"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference","api_endpoint":"https://api.gmi-serving.com/v1/messages"},"summary":"Create message (Anthropic Messages API)","description":"Anthropic Messages API. Creates a message using the Anthropic format with Claude models on GMI Cloud's inference infrastructure.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"Model identifier (e.g. anthropic/claude-opus-4.8)","required":true},"max_tokens":{"type":"number","description":"Maximum number of tokens to generate","required":true},"messages":{"type":"array","description":"Array of message objects with role and content forming the conversation","required":true,"items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the message sender","required":true,"enum":["user","assistant"]},"content":{"type":"string","description":"Message content. Can be a string or array of content blocks","required":true}}}},"system":{"type":"string","description":"System prompt to guide the model's behavior"},"temperature":{"type":"number","description":"Sampling randomness between 0 and 1"},"top_p":{"type":"number","description":"Nucleus sampling threshold between 0 and 1"},"top_k":{"type":"number","description":"Only sample from the top K options for each subsequent token"},"stop_sequences":{"type":"array","description":"Custom text sequences that will cause the model to stop generating","items":{"type":"string"}},"stream":{"type":"boolean","description":"If true, stream partial progress as server-sent events","enum":[true,false]}}},"example":{"model":["anthropic/claude-opus-4.8"],"max_tokens":[4096],"messages":[[{"role":"user","content":"Hello!"}]],"system":["You are a helpful assistant."],"temperature":[1],"top_p":[1],"top_k":[40],"stop_sequences":[["\n\nHuman:"]],"stream":[false]}}}}}},"/v1/ie/requestqueue/apikey/models":{"get":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/video-api-reference","api_endpoint":"https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/models"},"summary":"List video models","description":"Lists available video generation models by model_id.","security":[{"bearerAuth":[]}]}},"/v1/ie/requestqueue/apikey/models/{model_id}":{"get":{"tags":["Video"],"parameters":[{"name":"model_id","in":"path","description":"Model identifier (e.g. Veo3, Kling-Text2Video-V2.1-Master)","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/video-api-reference","api_endpoint":"https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/models/{model_id}"},"summary":"Get video model details","description":"Retrieves details for a specific video model including schema, parameters, modalities, and descriptions.","security":[{"bearerAuth":[]}]}},"/v1/ie/requestqueue/apikey/requests":{"post":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/video-api-reference","api_endpoint":"https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests"},"summary":"Create video generation request","description":"Creates an async video generation job. Returns request_id for polling status. Jobs are processed asynchronously — use the observe endpoint to check completion.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"model":{"type":"string","description":"Video model identifier (e.g. Veo3, Kling-Text2Video-V2.1-Master, Luma-Ray2)","required":true},"payload":{"type":"object","description":"Model-specific generation parameters. Use the model details endpoint to get the full schema for each model.","required":true,"properties":{"prompt":{"type":"string","description":"Text prompt to guide video generation","required":true},"durationSeconds":{"type":"string","description":"Duration of the generated video in seconds"},"aspectRatio":{"type":"string","description":"Aspect ratio of the output video"},"negativePrompt":{"type":"string","description":"Negative prompt describing what to avoid in the video"},"personGeneration":{"type":"string","description":"Control person generation in the output"},"seed":{"type":"string","description":"Random seed for reproducible generation. Pass null for random."}}}}},"example":{"model":["Veo3"],"payload":[{"prompt":"A majestic eagle soaring through a mountain landscape at sunset","durationSeconds":"8","aspectRatio":"16:9","negativePrompt":"blurry, low quality, distorted","personGeneration":"allow_adult","seed":null}]}}}}}},"/v1/ie/requestqueue/apikey/requests/{request_id}":{"get":{"tags":["Video"],"parameters":[{"name":"request_id","in":"path","description":"Unique request ID returned when creating a video generation job","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/video-api-reference","api_endpoint":"https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/{request_id}"},"summary":"Get video generation request status","description":"Get the status and result of a video generation request. Poll this endpoint until status is 'success' to retrieve the output artifact URLs (video_url, thumbnail_image_url) in the outcome field.","security":[{"bearerAuth":[]}]}},"/v1/ie/requestqueue/apikey/upload-url":{"post":{"tags":["Video"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.gmicloud.ai/inference-engine/api-reference/video-api-reference","api_endpoint":"https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/upload-url"},"summary":"Get file upload URL","description":"Requests a pre-signed upload URL and a stable public URL for uploading files (images, videos, audio) to GMI Cloud storage. Supported file types: jpeg, jpg, png, mp4, mp3, wav.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"file_type":{"type":"string","description":"File extension of the file to upload","required":true,"enum":["jpeg","jpg","png","mp4","mp3","wav"]}}},"example":{"file_type":["png"]}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}