# Table of Contents - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) - [Siray AI API Docs | OpenAI Compatible API](#siray-ai-api-docs-openai-compatible-api) --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/#content-area) [​](https://docs.siray.ai/#siray-the-unified-ai-infrastructure-for-enterprise-growth) Siray: The Unified AI Infrastructure for Enterprise Growth --------------------------------------------------------------------------------------------------------------------------------------------------- * **One-Click Access to the World’s Most Comprehensive Model Library** * Integrates 300+ AI models covering the full spectrum of capabilities including language (LLMs), T2I, TTS, T2V and more. * A single API interface allows access to all models, completely eliminating the complexity and inefficiency of scattered, multi-source integration. * **Enterprise-Grade Smart Routing · 99.9% Availability** * Integrates 20+ model providers with 30+ global acceleration nodes. * The intelligent path optimization algorithm automatically matches the optimal route, ensuring every call is high-speed, stable, and delivers seamless, undetectable latency. * **Full-Chain Compliance · Trusted Security** * Fully compliant with strict security standards, rigorously vetting every model provider and data transfer process. * Provides enterprises with traceable security assurance for API usage, ensuring safety and trust. * **Scaled Discount Supply · Cost Savings Up to 70%** * Multi-vendor aggregation and dynamic routing mechanisms automatically match the lowest calling cost path. * Single call costs can be reduced by **up to 70%**—delivering cost reduction without sacrificing quality. * **FDE (Forward Deployed Engineer) Expert Escort · Accelate Project Launch** * Provides N:1 technical support to quickly diagnose and solve problems. * On average, Siray help you shortens time-to-market by 20%, accelerating the rapid iteration, scaled deployment, and commercialization of AI projects. [Quickstart\ ----------\ \ Set up your account and get started.](https://docs.siray.ai/quickstart) [Model APIs\ ----------\ \ Start your project with AI APIs.](https://docs.siray.ai/model-apis/api-integration) --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/account-balance#content-area) Get account balance cURL curl --request GET \ --url https://api.siray.ai/v1/account/balance \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/account/balance" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/account/balance', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/account/balance",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/account/balance" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/account/balance") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/account/balance") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 401 403 500 { "request_uuid": "f1c2d3e4-5a6b-7c8d-9e0f-1a2b3c4d5e6f", "code": 200, "message": "OK", "data": { "user_id": "user-3f8a2c1d", "user_name": "alice", "email": "alice@example.com", "balance": 123.45, "coupon_balance": 1.25, "available_balance": 121.1, "frozen_balance": 3.6 } } { "request_uuid": "", "code": 401, "message": "missing authorization header" } { "request_uuid": "", "code": 401, "message": "missing authorization header" } { "request_uuid": "", "code": 401, "message": "missing authorization header" } GET / v1 / account / balance Try it Get account balance cURL curl --request GET \ --url https://api.siray.ai/v1/account/balance \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/account/balance" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/account/balance', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/account/balance",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/account/balance" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/account/balance") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/account/balance") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 401 403 500 { "request_uuid": "f1c2d3e4-5a6b-7c8d-9e0f-1a2b3c4d5e6f", "code": 200, "message": "OK", "data": { "user_id": "user-3f8a2c1d", "user_name": "alice", "email": "alice@example.com", "balance": 123.45, "coupon_balance": 1.25, "available_balance": 121.1, "frozen_balance": 3.6 } } { "request_uuid": "", "code": 401, "message": "missing authorization header" } { "request_uuid": "", "code": 401, "message": "missing authorization header" } { "request_uuid": "", "code": 401, "message": "missing authorization header" } [​](https://docs.siray.ai/api-reference/account-balance#overview) Overview ----------------------------------------------------------------------------- Use this endpoint to inspect the account behind your API key: its identity (email, user ID, name) and a balance summary in US dollars. Use `available_balance` to decide whether to issue new requests. It already accounts for amounts reserved by in-flight generation requests (`frozen_balance`), so no manual subtraction is needed. [​](https://docs.siray.ai/api-reference/account-balance#endpoint) Endpoint ----------------------------------------------------------------------------- * `GET https://api.siray.ai/v1/account/balance` **Headers** * `Authorization: Bearer ` [​](https://docs.siray.ai/api-reference/account-balance#response-structure) Response structure ------------------------------------------------------------------------------------------------- { "request_uuid": "f1c2...", "code": 200, "message": "OK", "data": { "user_id": "user-3f8a2c1d", "user_name": "alice", "email": "alice@example.com", "balance": 123.45, "coupon_balance": 1.25, "available_balance": 121.10, "frozen_balance": 3.60 } } ### [​](https://docs.siray.ai/api-reference/account-balance#fields) Fields * `request_uuid`: Identifier of this API call, useful for support and log correlation. * `code` / `message`: Service-level indicators for the request outcome (`200` / `OK` on success). * `data.user_id`: ID of the account that owns the API key. * `data.user_name`: Name of that account. * `data.email`: Email of that account. * `data.balance`: Account balance in USD. * `data.coupon_balance`: Remaining coupon balance in USD (expired coupons excluded). * `data.available_balance`: Balance you can actually spend, in USD: `available_balance = balance + coupon_balance − frozen_balance`. * `data.frozen_balance`: Total amount currently reserved by in-flight requests, in USD. It is `0` when no amount is frozen. All amounts are in **USD, rounded to two decimal places**. [​](https://docs.siray.ai/api-reference/account-balance#usage-example) Usage example --------------------------------------------------------------------------------------- curl -X GET "https://api.siray.ai/v1/account/balance" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" > `frozen_balance` is reserved by in-flight generation requests and is released automatically once they settle or expire; `available_balance` recovers accordingly without any action on your side. [​](https://docs.siray.ai/api-reference/account-balance#errors) Errors ------------------------------------------------------------------------- The endpoint returns the standard response envelope. Non-`200` `code` values indicate failure and come with a `message` and no `data`. | HTTP status | `code` | Typical cause | | --- | --- | --- | | 401 | 401 | Missing or malformed `Authorization` header; unknown API key. | | 403 | 403 | API key is disabled or expired, or the account is forbidden. | | 500 | 500 | Upstream (billing) validation failure; retry later. | #### Authorizations [​](https://docs.siray.ai/api-reference/account-balance#authorization-authorization) Authorization string header required API token passed as a Bearer token in the Authorization header. #### Response 200 application/json Account identity and balance summary Account identity and balance summary response. [​](https://docs.siray.ai/api-reference/account-balance#response-request-uuid) request\_uuid string required Identifier of this API call, useful for support and log correlation. [​](https://docs.siray.ai/api-reference/account-balance#response-code) code integer required Service-level status code (200 on success). Example: `200` [​](https://docs.siray.ai/api-reference/account-balance#response-message) message string required Additional information about the request result. Example: `"OK"` [​](https://docs.siray.ai/api-reference/account-balance#response-data) data object required Account identity and balance summary. All amounts are USD rounded to two decimal places. Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/fail-code#content-area) [​](https://docs.siray.ai/api-reference/fail-code#overview) Overview ----------------------------------------------------------------------- When a generation task fails (`status` is `FAILURE`) or a submit/query request is rejected, the response may include a `fail_code` field. Use this code for programmatic handling; `fail_reason` provides the human-readable message. Names that include `` are templates. The actual code substitutes the parameter name, for example `MissingParameter.Prompt`. [​](https://docs.siray.ai/api-reference/fail-code#codes) Codes ----------------------------------------------------------------- | fail\_code | HTTP | Description | | --- | --- | --- | | `MissingParameter` | 400 | Missing a required parameter | | `MissingParameter.` | 400 | Missing the specified parameter | | `InvalidParameter` | 400 | Invalid request parameter; also commonly returned when content moderation rejects the request | | `InvalidParameter.` | 400 | Invalid value for the specified parameter | | `InvalidImageURL.EmptyURL` | 400 | Image URL is empty | | `InvalidImageURL.InvalidFormat` | 400 | Image URL, Base64 data, or format could not be parsed | | `InputImageSensitiveContentDetected` | 400 | Input image contains sensitive content | | `InputImageSensitiveContentDetected.PolicyViolation` | 400 | Input image may involve copyright restrictions | | `InputImageSensitiveContentDetected.PrivacyInformation` | 400 | Input image may contain a real person | | `OutputImageSensitiveContentDetected` | 400 | Output image contains sensitive content | | `OutputImageSensitiveContentDetected.DeepFake` | 400 | Output image may contain a forged ID or credential | | `OutputVideoSensitiveContentDetected` | 400 | Output video contains sensitive content | | `OutofContextError` | 400 | Image and text tokens exceed the context length limit | | `AuthenticationError` | 401 | API key or AK/SK is missing, invalid, or expired | | `AccessDenied` | 403 | No permission to access the target resource | | `OperationDenied.ServiceNotOpen` | 403 | Model service is not enabled | | `AccountOverdueError` | 403 | Account has an overdue balance | | `InsufficientBalance` | 403 | Insufficient balance | | `EmailNotVerified` | 403 | Email is not verified | | `KeyDenied` | 403 | API key is disabled | | `InvalidEndpointOrModel.NotFound` | 404 | Model or endpoint does not exist or is not accessible | | `ModelNotOpen` | 404 | Account has not enabled this model | | `UnsupportedModel` | 404 | Model does not support the requested feature | | `ServerOverloaded` | 429 | Service is overloaded | | `InternalServiceError` | 500 | Internal service error | | `TaskSubmitFailed` | Other non-200 | Submission failed but the upstream code could not be parsed | | `MissingParameter.Prompt` | 400 | Prompt is missing or empty | | `MissingParameter.Model` | 400 | Model name is empty | | `InvalidParameter.Prompt` | 400 | Prompt type could not be parsed | | `InvalidParameter.Model` | 400 | Model type could not be parsed | | `InvalidParameter.Request` | 400 | JSON / request structure / multipart parsing failed | | `InvalidParameter.TaskTypeConstraint` | 400 | Parameter is incompatible with the task type | | `InvalidParameter.TaskTypeMismatch` | 400 | Specified task type does not match the detected result | | `InvalidEndpoint.ClosedEndpoint` | 400 | Endpoint is closed or unavailable | | `InvalidArgumentError` | 400 | Invalid protocol parameter | | `InvalidArgumentError.UnknownRole` | 400 | Unsupported role | | `InvalidArgumentError.InvalidImageDetail` | 400 | Image detail only supports auto/high/low | | `InvalidArgumentError.InvalidPixelLimit` | 400 | Invalid custom image pixel upper/lower bound | | `SensitiveContentDetected` | 400 | Input text may contain sensitive information | | `InputTextSensitiveContentDetected` | 400 | Input text triggered content safety filtering | | `ContentPolicyViolation` | 400 | Blocked by local content safety policy | | `InvalidAccountStatus` | 401 | Account status is abnormal | --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/introduction#content-area) [​](https://docs.siray.ai/api-reference/introduction#authentication) Authentication -------------------------------------------------------------------------------------- The Siray API uses API keys in the `request headers` to authenticate requests. Authorization: Bearer Get API Key ----------- Click here to get your API key. --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "max_tokens": 128000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-fable-5.1", "stream": false, "temperature": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "max_tokens": 128000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-fable-5.1", "stream": False, "temperature": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ max_tokens: 128000, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-fable-5.1', stream: false, temperature: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'max_tokens' => 128000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-fable-5.1',\ 'stream' => false,\ 'temperature' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "max_tokens": 128000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-fable-5.1", "stream": false, "temperature": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "max_tokens": 128000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-fable-5.1", "stream": False, "temperature": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ max_tokens: 128000, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-fable-5.1', stream: false, temperature: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'max_tokens' => 128000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-fable-5.1',\ 'stream' => false,\ 'temperature' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"max_tokens\": 128000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-fable-5.1\",\n \"stream\": false,\n \"temperature\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-fable-5.1` [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#body-max-tokens) max\_tokens integer default:128000 Maximum number of tokens to generate Required range: `1 <= x <= 128000` [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-fable-5.1#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-haiku-4-5-20251001", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-haiku-4-5-20251001", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'claude-haiku-4-5-20251001', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'claude-haiku-4-5-20251001',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-haiku-4-5-20251001", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-haiku-4-5-20251001", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'claude-haiku-4-5-20251001', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'claude-haiku-4-5-20251001',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-haiku-4-5-20251001\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-model) model enum required Model name to use for the request Available options: `claude-haiku-4-5-20251001` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4-5-20251001#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-4.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-4.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-haiku-4.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-haiku-4.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-4.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-4.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-haiku-4.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-haiku-4.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-haiku-4.5` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-4.5#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-opus-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-opus-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-opus-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-opus-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-opus-5.5` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-5.5#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-4.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-4.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 64000, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-sonnet-4.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 64000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-sonnet-4.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-4.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-4.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 64000, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-sonnet-4.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 64000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-sonnet-4.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-4.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-sonnet-4.5` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-max-tokens) max\_tokens integer default:64000 Maximum number of tokens to generate Required range: `1 <= x <= 64000` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4.5#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-haiku-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-haiku-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-haiku-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-haiku-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-haiku-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-haiku-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-haiku-5.5` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-haiku-5.5#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-4.6", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-4.6", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-opus-4.6', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-opus-4.6',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-4.6", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-opus-4.6", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-opus-4.6', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-opus-4.6',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-opus-4.6\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-opus-4.6` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-opus-4.6#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/example-usage-genai-embedding#content-area) python from google import genai from google.genai import types client = genai.Client( api_key='sk-xxxx', http_options=types.HttpOptions( base_url='https://api.siray.ai', ), ) result = client.models.embed_content( model="google/gemini-embedding-001", contents=[\ "How do I get a driver's license/learner's permit?",\ "How long is my driver's license valid for?",\ "Driver's knowledge test study guide",\ ], config=types.EmbedContentConfig(task_type="SEMANTIC_SIMILARITY") ) print(result) --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/changelog/05-09-25#content-area) #### [​](https://docs.siray.ai/changelog/05-09-25#new-features) New Features ##### 🚀AI Model Endpoints * Added Model Endpoints module, providing a unified API access method. * Released 10 new models for text, image, and code generation tasks. * Each model supports flexible parameters, rate limits, and access control. * Developers can now call models with a single line of code, seamlessly integrated into their applications. * Always connected to the latest AI models, ensuring cutting-edge performance. --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-model) model enum required Model name to use for the request Available options: `deepseek/deepseek-v4-flash` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-max-tokens) max\_tokens integer default:393216 Maximum number of tokens to generate Required range: `1 <= x <= 393216` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-flash#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-pro", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-pro", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4-pro', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4-pro',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-pro", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4-pro", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4-pro', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4-pro',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4-pro\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-model) model enum required Model name to use for the request Available options: `deepseek/deepseek-v4-pro` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-max-tokens) max\_tokens integer default:393216 Maximum number of tokens to generate Required range: `1 <= x <= 393216` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4-pro#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-sonnet-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-sonnet-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-5.5", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "anthropic/claude-sonnet-5.5", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'anthropic/claude-sonnet-5.5', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'anthropic/claude-sonnet-5.5',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"anthropic/claude-sonnet-5.5\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-model) model enum required Model name to use for the request Available options: `anthropic/claude-sonnet-5.5` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-5.5#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/example-usage-image#content-area) python nodejs http # install using pip # pip install siray from siray import Siray client = Siray() # load a local file and get a ready-to-use data URI local_image = client.load_from_local("path/to/image.jpg") status = client.image.run( model="black-forest-labs/flux-1.1-pro-ultra-i2i", prompt="A futuristic city skyline at dusk", image=local_image, poll_interval=2.0, # optional, defaults to 2 seconds ) print(f"Final status: {status.status}") if status.is_completed(): print(status.outputs) // install using npm // npm install siray import { Siray } from 'siray'; const client = new Siray({ apiKey: 'your-api-key-here', }); // turn a local file into a base64 data URL you can pass as the `image` field const initImage = await client.loadFromLocal('path/to/image.jpg'); const status = await client.image.run( { model: 'black-forest-labs/flux-kontext-i2i-pro', prompt: 'A cinematic portrait photo of a cyberpunk samurai', image: initImage, }, { pollIntervalMs: 3000, timeoutMs: 3 * 60 * 1000, } ); if (status.isCompleted()) { console.log('Generated image:', status.result); } else if (status.isFailed()) { console.log('Error:', status.fail_reason); } else { console.log('Final status:', status.status); } # Submit Task BASE64_DATA=$(base64 image.jpg | tr -d '\n') DATA_URL="data:image/jpeg;base64,$BASE64_DATA" curl -X POST https://api.siray.ai/v1/images/generations/async \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" \ -d "{\"prompt\": \"\", \"image\": \"$DATA_URL\", \"model\": \"black-forest-labs/flux-kontext-i2i-pro\"}" # Query Result curl -X GET "https://api.siray.ai/v1/images/generations/async/${task_id}" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-sonnet-4-5-20250929", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-sonnet-4-5-20250929", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 64000, messages: [{content: 'example_value', role: 'system'}], model: 'claude-sonnet-4-5-20250929', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 64000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'claude-sonnet-4-5-20250929',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-sonnet-4-5-20250929", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 64000, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "claude-sonnet-4-5-20250929", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 64000, messages: [{content: 'example_value', role: 'system'}], model: 'claude-sonnet-4-5-20250929', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 64000,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'claude-sonnet-4-5-20250929',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 64000,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"claude-sonnet-4-5-20250929\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-model) model enum required Model name to use for the request Available options: `claude-sonnet-4-5-20250929` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-max-tokens) max\_tokens integer default:64000 Maximum number of tokens to generate Required range: `1 <= x <= 64000` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/claude-sonnet-4-5-20250929#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4.1-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4.1-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4.1-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4.1-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4.1-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "deepseek/deepseek-v4.1-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'deepseek/deepseek-v4.1-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'deepseek/deepseek-v4.1-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"deepseek/deepseek-v4.1-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-model) model enum required Model name to use for the request Available options: `deepseek/deepseek-v4.1-flash` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-max-tokens) max\_tokens integer default:393216 Maximum number of tokens to generate Required range: `1 <= x <= 393216` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/deepseek-v4.1-flash#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/api-integration#content-area) ### [​](https://docs.siray.ai/model-apis/api-integration#1-authentication) 1\. Authentication All API requests require an authentication token. Please ensure you have your `SIRAY_API_TOKEN` set as an environment variable or passed directly to the client library. * **Token:** `SIRAY_API_TOKEN` * **Security:** Pass the token via an environment variable to prevent hardcoding secrets in your source code. Check [api keys](https://console.siray.ai/keys) to get your key.API Port: [https://api.siray.ai/](https://api.siray.ai/) ### [​](https://docs.siray.ai/model-apis/api-integration#2-unified-api-overview) 2\. Unified API Overview The core of the Siray platform is the “Unified API,” which allows you to interact with various models using a consistent `run()` method. The key components of an API call are: 1. **Model Identifier:** E.g., `"black-forest-labs/flux-kontext-i2i-pro"`. 2. **Input Payload:** A dictionary/object containing parameters like `prompt` and the input `image`. ### [​](https://docs.siray.ai/model-apis/api-integration#3-integration-examples) 3\. Integration Examples **Node.js** // install using npm // npm install siray import { Siray } from 'siray'; const client = new Siray({ apiKey: 'your-api-key-here', }); // Optional: turn a local file into a base64 data URL you can pass as the `image` field const initImage = await client.loadFromLocal('path/to/image.jpg'); const status = await client.image.run( { model: 'black-forest-labs/flux-kontext-i2i-pro', prompt: 'A cinematic portrait photo of a cyberpunk samurai', image: initImage, }, { pollIntervalMs: 3000, timeoutMs: 3 * 60 * 1000, } ); if (status.isCompleted()) { console.log('Generated image:', status.result); } else if (status.isFailed()) { console.log('Error:', status.fail_reason); } else { console.log('Final status:', status.status); } Note: Always use the latest model identifiers from the Siray model catalog. --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.5#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.5#model-use-cases) Model Use Cases Use Claude Sonnet 4.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Sonnet 4.5 on Siray.ai --------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.5#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-haiku-5.5#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-haiku-5.5#model-use-cases) Model Use Cases Use Claude Haiku 5.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Haiku 5.5 on Siray.ai -------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-haiku-5.5#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-haiku-4.5#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-haiku-4.5#model-use-cases) Model Use Cases Use Claude Haiku 4.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Haiku 4.5 on Siray.ai -------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-haiku-4.5#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-opus-4.6#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-opus-4.6#model-use-cases) Model Use Cases Use Claude Opus 4.6 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Opus 4.6 on Siray.ai ------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-opus-4.6#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.6#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.6#model-use-cases) Model Use Cases Use Claude Sonnet 4.6 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Sonnet 4.6 on Siray.ai --------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-4.6#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-opus-5.5#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-opus-5.5#model-use-cases) Model Use Cases Use Claude Opus 5.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Opus 5.5 on Siray.ai ------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-opus-5.5#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-fable-5.1#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-fable-5.1#model-use-cases) Model Use Cases Use Claude Opus 4.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Fable 5.1 on Siray.ai -------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-fable-5.1#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-t2i#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-t2i#model-use-cases) Model Use Cases Flux 1.1 Pro Ultra is an advanced text-to-image (T2I) AI model developed by Black Forest Labs. It enables ultra-high-resolution and photorealistic image generation from detailed text prompts, delivering fast and efficient performance for creative and professional applications. Try Flux 1.1 Pro Ultra t2i on Siray.ai -------------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-t2i#key-features) Key Features * **Ultra-High Resolution:** Generates images up to 4MP (2048×2048), four times higher than the standard Flux 1.1 Pro. Ideal for professional prints, detailed artwork, and large web visuals. * **High Realism & Detail:** Produces photorealistic images with rich textures, accurate lighting, and lifelike human representations. * **Prompt Adherence:** Delivers precise alignment with text prompts, ensuring generated images accurately match user intent. * **Dual Modes:** * **Ultra Mode:** Optimized for high-resolution detail and visual clarity. * **Raw Mode:** Designed for natural, film-like aesthetics, excelling in portraits and nature scenes. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-i2i#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-i2i#model-use-cases) Model Use Cases FLUX1.1 Pro is a robust and proven image-to-image baseline for generating high-quality visuals. It combines state-of-the-art inference speeds with strong prompt adherence, ideal for scalable, text-based image generation. Try Flux 1.1 Pro i2i on Siray.ai -------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-i2i#key-features) Key Features * **High Performance:** It generates images up to six times faster than its predecessor, the original Flux 1.0 Pro. * **Superior Image Quality:** The model produces high-quality images with enhanced detail, better prompt adherence, and output diversity. * **High Resolution:** It supports the generation of high-resolution images, up to 2K, without sacrificing quality or speed. * **Versatility:** It can generate various styles of images, including photorealistic, cartoon, and painted styles. * **Modes:** It features an “Ultra Mode” for maximum resolution (up to 4MP) and a “Raw Mode” for more natural, photorealistic results that reduce the “AI look”. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-pro#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-pro#model-use-cases) Model Use Cases Flux Kontext I2I Pro is an advanced generative AI model developed by Black Forest Labs, designed for context-aware image-to-image (I2I) editing, enabling high-quality, precise, and professional-grade image transformations. Try Flux Kontext i2i Pro on Siray.ai ------------------------------------ Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-pro#key-features) Key Features * **Advanced Image-to-Image Editing:** Performs high-quality I2I transformations for modifying or enhancing images with precision. * **Context-Aware Modifications:** Understands image content and context to make accurate local and global edits. * **Multimodal Input Support:** Accepts both images and text prompts, allowing for flexible, natural-language-guided edits. * **Iterative Editing Workflow:** Supports multi-step, chat-style editing, preserving character and style consistency across iterations. * **Style Transfer & Reference Integration:** Use reference images to maintain consistent style or apply artistic transformations without extra fine-tuning. * **High-Quality Output:** Produces professional-grade, detailed images suitable for creative, commercial, and professional projects. * **Fast and Efficient Performance:** Optimized for quick inference, enabling smooth, iterative creative workflows. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-pro#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-pro#model-use-cases) Model Use Cases Flux Kontext T2I Pro is an advanced generative AI model that combines text-to-image (T2I) generation with context-aware image editing, enabling users to create high-quality, editable visuals from text prompts. Try Flux Kontext t2i Pro on Siray.ai ------------------------------------ Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-pro#key-features) Key Features * **Advanced Contextual Understanding:** Uses a generative flow-matching approach to accurately interpret both text and image content, allowing precise modifications while preserving overall composition. * **High-Quality, Fast Performance:** Delivers professional-grade visuals with rapid inference speed, ideal for quick, iterative creative workflows. * **Commercial-Grade Capabilities:** Designed for professional and commercial applications, with precise control over typography, objects, and multi-scene consistency. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-i2i#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-i2i#model-use-cases) Model Use Cases A premium Image-to-Image model for ultra-high-resolution style transfer and image-guided generation up to 4MP, supporting professional workflows. Try Flux 1.1 Pro Ultra i2i on Siray.ai -------------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-ultra-i2i#key-features) Key Features * **Ultra-High Resolution:** Generates images up to 4MP, four times higher than the standard model, ideal for printing and professional visuals. * **High Speed:** Produces high-resolution results in under 10 seconds, outperforming most AI image generators. * **Commercial Ready:** Outputs are suitable for business and marketing use with full commercial rights. * **Dual Modes:** * **Ultra Mode:** Focuses on fine details and prompt accuracy. * **Raw Mode:** Delivers natural, lifelike results with reduced “AI look.” Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-5.5#content-area) ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-5.5#model-use-cases) Model Use Cases Use Claude Sonnet 5.5 by Anthropic for writing, analysis, automation, and multimodal applications. Try Claude Sonnet 5.5 on Siray.ai --------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/anthropic/claude-sonnet-5.5#key-features) Key Features * **Multimodal Understanding:** Works across text and supported visual inputs across creative and business applications. * **Instruction Following:** Produces focused responses for complex user requests across creative and business applications. * **Content Generation:** Creates useful text, summaries, plans, and structured output for dependable production workflows. * **Business Workflows:** Supports analysis, automation, research, and productivity across creative and business applications. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-t2v#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-t2v#model-use-cases) Model Use Cases Create marketing videos, creative content, or visual storytelling from text descriptions using Black Forest Labs’ advanced Flux video generation technology. Try Flux 3 t2v on Siray.ai -------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-t2v#key-features) Key Features * **Flux Architecture:** Built on Black Forest Labs’ proven generative engine. * **Text-to-Video Creation:** Generate complete videos from natural language prompts. * **Strong Visual Coherence:** Maintains consistent detail across generated frames. * **High-Quality Output:** Produces detailed, professional-grade video results. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-v2v#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-v2v#model-use-cases) Model Use Cases Extend short video clips, continue animations, or add additional footage to existing videos while maintaining consistent motion and scene continuity. Try Flux 3 v2v on Siray.ai -------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-v2v#key-features) Key Features * **Flux Architecture:** Built on Black Forest Labs’ proven generative engine. * **Video Extension:** Continues clips beyond their final frame seamlessly. * **Motion Consistency:** Maintains original movement patterns in new footage. * **Scene Continuity:** Preserves scene context and visual coherence. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-t2i#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-t2i#model-use-cases) Model Use Cases Flux Pro T2I is a fast, state-of-the-art Text-to-Image model. It delivers high-quality visual generation with superior speed and faithful adherence to complex text prompts. Try Flux 1.1 Pro t2i on Siray.ai -------------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-1.1-pro-t2i#key-features) Key Features * **Superior Image Quality:** Generates high-quality, photorealistic, and creative images comparable to premium closed-source text-to-image models. * **Accurate Prompt Interpretation:** Excels at understanding complex and detailed text prompts and translating them into precise visuals. * **High-Resolution Output:** Produces professional-quality images at 1024×1024 resolution, suitable for digital art and design. * **Versatile Artistic Styles:** Supports a wide range of styles, from photorealistic portraits to abstract and painted artwork. * **Text Integration Capability:** Accurately incorporates text into images, ideal for labels, signs, or annotations in generated visuals. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-i2v#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-i2v#model-use-cases) Model Use Cases Animate product shots, artwork, or photos into engaging video content with Black Forest Labs’ advanced Flux image-to-video generation technology. Try Flux 3 i2v on Siray.ai -------------------------- Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-3-i2v#key-features) Key Features * **Flux Architecture:** Built on Black Forest Labs’ proven generative engine. * **Image Animation:** Transform still images into dynamic video sequences. * **Natural Motion:** Generates realistic, physically plausible movement. * **Source Fidelity:** Preserves key visual elements from input images. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-max#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-max#model-use-cases) Model Use Cases Flux Kontext Max T2I generates photorealistic and cinematic-quality images with exceptional detail, optimized for high-end visuals, including realistic human portraits, polished product renders, and professional creative content. Try Flux Kontext t2i Max on Siray.ai ------------------------------------ Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-t2i-max#key-features) Key Features * **Maximum Prompt Adherence:** Accurately follows complex and nuanced text instructions, ideal for professional artists and creators. * **Premium Image Quality & Consistency:** Generates high-resolution, detailed images while maintaining character likeness and visual consistency across multiple edits, minimizing visual drift. * **Advanced Typography:** Produces readable, well-integrated text within images, overcoming challenges common to AI-generated graphics. * **Object Modification:** Edit specific objects without affecting the rest of the image. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-max#content-area) ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-max#model-use-cases) Model Use Cases Flux Kontext I2I Max is the premium, top-tier version of the Flux generative AI model, specifically designed for advanced image-to-image (I2I) editing, high-fidelity transformations, and professional creative workflows. Try Flux Kontext i2i Max on Siray.ai ------------------------------------ Get Free APIs on Siray.AI ### [​](https://docs.siray.ai/model-apis/black-forest-labs/flux-kontext-i2i-max#key-features) Key Features * **Advanced Image-to-Image Editing:** High-quality I2I transformations for modifying or enhancing existing images. * **High Consistency Across Edits:** Maintains characters, objects, and composition over multiple iterative changes. * **Professional-Grade Output:** Produces high-resolution, detailed visuals suitable for commercial and creative workflows. * **Style Transfer & Reference Integration:** Supports reference images for consistent style and continuity. * **Fast & Efficient Performance:** Optimized for quick inference while handling complex edits without quality loss. Get Started with the API ------------------------ --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-i2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-i2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', image: 'example_value', model: 'black-forest-labs/flux-1.1-pro-i2i', output_format: 'webp', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-1.1-pro-i2i',\ 'output_format' => 'webp',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-i2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-i2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', image: 'example_value', model: 'black-forest-labs/flux-1.1-pro-i2i', output_format: 'webp', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-1.1-pro-i2i',\ 'output_format' => 'webp',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-i2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `16:9`, `3:2`, `2:3`, `4:5`, `5:4`, `9:16`, `3:4`, `4:3` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-1.1-pro-i2i` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-output-format) output\_format enum Output format for the 3D model Available options: `webp`, `jpg`, `png` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `1 <= x <= 6` Example: `6` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-i2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "9:16", "audio_enable": false, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "fps": 24, "model": "lightricks/ltx-2.3-22b-t2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": true, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "9:16", "audio_enable": False, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "fps": 24, "model": "lightricks/ltx-2.3-22b-t2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": True, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '9:16', audio_enable: false, camera_lora: 'dolly_in', camera_lora_scale: 1, duration: 6, fps: 24, model: 'lightricks/ltx-2.3-22b-t2v', negative_prompt: 'example_value', prompt: 'example_value', prompt_expansion_enable: true, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '9:16',\ 'audio_enable' => false,\ 'camera_lora' => 'dolly_in',\ 'camera_lora_scale' => 1,\ 'duration' => 6,\ 'fps' => 24,\ 'model' => 'lightricks/ltx-2.3-22b-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'prompt_expansion_enable' => true,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "9:16", "audio_enable": false, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "fps": 24, "model": "lightricks/ltx-2.3-22b-t2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": true, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "9:16", "audio_enable": False, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "fps": 24, "model": "lightricks/ltx-2.3-22b-t2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": True, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '9:16', audio_enable: false, camera_lora: 'dolly_in', camera_lora_scale: 1, duration: 6, fps: 24, model: 'lightricks/ltx-2.3-22b-t2v', negative_prompt: 'example_value', prompt: 'example_value', prompt_expansion_enable: true, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '9:16',\ 'audio_enable' => false,\ 'camera_lora' => 'dolly_in',\ 'camera_lora_scale' => 1,\ 'duration' => 6,\ 'fps' => 24,\ 'model' => 'lightricks/ltx-2.3-22b-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'prompt_expansion_enable' => true,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"fps\": 24,\n \"model\": \"lightricks/ltx-2.3-22b-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `9:16`, `16:9` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-duration) duration enum required Fixed duration Available options: `6`, `8`, `10`, `12`, `14`, `16`, `18`, `20` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-model) model enum required Model name to use for the request Available options: `lightricks/ltx-2.3-22b-t2v` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-camera-lora) camera\_lora enum Camera motion LoRA to apply Available options: `dolly_in`, `dolly_out`, `dolly_left`, `dolly_right`, `jib_up`, `jib_down`, `static`, `none` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-camera-lora-scale) camera\_lora\_scale number default:1 Strength of the camera motion LoRA (0-1) Required range: `0 <= x <= 1` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-fps) fps enum Frames per second of the generated video Available options: `24`, `30` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#body-prompt-expansion-enable) prompt\_expansion\_enable boolean default:true Whether to automatically expand the prompt for better results #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#content-area) Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "image": "example_value", "model": "tencent/hunyuan3d-v2.5-rapid-image-to-3d", "output_format": "OBJ", "pbr_enable": true, "texture_enable": true } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "image": "example_value", "model": "tencent/hunyuan3d-v2.5-rapid-image-to-3d", "output_format": "OBJ", "pbr_enable": True, "texture_enable": True } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ image: 'example_value', model: 'tencent/hunyuan3d-v2.5-rapid-image-to-3d', output_format: 'OBJ', pbr_enable: true, texture_enable: true }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'image' => 'example_value',\ 'model' => 'tencent/hunyuan3d-v2.5-rapid-image-to-3d',\ 'output_format' => 'OBJ',\ 'pbr_enable' => true,\ 'texture_enable' => true\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / 3d / generations Try it Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "image": "example_value", "model": "tencent/hunyuan3d-v2.5-rapid-image-to-3d", "output_format": "OBJ", "pbr_enable": true, "texture_enable": true } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "image": "example_value", "model": "tencent/hunyuan3d-v2.5-rapid-image-to-3d", "output_format": "OBJ", "pbr_enable": True, "texture_enable": True } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ image: 'example_value', model: 'tencent/hunyuan3d-v2.5-rapid-image-to-3d', output_format: 'OBJ', pbr_enable: true, texture_enable: true }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'image' => 'example_value',\ 'model' => 'tencent/hunyuan3d-v2.5-rapid-image-to-3d',\ 'output_format' => 'OBJ',\ 'pbr_enable' => true,\ 'texture_enable' => true\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"image\": \"example_value\",\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-image-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"texture_enable\": true\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for 3D model generation [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#body-model) model enum required Model name to use for the request Available options: `tencent/hunyuan3d-v2.5-rapid-image-to-3d` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#body-output-format) output\_format enum Output format for the 3D model Available options: `OBJ`, `GLB`, `STL`, `USDZ`, `FBX`, `MP4` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#body-pbr-enable) pbr\_enable boolean default:true Whether to enable PBR (Physically Based Rendering) material output [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#body-texture-enable) texture\_enable boolean default:true Whether to enable texture generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-image-to-3d#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "tencent/hunyuan-image-3-instruct-t2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "model": "tencent/hunyuan-image-3-instruct-t2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ model: 'tencent/hunyuan-image-3-instruct-t2i', prompt: 'example_value', seed: -1, size: '1024x1024' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'model' => 'tencent/hunyuan-image-3-instruct-t2i',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '1024x1024'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "tencent/hunyuan-image-3-instruct-t2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "model": "tencent/hunyuan-image-3-instruct-t2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ model: 'tencent/hunyuan-image-3-instruct-t2i', prompt: 'example_value', seed: -1, size: '1024x1024' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'model' => 'tencent/hunyuan-image-3-instruct-t2i',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '1024x1024'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"model\": \"tencent/hunyuan-image-3-instruct-t2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#body-model) model enum required Model name to use for the request Available options: `tencent/hunyuan-image-3-instruct-t2i` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#body-size) size enum required Fixed size Available options: `1024x1024`, `512x512`, `1024x768`, `768x1024`, `1024x576`, `576x1024` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#content-area) Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "tencent/hunyuan3d-v2.5-rapid-text-to-3d", "output_format": "OBJ", "pbr_enable": true, "prompt": "example_value", "texture_enable": true } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "model": "tencent/hunyuan3d-v2.5-rapid-text-to-3d", "output_format": "OBJ", "pbr_enable": True, "prompt": "example_value", "texture_enable": True } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ model: 'tencent/hunyuan3d-v2.5-rapid-text-to-3d', output_format: 'OBJ', pbr_enable: true, prompt: 'example_value', texture_enable: true }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'model' => 'tencent/hunyuan3d-v2.5-rapid-text-to-3d',\ 'output_format' => 'OBJ',\ 'pbr_enable' => true,\ 'prompt' => 'example_value',\ 'texture_enable' => true\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / 3d / generations Try it Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "tencent/hunyuan3d-v2.5-rapid-text-to-3d", "output_format": "OBJ", "pbr_enable": true, "prompt": "example_value", "texture_enable": true } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "model": "tencent/hunyuan3d-v2.5-rapid-text-to-3d", "output_format": "OBJ", "pbr_enable": True, "prompt": "example_value", "texture_enable": True } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ model: 'tencent/hunyuan3d-v2.5-rapid-text-to-3d', output_format: 'OBJ', pbr_enable: true, prompt: 'example_value', texture_enable: true }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'model' => 'tencent/hunyuan3d-v2.5-rapid-text-to-3d',\ 'output_format' => 'OBJ',\ 'pbr_enable' => true,\ 'prompt' => 'example_value',\ 'texture_enable' => true\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"model\": \"tencent/hunyuan3d-v2.5-rapid-text-to-3d\",\n \"output_format\": \"OBJ\",\n \"pbr_enable\": true,\n \"prompt\": \"example_value\",\n \"texture_enable\": true\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for 3D model generation [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#body-model) model enum required Model name to use for the request Available options: `tencent/hunyuan3d-v2.5-rapid-text-to-3d` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#body-output-format) output\_format enum Output format for the 3D model Available options: `OBJ`, `GLB`, `STL`, `USDZ`, `FBX`, `MP4` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#body-pbr-enable) pbr\_enable boolean default:true Whether to enable PBR (Physically Based Rendering) material output [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#body-texture-enable) texture\_enable boolean default:true Whether to enable texture generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/hunyuan3d-v2.5-rapid-text-to-3d#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kimi-k3#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "moonshotai/kimi-k3", "stream": false } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "moonshotai/kimi-k3", "stream": False } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'moonshotai/kimi-k3', stream: false }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'moonshotai/kimi-k3',\ 'stream' => false\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "moonshotai/kimi-k3", "stream": false } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "max_tokens": 393216, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "moonshotai/kimi-k3", "stream": False } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ max_tokens: 393216, messages: [{content: 'example_value', role: 'system'}], model: 'moonshotai/kimi-k3', stream: false }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'max_tokens' => 393216,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'moonshotai/kimi-k3',\ 'stream' => false\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"max_tokens\": 393216,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"moonshotai/kimi-k3\",\n \"stream\": false\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#body-model) model enum required Model name to use for the request Available options: `moonshotai/kimi-k3` [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#body-max-tokens) max\_tokens integer default:393216 Maximum number of tokens to generate Required range: `1 <= x <= 393216` [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#body-stream) stream boolean default:false Enable streaming response #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/kimi-k3#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-1.1-pro-t2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-1.1-pro-t2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-1.1-pro-t2i', output_format: 'webp', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-1.1-pro-t2i',\ 'output_format' => 'webp',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-1.1-pro-t2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-1.1-pro-t2i", "output_format": "webp", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-1.1-pro-t2i', output_format: 'webp', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-1.1-pro-t2i',\ 'output_format' => 'webp',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-1.1-pro-t2i\",\n \"output_format\": \"webp\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `16:9`, `3:2`, `2:3`, `4:5`, `5:4`, `9:16`, `3:4`, `4:3` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-1.1-pro-t2i` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-output-format) output\_format enum Output format for the 3D model Available options: `webp`, `jpg`, `png` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `1 <= x <= 6` Example: `6` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 2, "model": "x-ai/grok-imagine-video-extension", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 2, "model": "x-ai/grok-imagine-video-extension", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 2, model: 'x-ai/grok-imagine-video-extension', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 2,\ 'model' => 'x-ai/grok-imagine-video-extension',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 2, "model": "x-ai/grok-imagine-video-extension", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 2, "model": "x-ai/grok-imagine-video-extension", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 2, model: 'x-ai/grok-imagine-video-extension', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 2,\ 'model' => 'x-ai/grok-imagine-video-extension',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 2,\n \"model\": \"x-ai/grok-imagine-video-extension\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#body-duration) duration enum required Fixed duration Available options: `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#body-model) model enum required Model name to use for the request Available options: `x-ai/grok-imagine-video-extension` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#body-video) video string Input video URL #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-extension#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "x-ai/grok-imagine-image-t2i", "prompt": "example_value", "size": "1k" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "x-ai/grok-imagine-image-t2i", "prompt": "example_value", "size": "1k" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'x-ai/grok-imagine-image-t2i', prompt: 'example_value', size: '1k' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'x-ai/grok-imagine-image-t2i',\ 'prompt' => 'example_value',\ 'size' => '1k'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "x-ai/grok-imagine-image-t2i", "prompt": "example_value", "size": "1k" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "x-ai/grok-imagine-image-t2i", "prompt": "example_value", "size": "1k" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'x-ai/grok-imagine-image-t2i', prompt: 'example_value', size: '1k' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'x-ai/grok-imagine-image-t2i',\ 'prompt' => 'example_value',\ 'size' => '1k'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"x-ai/grok-imagine-image-t2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `3:4`, `4:3`, `9:16`, `16:9`, `2:3`, `3:2`, `9:19.5`, `19.5:9`, `9:20`, `20:9`, `1:2`, `2:1`, `auto` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#body-model) model enum required Model name to use for the request Available options: `x-ai/grok-imagine-image-t2i` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#body-size) size enum required Size Available options: `1k`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "images": [\ "example_value"\ ], "model": "x-ai/grok-imagine-image-i2i", "prompt": "example_value", "size": "1k" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "images": ["example_value"], "model": "x-ai/grok-imagine-image-i2i", "prompt": "example_value", "size": "1k" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', images: ['example_value'], model: 'x-ai/grok-imagine-image-i2i', prompt: 'example_value', size: '1k' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'images' => [\ 'example_value'\ ],\ 'model' => 'x-ai/grok-imagine-image-i2i',\ 'prompt' => 'example_value',\ 'size' => '1k'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "images": [\ "example_value"\ ], "model": "x-ai/grok-imagine-image-i2i", "prompt": "example_value", "size": "1k" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "images": ["example_value"], "model": "x-ai/grok-imagine-image-i2i", "prompt": "example_value", "size": "1k" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', images: ['example_value'], model: 'x-ai/grok-imagine-image-i2i', prompt: 'example_value', size: '1k' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'images' => [\ 'example_value'\ ],\ 'model' => 'x-ai/grok-imagine-image-i2i',\ 'prompt' => 'example_value',\ 'size' => '1k'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"x-ai/grok-imagine-image-i2i\",\n \"prompt\": \"example_value\",\n \"size\": \"1k\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `3:4`, `4:3`, `9:16`, `16:9`, `2:3`, `3:2`, `9:19.5`, `19.5:9`, `9:20`, `20:9`, `1:2`, `2:1`, `auto` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#body-images) images string\[\] required Array of input images, which can be data URL or image URL Required array length: `1 - 3` elements [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#body-model) model enum required Model name to use for the request Available options: `x-ai/grok-imagine-image-i2i` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#body-size) size enum required Size Available options: `1k`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-image-i2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "duration": 1, "model": "x-ai/grok-imagine-video-t2v", "prompt": "example_value", "size": "480p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "1:1", "duration": 1, "model": "x-ai/grok-imagine-video-t2v", "prompt": "example_value", "size": "480p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', duration: 1, model: 'x-ai/grok-imagine-video-t2v', prompt: 'example_value', size: '480p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'duration' => 1,\ 'model' => 'x-ai/grok-imagine-video-t2v',\ 'prompt' => 'example_value',\ 'size' => '480p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "duration": 1, "model": "x-ai/grok-imagine-video-t2v", "prompt": "example_value", "size": "480p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "1:1", "duration": 1, "model": "x-ai/grok-imagine-video-t2v", "prompt": "example_value", "size": "480p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', duration: 1, model: 'x-ai/grok-imagine-video-t2v', prompt: 'example_value', size: '480p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'duration' => 1,\ 'model' => 'x-ai/grok-imagine-video-t2v',\ 'prompt' => 'example_value',\ 'size' => '480p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"model\": \"x-ai/grok-imagine-video-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `3:2`, `2:3` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#body-model) model enum required Model name to use for the request Available options: `x-ai/grok-imagine-video-t2v` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#body-size) size enum required Size Available options: `480p`, `720p` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#content-area) Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "auto_size": true, "face_limit": 1, "image": "example_value", "model": "tripo/tripo3d-v2.5-image-to-3d", "pbr_enable": true, "quad": false, "seed": -1, "texture_alignment": "original_image", "texture_enable": true, "texture_quality": "standard", "texture_seed": 1 } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "auto_size": True, "face_limit": 1, "image": "example_value", "model": "tripo/tripo3d-v2.5-image-to-3d", "pbr_enable": True, "quad": False, "seed": -1, "texture_alignment": "original_image", "texture_enable": True, "texture_quality": "standard", "texture_seed": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ auto_size: true, face_limit: 1, image: 'example_value', model: 'tripo/tripo3d-v2.5-image-to-3d', pbr_enable: true, quad: false, seed: -1, texture_alignment: 'original_image', texture_enable: true, texture_quality: 'standard', texture_seed: 1 }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'auto_size' => true,\ 'face_limit' => 1,\ 'image' => 'example_value',\ 'model' => 'tripo/tripo3d-v2.5-image-to-3d',\ 'pbr_enable' => true,\ 'quad' => false,\ 'seed' => -1,\ 'texture_alignment' => 'original_image',\ 'texture_enable' => true,\ 'texture_quality' => 'standard',\ 'texture_seed' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / 3d / generations Try it Generate 3D model cURL curl --request POST \ --url https://api.siray.ai/v1/3d/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "auto_size": true, "face_limit": 1, "image": "example_value", "model": "tripo/tripo3d-v2.5-image-to-3d", "pbr_enable": true, "quad": false, "seed": -1, "texture_alignment": "original_image", "texture_enable": true, "texture_quality": "standard", "texture_seed": 1 } ' import requests url = "https://api.siray.ai/v1/3d/generations" payload = { "auto_size": True, "face_limit": 1, "image": "example_value", "model": "tripo/tripo3d-v2.5-image-to-3d", "pbr_enable": True, "quad": False, "seed": -1, "texture_alignment": "original_image", "texture_enable": True, "texture_quality": "standard", "texture_seed": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ auto_size: true, face_limit: 1, image: 'example_value', model: 'tripo/tripo3d-v2.5-image-to-3d', pbr_enable: true, quad: false, seed: -1, texture_alignment: 'original_image', texture_enable: true, texture_quality: 'standard', texture_seed: 1 }) }; fetch('https://api.siray.ai/v1/3d/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'auto_size' => true,\ 'face_limit' => 1,\ 'image' => 'example_value',\ 'model' => 'tripo/tripo3d-v2.5-image-to-3d',\ 'pbr_enable' => true,\ 'quad' => false,\ 'seed' => -1,\ 'texture_alignment' => 'original_image',\ 'texture_enable' => true,\ 'texture_quality' => 'standard',\ 'texture_seed' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations" payload := strings.NewReader("{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/3d/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"auto_size\": true,\n \"face_limit\": 1,\n \"image\": \"example_value\",\n \"model\": \"tripo/tripo3d-v2.5-image-to-3d\",\n \"pbr_enable\": true,\n \"quad\": false,\n \"seed\": -1,\n \"texture_alignment\": \"original_image\",\n \"texture_enable\": true,\n \"texture_quality\": \"standard\",\n \"texture_seed\": 1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for 3D model generation [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-model) model enum required Model name to use for the request Available options: `tripo/tripo3d-v2.5-image-to-3d` [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-auto-size) auto\_size boolean default:true Whether to automatically adjust model dimensions [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-face-limit) face\_limit integer Maximum number of faces for the 3D mesh [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-pbr-enable) pbr\_enable boolean default:true Whether to enable PBR (Physically Based Rendering) material output [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-quad) quad boolean default:false Whether to use quad (4-sided) mesh topology [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-texture-alignment) texture\_alignment enum Texture alignment mode Available options: `original_image`, `geometry` [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-texture-enable) texture\_enable boolean default:true Whether to enable texture generation [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-texture-quality) texture\_quality enum Texture quality level Available options: `standard`, `HD` [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#body-texture-seed) texture\_seed integer Seed for texture generation randomization #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/tripo3d-v2.5-image-to-3d#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v-spicy", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v-spicy", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'minimax/minimax-h3-i2v-spicy', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'minimax/minimax-h3-i2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v-spicy", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v-spicy", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'minimax/minimax-h3-i2v-spicy', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'minimax/minimax-h3-i2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-i2v-spicy` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#body-size) size enum required Size Available options: `768p`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v-spicy#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "audios": [\ "example_value"\ ], "duration": 5, "images": [\ "example_value"\ ], "model": "minimax/minimax-h3-ref2v-spicy", "prompt": "example_value", "size": "768p", "videos": [\ "example_value"\ ] } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "audios": ["example_value"], "duration": 5, "images": ["example_value"], "model": "minimax/minimax-h3-ref2v-spicy", "prompt": "example_value", "size": "768p", "videos": ["example_value"] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', audios: ['example_value'], duration: 5, images: ['example_value'], model: 'minimax/minimax-h3-ref2v-spicy', prompt: 'example_value', size: '768p', videos: ['example_value'] }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'audios' => [\ 'example_value'\ ],\ 'duration' => 5,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'minimax/minimax-h3-ref2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p',\ 'videos' => [\ 'example_value'\ ]\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "audios": [\ "example_value"\ ], "duration": 5, "images": [\ "example_value"\ ], "model": "minimax/minimax-h3-ref2v-spicy", "prompt": "example_value", "size": "768p", "videos": [\ "example_value"\ ] } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "audios": ["example_value"], "duration": 5, "images": ["example_value"], "model": "minimax/minimax-h3-ref2v-spicy", "prompt": "example_value", "size": "768p", "videos": ["example_value"] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', audios: ['example_value'], duration: 5, images: ['example_value'], model: 'minimax/minimax-h3-ref2v-spicy', prompt: 'example_value', size: '768p', videos: ['example_value'] }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'audios' => [\ 'example_value'\ ],\ 'duration' => 5,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'minimax/minimax-h3-ref2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p',\ 'videos' => [\ 'example_value'\ ]\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-ref2v-spicy` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-size) size enum required Size Available options: `768p`, `2k` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-audios) audios string\[\] Array of input audio URLs Maximum array length: `9` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-images) images string\[\] Array of input images, which can be data URL or image URL Maximum array length: `9` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#body-videos) videos string\[\] Array of input video URLs Maximum array length: `9` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v-spicy#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 5, "model": "pixverse/pixverse-v5.6-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 5, "model": "pixverse/pixverse-v5.6-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 5, model: 'pixverse/pixverse-v5.6-t2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 5,\ 'model' => 'pixverse/pixverse-v5.6-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 5, "model": "pixverse/pixverse-v5.6-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 5, "model": "pixverse/pixverse-v5.6-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 5, model: 'pixverse/pixverse-v5.6-t2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 5,\ 'model' => 'pixverse/pixverse-v5.6-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"pixverse/pixverse-v5.6-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-duration) duration enum required Fixed duration Available options: `5`, `8`, `10` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-v5.6-t2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#body-thinking-type) thinking\_type enum Thinking mode for the model Available options: `enabled`, `disabled`, `auto` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-v6-i2v", "multi_clip": false, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-v6-i2v", "multi_clip": False, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 1, image: 'example_value', model: 'pixverse/pixverse-v6-i2v', multi_clip: false, negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-v6-i2v',\ 'multi_clip' => false,\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-v6-i2v", "multi_clip": false, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-v6-i2v", "multi_clip": False, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 1, image: 'example_value', model: 'pixverse/pixverse-v6-i2v', multi_clip: false, negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-v6-i2v',\ 'multi_clip' => false,\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v6-i2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-v6-i2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-multi-clip) multi\_clip boolean Whether to enable multi-clip generation mode [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#body-thinking-type) thinking\_type enum Thinking mode for the model Available options: `enabled`, `disabled`, `auto` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "images": [\ "example_value"\ ], "model": "tencent/hunyuan-image-3-instruct-i2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "images": ["example_value"], "model": "tencent/hunyuan-image-3-instruct-i2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ images: ['example_value'], model: 'tencent/hunyuan-image-3-instruct-i2i', prompt: 'example_value', seed: -1, size: '1024x1024' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'images' => [\ 'example_value'\ ],\ 'model' => 'tencent/hunyuan-image-3-instruct-i2i',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '1024x1024'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "images": [\ "example_value"\ ], "model": "tencent/hunyuan-image-3-instruct-i2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "images": ["example_value"], "model": "tencent/hunyuan-image-3-instruct-i2i", "prompt": "example_value", "seed": -1, "size": "1024x1024" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ images: ['example_value'], model: 'tencent/hunyuan-image-3-instruct-i2i', prompt: 'example_value', seed: -1, size: '1024x1024' }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'images' => [\ 'example_value'\ ],\ 'model' => 'tencent/hunyuan-image-3-instruct-i2i',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '1024x1024'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"tencent/hunyuan-image-3-instruct-i2i\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"1024x1024\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#body-images) images string\[\] required Array of input images, which can be data URL or image URL Required array length: `1 - 3` elements [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#body-model) model enum required Model name to use for the request Available options: `tencent/hunyuan-image-3-instruct-i2i` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#body-size) size enum required Fixed size Available options: `1024x1024`, `512x512`, `1024x768`, `768x1024`, `1024x576`, `576x1024` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/hunyuan-image-3-instruct-i2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "9:16", "audio_enable": false, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "end_image": "example_value", "fps": 24, "image": "example_value", "model": "lightricks/ltx-2.3-22b-i2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": true, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "9:16", "audio_enable": False, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "end_image": "example_value", "fps": 24, "image": "example_value", "model": "lightricks/ltx-2.3-22b-i2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": True, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '9:16', audio_enable: false, camera_lora: 'dolly_in', camera_lora_scale: 1, duration: 6, end_image: 'example_value', fps: 24, image: 'example_value', model: 'lightricks/ltx-2.3-22b-i2v', negative_prompt: 'example_value', prompt: 'example_value', prompt_expansion_enable: true, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '9:16',\ 'audio_enable' => false,\ 'camera_lora' => 'dolly_in',\ 'camera_lora_scale' => 1,\ 'duration' => 6,\ 'end_image' => 'example_value',\ 'fps' => 24,\ 'image' => 'example_value',\ 'model' => 'lightricks/ltx-2.3-22b-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'prompt_expansion_enable' => true,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "9:16", "audio_enable": false, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "end_image": "example_value", "fps": 24, "image": "example_value", "model": "lightricks/ltx-2.3-22b-i2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": true, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "9:16", "audio_enable": False, "camera_lora": "dolly_in", "camera_lora_scale": 1, "duration": 6, "end_image": "example_value", "fps": 24, "image": "example_value", "model": "lightricks/ltx-2.3-22b-i2v", "negative_prompt": "example_value", "prompt": "example_value", "prompt_expansion_enable": True, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '9:16', audio_enable: false, camera_lora: 'dolly_in', camera_lora_scale: 1, duration: 6, end_image: 'example_value', fps: 24, image: 'example_value', model: 'lightricks/ltx-2.3-22b-i2v', negative_prompt: 'example_value', prompt: 'example_value', prompt_expansion_enable: true, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '9:16',\ 'audio_enable' => false,\ 'camera_lora' => 'dolly_in',\ 'camera_lora_scale' => 1,\ 'duration' => 6,\ 'end_image' => 'example_value',\ 'fps' => 24,\ 'image' => 'example_value',\ 'model' => 'lightricks/ltx-2.3-22b-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'prompt_expansion_enable' => true,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"9:16\",\n \"audio_enable\": false,\n \"camera_lora\": \"dolly_in\",\n \"camera_lora_scale\": 1,\n \"duration\": 6,\n \"end_image\": \"example_value\",\n \"fps\": 24,\n \"image\": \"example_value\",\n \"model\": \"lightricks/ltx-2.3-22b-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"prompt_expansion_enable\": true,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `9:16`, `16:9` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-duration) duration enum required Fixed duration Available options: `6`, `8`, `10`, `12`, `14`, `16`, `18`, `20` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-model) model enum required Model name to use for the request Available options: `lightricks/ltx-2.3-22b-i2v` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-camera-lora) camera\_lora enum Camera motion LoRA to apply Available options: `dolly_in`, `dolly_out`, `dolly_left`, `dolly_right`, `jib_up`, `jib_down`, `static`, `none` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-camera-lora-scale) camera\_lora\_scale number default:1 Strength of the camera motion LoRA (0-1) Required range: `0 <= x <= 1` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-end-image) end\_image string End frame image URL for image-to-video generation [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-fps) fps enum Frames per second of the generated video Available options: `24`, `30` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#body-prompt-expansion-enable) prompt\_expansion\_enable boolean default:true Whether to automatically expand the prompt for better results #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/ltx-2.3-22b-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/task-status-3d#content-area) Query 3D model generation task cURL curl --request GET \ --url https://api.siray.ai/v1/3d/generations/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/3d/generations/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/3d/generations/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/3d/generations/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } GET / v1 / 3d / generations / {task\_id} Try it Query 3D model generation task cURL curl --request GET \ --url https://api.siray.ai/v1/3d/generations/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/3d/generations/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/3d/generations/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/3d/generations/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/3d/generations/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/3d/generations/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/3d/generations/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } [​](https://docs.siray.ai/api-reference/task-status-3d#overview) Overview ---------------------------------------------------------------------------- All image-to-3D or text-to-3D submissions return a `task_id`. Use the 3D task status endpoint to poll the job until it finishes. The payload mirrors the async submission response and includes downloadable asset URLs when the task succeeds. Poll every 5–10 seconds to balance freshness with API usage efficiency. 3D model generation typically takes longer than image or video tasks. [​](https://docs.siray.ai/api-reference/task-status-3d#endpoint) Endpoint ---------------------------------------------------------------------------- * `GET https://api.siray.ai/v1/3d/generations/{task_id}` **Headers** * `Authorization: Bearer ` **Path parameters** | Name | Description | | --- | --- | | `task_id` | ID returned when the 3D generation task was created. | [​](https://docs.siray.ai/api-reference/task-status-3d#response-structure) Response structure ------------------------------------------------------------------------------------------------ { "code": "success", "message": "", "data": { "task_id": "3d_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } ### [​](https://docs.siray.ai/api-reference/task-status-3d#fields) Fields * `code` / `message`: Service-level indicators for the polling request. * `data.task_id`: Echo of the 3D task identifier. * `data.status`: Lifecycle state — values listed below. * `data.progress`: Human-readable progress string. * `data.outputs`: URLs pointing to the generated 3D model assets (present when `status` is `SUCCESS`). * `data.fail_code`: Machine-readable failure code when `status` is `FAILURE`. See [fail\_code](https://docs.siray.ai/api-reference/fail-code) . * `data.fail_reason`: Explains why processing stopped when `status` is `FAILURE`. * `data.submit_time`, `data.start_time`, `data.finish_time`: Unix timestamps that help track total latency. ### [​](https://docs.siray.ai/api-reference/task-status-3d#status-values) Status values | Status | Meaning | | --- | --- | | `NOT_START` | Task accepted but preprocessing has not started yet. | | `SUBMITTED` | Request stored and waiting to enter the queue. | | `QUEUED` | Task is scheduled and waiting for compute resources. | | `IN_PROGRESS` | Generation is currently running. | | `SUCCESS` | Outputs are ready; download the 3D model via the provided URLs. | | `FAILURE` | Irrecoverable error; inspect `fail_code` and `fail_reason` for remediation steps. | [​](https://docs.siray.ai/api-reference/task-status-3d#usage-example) Usage example -------------------------------------------------------------------------------------- curl -X GET "https://api.siray.ai/v1/3d/generations/${TASK_ID}" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" > When `status` reaches `SUCCESS`, download the 3D model from the URLs in `outputs`. If the task fails, retry after resolving the underlying issue noted in `fail_code` / `fail_reason`. #### Authorizations [​](https://docs.siray.ai/api-reference/task-status-3d#authorization-authorization) Authorization string header required Bearer authentication using API key #### Path Parameters [​](https://docs.siray.ai/api-reference/task-status-3d#parameter-task-id) task\_id string required Identifier returned from the 3D model generation task submission #### Response 200 - application/json Task status and (if available) generated outputs Async task status query response [​](https://docs.siray.ai/api-reference/task-status-3d#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/task-status-3d#response-message) message string required Additional information about the request result Example: `""` [​](https://docs.siray.ai/api-reference/task-status-3d#response-data) data object required Task execution details Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "duration": 5, "model": "kuaishou/kling-2.6-pro-t2v", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "duration": 5, "model": "kuaishou/kling-2.6-pro-t2v", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', duration: 5, model: 'kuaishou/kling-2.6-pro-t2v', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'duration' => 5,\ 'model' => 'kuaishou/kling-2.6-pro-t2v',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "duration": 5, "model": "kuaishou/kling-2.6-pro-t2v", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "duration": 5, "model": "kuaishou/kling-2.6-pro-t2v", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', duration: 5, model: 'kuaishou/kling-2.6-pro-t2v', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'duration' => 5,\ 'model' => 'kuaishou/kling-2.6-pro-t2v',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"duration\": 5,\n \"model\": \"kuaishou/kling-2.6-pro-t2v\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#body-duration) duration enum required Fixed duration Available options: `5`, `10` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-2.6-pro-t2v` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#body-prompt) prompt string required Text prompt for generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', duration: 5, model: 'minimax/minimax-h3-t2v', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'duration' => 5,\ 'model' => 'minimax/minimax-h3-t2v',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', duration: 5, model: 'minimax/minimax-h3-t2v', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'duration' => 5,\ 'model' => 'minimax/minimax-h3-t2v',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-t2v` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#body-size) size enum required Size Available options: `768p`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 5, "image": "example_value", "model": "pixverse/pixverse-v5.6-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 5, "image": "example_value", "model": "pixverse/pixverse-v5.6-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 5, image: 'example_value', model: 'pixverse/pixverse-v5.6-i2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-v5.6-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 5, "image": "example_value", "model": "pixverse/pixverse-v5.6-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 5, "image": "example_value", "model": "pixverse/pixverse-v5.6-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 5, image: 'example_value', model: 'pixverse/pixverse-v5.6-i2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-v5.6-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-v5.6-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-duration) duration enum required Fixed duration Available options: `5`, `8`, `10` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-v5.6-i2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#body-thinking-type) thinking\_type enum Thinking mode for the model Available options: `enabled`, `disabled`, `auto` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-v5.6-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/task-status-image#content-area) Query image generation task cURL curl --request GET \ --url https://api.siray.ai/v1/images/generations/async/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/images/generations/async/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/images/generations/async/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/images/generations/async/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } GET / v1 / images / generations / async / {task\_id} Try it Query image generation task cURL curl --request GET \ --url https://api.siray.ai/v1/images/generations/async/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/images/generations/async/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/images/generations/async/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/images/generations/async/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } [​](https://docs.siray.ai/api-reference/task-status-image#overview) Overview ------------------------------------------------------------------------------- When you submit an image generation task (text-to-image or image-to-image) you receive a `task_id`. Use this endpoint to poll the execution lifecycle until the task either completes successfully or fails. Query every 3–5 seconds to maintain responsiveness without exceeding rate limits. [​](https://docs.siray.ai/api-reference/task-status-image#endpoint) Endpoint ------------------------------------------------------------------------------- * `GET https://api.siray.ai/v1/images/generations/async/{task_id}` **Headers** * `Authorization: Bearer ` **Path parameters** | Name | Description | | --- | --- | | `task_id` | ID returned in the async submission response. | [​](https://docs.siray.ai/api-reference/task-status-image#response-structure) Response structure --------------------------------------------------------------------------------------------------- { "code": "success", "message": "", "data": { "task_id": "image_a8813a4b4c9", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } ### [​](https://docs.siray.ai/api-reference/task-status-image#fields) Fields * `code` / `message`: Service-level indicators for the request outcome. * `data.task_id`: Echoes the submitted task identifier. * `data.status`: Current lifecycle state — see the table below. * `data.progress`: Human-readable percentage for UI display. * `data.outputs`: Array of public URLs that host the generated image assets (present when `status` is `SUCCESS`). * `data.fail_code`: Machine-readable failure code when `status` is `FAILURE`. See [fail\_code](https://docs.siray.ai/api-reference/fail-code) . * `data.fail_reason`: Populated if generation fails. * `data.submit_time`, `data.start_time`, `data.finish_time`: Unix timestamps for auditing latency. ### [​](https://docs.siray.ai/api-reference/task-status-image#status-values) Status values | Status | Meaning | | --- | --- | | `NOT_START` | Task accepted but preprocessing has not started yet. | | `SUBMITTED` | Request stored and waiting to enter the queue. | | `QUEUED` | Task is scheduled and waiting for compute resources. | | `IN_PROGRESS` | Generation is currently running. | | `SUCCESS` | Outputs are ready; download them via the URLs in `outputs`. | | `FAILURE` | Irrecoverable error; inspect `fail_code` and `fail_reason` for remediation steps. | [​](https://docs.siray.ai/api-reference/task-status-image#usage-example) Usage example ----------------------------------------------------------------------------------------- curl -X GET "https://api.siray.ai/v1/images/generations/async/${TASK_ID}" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" > Once `status` becomes `SUCCESS`, fetch the image(s) via the URLs in `outputs`. If the task fails, retry only after resolving the reported `fail_code` / `fail_reason`. #### Authorizations [​](https://docs.siray.ai/api-reference/task-status-image#authorization-authorization) Authorization string header required Bearer authentication using API key #### Path Parameters [​](https://docs.siray.ai/api-reference/task-status-image#parameter-task-id) task\_id string required Identifier returned from the image generation task submission #### Response 200 - application/json Task status and (if available) generated outputs Async task status query response [​](https://docs.siray.ai/api-reference/task-status-image#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/task-status-image#response-message) message string required Additional information about the request result Example: `""` [​](https://docs.siray.ai/api-reference/task-status-image#response-data) data object required Task execution details Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-ultra-i2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "21:9", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-ultra-i2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', image: 'example_value', model: 'black-forest-labs/flux-1.1-pro-ultra-i2i', output_format: 'jpg', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-1.1-pro-ultra-i2i',\ 'output_format' => 'jpg',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-ultra-i2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "21:9", "image": "example_value", "model": "black-forest-labs/flux-1.1-pro-ultra-i2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', image: 'example_value', model: 'black-forest-labs/flux-1.1-pro-ultra-i2i', output_format: 'jpg', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-1.1-pro-ultra-i2i',\ 'output_format' => 'jpg',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-i2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `21:9`, `16:9`, `3:2`, `4:3`, `5:4`, `1:1`, `4:5`, `3:4`, `2:3`, `9:16`, `9:21` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-1.1-pro-ultra-i2i` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-output-format) output\_format enum Output format for the 3D model Available options: `jpg`, `png` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `1 <= x <= 6` Example: `6` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-i2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "image": "example_value", "model": "vidu/vidu-q2-pro-i2v", "prompt": "example_value", "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "image": "example_value", "model": "vidu/vidu-q2-pro-i2v", "prompt": "example_value", "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, image: 'example_value', model: 'vidu/vidu-q2-pro-i2v', prompt: 'example_value', size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'image' => 'example_value',\ 'model' => 'vidu/vidu-q2-pro-i2v',\ 'prompt' => 'example_value',\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "image": "example_value", "model": "vidu/vidu-q2-pro-i2v", "prompt": "example_value", "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "image": "example_value", "model": "vidu/vidu-q2-pro-i2v", "prompt": "example_value", "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, image: 'example_value', model: 'vidu/vidu-q2-pro-i2v', prompt: 'example_value', size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'image' => 'example_value',\ 'model' => 'vidu/vidu-q2-pro-i2v',\ 'prompt' => 'example_value',\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q2-pro-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1`, `4:3`, `3:4` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-duration) duration enum required Fixed duration Available options: `4`, `8` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-model) model enum required Model name to use for the request Available options: `vidu/vidu-q2-pro-i2v` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "kuaishou/kling-2.6-pro-i2v", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "kuaishou/kling-2.6-pro-i2v", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'kuaishou/kling-2.6-pro-i2v', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'kuaishou/kling-2.6-pro-i2v',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "kuaishou/kling-2.6-pro-i2v", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "kuaishou/kling-2.6-pro-i2v", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'kuaishou/kling-2.6-pro-i2v', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'kuaishou/kling-2.6-pro-i2v',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"kuaishou/kling-2.6-pro-i2v\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#body-duration) duration enum required Fixed duration Available options: `5`, `10` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-2.6-pro-i2v` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#body-prompt) prompt string required Text prompt for generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/task-status-video#content-area) Query video generation task cURL curl --request GET \ --url https://api.siray.ai/v1/video/generations/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/video/generations/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/video/generations/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/video/generations/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } GET / v1 / video / generations / {task\_id} Try it Query video generation task cURL curl --request GET \ --url https://api.siray.ai/v1/video/generations/{task_id} \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/video/generations/{task_id}" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/video/generations/{task_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations/{task_id}",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations/{task_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/video/generations/{task_id}") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations/{task_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } [​](https://docs.siray.ai/api-reference/task-status-video#overview) Overview ------------------------------------------------------------------------------- All text-to-video or image-to-video submissions return a `task_id`. Use the video task status endpoint to poll the job until it finishes. The payload mirrors the async submission response and includes downloadable asset URLs when the task succeeds. Poll every 3–5 seconds to balance freshness with API usage efficiency. [​](https://docs.siray.ai/api-reference/task-status-video#endpoint) Endpoint ------------------------------------------------------------------------------- * `GET https://api.siray.ai/v1/video/generations/{task_id}` **Headers** * `Authorization: Bearer ` **Path parameters** | Name | Description | | --- | --- | | `task_id` | ID returned when the video task was created. | [​](https://docs.siray.ai/api-reference/task-status-video#response-structure) Response structure --------------------------------------------------------------------------------------------------- { "code": "success", "message": "", "data": { "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5", "status": "SUCCESS", "progress": "100%", "outputs": [\ "https://api.siray.ai/redirect/example-output"\ ], "start_time": 1763274702, "finish_time": 1763274838, "submit_time": 1763274672, "fail_code": "", "fail_reason": "" } } ### [​](https://docs.siray.ai/api-reference/task-status-video#fields) Fields * `code` / `message`: Service-level indicators for the polling request. * `data.task_id`: Echo of the video task identifier. * `data.status`: Lifecycle state — values listed below. * `data.progress`: Human-readable progress string. * `data.outputs`: URLs pointing to the generated video assets (present when `status` is `SUCCESS`). * `data.fail_code`: Machine-readable failure code when `status` is `FAILURE`. See [fail\_code](https://docs.siray.ai/api-reference/fail-code) . * `data.fail_reason`: Explains why processing stopped when `status` is `FAILURE`. * `data.submit_time`, `data.start_time`, `data.finish_time`: Unix timestamps that help track total latency. ### [​](https://docs.siray.ai/api-reference/task-status-video#status-values) Status values | Status | Meaning | | --- | --- | | `NOT_START` | Task accepted but preprocessing has not started yet. | | `SUBMITTED` | Request stored and waiting to enter the queue. | | `QUEUED` | Task is scheduled and waiting for compute resources. | | `IN_PROGRESS` | Generation is currently running. | | `SUCCESS` | Outputs are ready; download the video via the provided URLs. | | `FAILURE` | Irrecoverable error; inspect `fail_code` and `fail_reason` for remediation steps. | [​](https://docs.siray.ai/api-reference/task-status-video#usage-example) Usage example ----------------------------------------------------------------------------------------- curl -X GET "https://api.siray.ai/v1/video/generations/${TASK_ID}" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" > When `status` reaches `SUCCESS`, stream or download the video from the URLs in `outputs`. If the task fails, retry after resolving the underlying issue noted in `fail_code` / `fail_reason`. #### Authorizations [​](https://docs.siray.ai/api-reference/task-status-video#authorization-authorization) Authorization string header required Bearer authentication using API key #### Path Parameters [​](https://docs.siray.ai/api-reference/task-status-video#parameter-task-id) task\_id string required Identifier returned from the video generation task submission #### Response 200 - application/json Task status and (if available) generated outputs Async task status query response [​](https://docs.siray.ai/api-reference/task-status-video#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/task-status-video#response-message) message string required Additional information about the request result Example: `""` [​](https://docs.siray.ai/api-reference/task-status-video#response-data) data object required Task execution details Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-v6-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '0.5', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-v6-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '0.5',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-v6-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '0.5', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-v6-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '0.5',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `3:2`, `2:3` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-model) model enum required Model name to use for the request Available options: `midjourney/midjourney-v6-t2i` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-chaos) chaos integer Chaos parameter: influences variation in initial image grids (0-100) Required range: `0 <= x <= 100` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-quality) quality enum Quality option Available options: `0.5`, `1`, `2` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-raw) raw boolean Raw mode: reduces Midjourney's default aesthetic processing [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-style-reference) style\_reference string Style reference for generation, can be an image URL, a numeric value, or "random" [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-style-weight) style\_weight number default:100 Weight of the style reference (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-stylize) stylize integer default:100 Stylize parameter: how strongly Midjourney's aesthetic is applied (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-tile) tile boolean Tile mode: generates images that can be used as repeating tiles [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#body-weird) weird integer Weird parameter: introduces unusual aesthetics to generated images (0-3000) Required range: `0 <= x <= 3000` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/midjourney-v6-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "adaptive", "audios": [\ "example_value"\ ], "duration": 5, "images": [\ "example_value"\ ], "model": "minimax/minimax-h3-ref2v", "prompt": "example_value", "size": "768p", "videos": [\ "example_value"\ ] } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "adaptive", "audios": ["example_value"], "duration": 5, "images": ["example_value"], "model": "minimax/minimax-h3-ref2v", "prompt": "example_value", "size": "768p", "videos": ["example_value"] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'adaptive', audios: ['example_value'], duration: 5, images: ['example_value'], model: 'minimax/minimax-h3-ref2v', prompt: 'example_value', size: '768p', videos: ['example_value'] }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'adaptive',\ 'audios' => [\ 'example_value'\ ],\ 'duration' => 5,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'minimax/minimax-h3-ref2v',\ 'prompt' => 'example_value',\ 'size' => '768p',\ 'videos' => [\ 'example_value'\ ]\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "adaptive", "audios": [\ "example_value"\ ], "duration": 5, "images": [\ "example_value"\ ], "model": "minimax/minimax-h3-ref2v", "prompt": "example_value", "size": "768p", "videos": [\ "example_value"\ ] } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "adaptive", "audios": ["example_value"], "duration": 5, "images": ["example_value"], "model": "minimax/minimax-h3-ref2v", "prompt": "example_value", "size": "768p", "videos": ["example_value"] } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'adaptive', audios: ['example_value'], duration: 5, images: ['example_value'], model: 'minimax/minimax-h3-ref2v', prompt: 'example_value', size: '768p', videos: ['example_value'] }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'adaptive',\ 'audios' => [\ 'example_value'\ ],\ 'duration' => 5,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'minimax/minimax-h3-ref2v',\ 'prompt' => 'example_value',\ 'size' => '768p',\ 'videos' => [\ 'example_value'\ ]\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"adaptive\",\n \"audios\": [\n \"example_value\"\n ],\n \"duration\": 5,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"minimax/minimax-h3-ref2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\",\n \"videos\": [\n \"example_value\"\n ]\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `adaptive`, `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-ref2v` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-size) size enum required Size Available options: `768p`, `2k` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-audios) audios string\[\] Array of input audio URLs Maximum array length: `9` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-images) images string\[\] Array of input images, which can be data URL or image URL Maximum array length: `9` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#body-videos) videos string\[\] Array of input video URLs Maximum array length: `9` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-ref2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "xiaomi/mimo-v2-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "xiaomi/mimo-v2-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'xiaomi/mimo-v2-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'xiaomi/mimo-v2-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "xiaomi/mimo-v2-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 65536, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "xiaomi/mimo-v2-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 65536, messages: [{content: 'example_value', role: 'system'}], model: 'xiaomi/mimo-v2-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 65536,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'xiaomi/mimo-v2-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 65536,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"xiaomi/mimo-v2-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-model) model enum required Model name to use for the request Available options: `xiaomi/mimo-v2-flash` [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-max-tokens) max\_tokens integer default:65536 Maximum number of tokens to generate Required range: `1 <= x <= 65536` [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/mimo-v2-flash#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "cfg_scale": 0.5, "duration": 3, "model": "kuaishou/kling-3.0-t2v", "negative_prompt": "example_value", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "cfg_scale": 0.5, "duration": 3, "model": "kuaishou/kling-3.0-t2v", "negative_prompt": "example_value", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, cfg_scale: 0.5, duration: 3, model: 'kuaishou/kling-3.0-t2v', negative_prompt: 'example_value', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'cfg_scale' => 0.5,\ 'duration' => 3,\ 'model' => 'kuaishou/kling-3.0-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "cfg_scale": 0.5, "duration": 3, "model": "kuaishou/kling-3.0-t2v", "negative_prompt": "example_value", "prompt": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "cfg_scale": 0.5, "duration": 3, "model": "kuaishou/kling-3.0-t2v", "negative_prompt": "example_value", "prompt": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, cfg_scale: 0.5, duration: 3, model: 'kuaishou/kling-3.0-t2v', negative_prompt: 'example_value', prompt: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'cfg_scale' => 0.5,\ 'duration' => 3,\ 'model' => 'kuaishou/kling-3.0-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"cfg_scale\": 0.5,\n \"duration\": 3,\n \"model\": \"kuaishou/kling-3.0-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1` [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-duration) duration enum required Fixed duration Available options: `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-3.0-t2v` [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-cfg-scale) cfg\_scale number default:0.5 Generation guidance strength (0-1) Required range: `0 <= x <= 1` [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-3.0-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-2.6-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-2.6-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-2.6-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-2.6-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-2.6-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-2.6-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-2.6-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-2.6-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-character-orientation) character\_orientation enum required Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). Available options: `video`, `image` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-2.6-motion-control` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-video) video string required Input video URL [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#body-keep-original-sound) keep\_original\_sound boolean Whether to keep the original sound in video generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-motion-control#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-c1-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-c1-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 1, image: 'example_value', model: 'pixverse/pixverse-c1-i2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-c1-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "audio_enable": false, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-c1-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "audio_enable": False, "duration": 1, "image": "example_value", "model": "pixverse/pixverse-c1-i2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ audio_enable: false, duration: 1, image: 'example_value', model: 'pixverse/pixverse-c1-i2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'audio_enable' => false,\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'pixverse/pixverse-c1-i2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"audio_enable\": false,\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"pixverse/pixverse-c1-i2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-c1-i2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 1, "model": "pixverse/pixverse-v6-t2v", "multi_clip": false, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 1, "model": "pixverse/pixverse-v6-t2v", "multi_clip": False, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 1, model: 'pixverse/pixverse-v6-t2v', multi_clip: false, negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 1,\ 'model' => 'pixverse/pixverse-v6-t2v',\ 'multi_clip' => false,\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 1, "model": "pixverse/pixverse-v6-t2v", "multi_clip": false, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 1, "model": "pixverse/pixverse-v6-t2v", "multi_clip": False, "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p", "thinking_type": "enabled" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 1, model: 'pixverse/pixverse-v6-t2v', multi_clip: false, negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p', thinking_type: 'enabled' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 1,\ 'model' => 'pixverse/pixverse-v6-t2v',\ 'multi_clip' => false,\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p',\ 'thinking_type' => 'enabled'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-v6-t2v\",\n \"multi_clip\": false,\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\",\n \"thinking_type\": \"enabled\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `2:3`, `3:2`, `21:9` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-v6-t2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-multi-clip) multi\_clip boolean Whether to enable multi-clip generation mode [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#body-thinking-type) thinking\_type enum Thinking mode for the model Available options: `enabled`, `disabled`, `auto` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-v6-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "elements": [\ {\ "frontal_image": "example_value",\ "reference_images": [\ "example_value"\ ],\ "video": "example_value"\ }\ ], "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-3-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "elements": [\ {\ "frontal_image": "example_value",\ "reference_images": ["example_value"],\ "video": "example_value"\ }\ ], "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-3-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', elements: [\ {\ frontal_image: 'example_value',\ reference_images: ['example_value'],\ video: 'example_value'\ }\ ], image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-3-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'elements' => [\ [\ 'frontal_image' => 'example_value',\ 'reference_images' => [\ 'example_value'\ ],\ 'video' => 'example_value'\ ]\ ],\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-3-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "elements": [\ {\ "frontal_image": "example_value",\ "reference_images": [\ "example_value"\ ],\ "video": "example_value"\ }\ ], "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-3-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "elements": [\ {\ "frontal_image": "example_value",\ "reference_images": ["example_value"],\ "video": "example_value"\ }\ ], "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-3-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', elements: [\ {\ frontal_image: 'example_value',\ reference_images: ['example_value'],\ video: 'example_value'\ }\ ], image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-3-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'elements' => [\ [\ 'frontal_image' => 'example_value',\ 'reference_images' => [\ 'example_value'\ ],\ 'video' => 'example_value'\ ]\ ],\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-3-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"elements\": [\n {\n \"frontal_image\": \"example_value\",\n \"reference_images\": [\n \"example_value\"\n ],\n \"video\": \"example_value\"\n }\n ],\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-3-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-character-orientation) character\_orientation enum required Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). Available options: `video`, `image` [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-3-motion-control` [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-video) video string required Input video URL [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-elements) elements object\[\] Character/object elements for video generation Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#body-keep-original-sound) keep\_original\_sound boolean Whether to keep the original sound in video generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-3-motion-control#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v7-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "1", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v7-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "1", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-v7-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '1', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-v7-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '1',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v7-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "1", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-v7-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "1", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-v7-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '1', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-v7-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '1',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-v7-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"1\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `3:2`, `2:3` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-model) model enum required Model name to use for the request Available options: `midjourney/midjourney-v7-t2i` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-chaos) chaos integer Chaos parameter: influences variation in initial image grids (0-100) Required range: `0 <= x <= 100` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-quality) quality enum Quality option Available options: `1`, `2`, `4` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-raw) raw boolean Raw mode: reduces Midjourney's default aesthetic processing [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-style-reference) style\_reference string Style reference for generation, can be an image URL, a numeric value, or "random" [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-style-weight) style\_weight number default:100 Weight of the style reference (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-stylize) stylize integer default:100 Stylize parameter: how strongly Midjourney's aesthetic is applied (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-tile) tile boolean Tile mode: generates images that can be used as repeating tiles [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#body-weird) weird integer Weird parameter: introduces unusual aesthetics to generated images (0-3000) Required range: `0 <= x <= 3000` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/midjourney-v7-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/models#content-area) List models cURL curl --request GET \ --url https://api.siray.ai/v1/models \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/models" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/models', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/models",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/models" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/models") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/models") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "success": true, "object": "list", "data": [\ {\ "id": "openai/gpt-4o",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "active"\ },\ {\ "id": "openai/gpt-4",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "deprecated",\ "deprecated_at": 1710000000,\ "replaced_by": "openai/gpt-4.1"\ }\ ] } GET / v1 / models Try it List models cURL curl --request GET \ --url https://api.siray.ai/v1/models \ --header 'Authorization: Bearer ' import requests url = "https://api.siray.ai/v1/models" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.text) const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; fetch('https://api.siray.ai/v1/models', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/models",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "GET",\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer "\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/models" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.get("https://api.siray.ai/v1/models") .header("Authorization", "Bearer ") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/models") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body 200 { "success": true, "object": "list", "data": [\ {\ "id": "openai/gpt-4o",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "active"\ },\ {\ "id": "openai/gpt-4",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "deprecated",\ "deprecated_at": 1710000000,\ "replaced_by": "openai/gpt-4.1"\ }\ ] } [​](https://docs.siray.ai/api-reference/models#overview) Overview -------------------------------------------------------------------- Use the Models API to discover which models are available to you. Each model includes the endpoint families it supports and lifecycle metadata you can use to migrate away from deprecated or retired models. Use `supported_endpoint_types` to choose the correct generation endpoint instead of relying only on model naming conventions. [​](https://docs.siray.ai/api-reference/models#endpoints) Endpoints ---------------------------------------------------------------------- * `GET https://api.siray.ai/v1/models` * `GET https://api.siray.ai/v1/models/{model}` **Headers** * `Authorization: Bearer ` **Path parameters** | Name | Description | | --- | --- | | `model` | Model ID to retrieve, such as `openai/gpt-4o` or `gpt-4o`. | [​](https://docs.siray.ai/api-reference/models#list-response-structure) List response structure -------------------------------------------------------------------------------------------------- { "success": true, "object": "list", "data": [\ {\ "id": "openai/gpt-4o",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "active"\ },\ {\ "id": "openai/gpt-4",\ "object": "model",\ "created": 1626777600,\ "owned_by": "openai",\ "supported_endpoint_types": [\ "openai"\ ],\ "status": "deprecated",\ "deprecated_at": 1710000000,\ "replaced_by": "openai/gpt-4.1"\ }\ ] } [​](https://docs.siray.ai/api-reference/models#retrieve-response-structure) Retrieve response structure ---------------------------------------------------------------------------------------------------------- { "id": "openai/gpt-4o", "object": "model", "created": 1626777600, "owned_by": "openai", "supported_endpoint_types": [\ "openai"\ ], "status": "active" } ### [​](https://docs.siray.ai/api-reference/models#fields) Fields * `id`: Model identifier used in request payloads. * `object`: Always `model` for each model item. * `created`: Unix timestamp attached to the model metadata. * `owned_by`: Owner derived from `id`. If the ID contains `/`, this is the part before the first `/`; otherwise it is the full model ID. * `supported_endpoint_types`: Endpoint families supported by the model. Empty array means the API could not determine a supported endpoint type. * `status`: Lifecycle state of the model. Values are listed below. * `deprecated_at`: Unix timestamp when the model was deprecated. Omitted when empty. * `retired_at`: Unix timestamp when the model was retired. Omitted when empty. * `replaced_by`: Replacement model ID. Omitted when empty. ### [​](https://docs.siray.ai/api-reference/models#supported-endpoint-types) Supported endpoint types | Type | Use case | | --- | --- | | `openai` | OpenAI-compatible chat completions. | | `openai-response` | OpenAI-compatible Responses API. | | `anthropic` | Anthropic-compatible messages endpoint. | | `gemini` | Gemini-compatible content generation. | | `jina-rerank` | Rerank requests. | | `embeddings` | Embedding generation. | | `image-generation` | Text-to-image or image-to-image generation. | | `video-generation` | Video, text-to-video, image-to-video, or video-to-video generation. | | `3d-generation` | Text-to-3D or image-to-3D generation. | | `openai-video` | OpenAI-compatible video endpoint. | ### [​](https://docs.siray.ai/api-reference/models#lifecycle-status-values) Lifecycle status values | Status | Meaning | | --- | --- | | `active` | Model is currently available for normal use. | | `deprecated` | Model still works, but you should migrate to `replaced_by` when provided. | | `retired` | Model is no longer intended for use. Migrate before sending production traffic. | [​](https://docs.siray.ai/api-reference/models#usage-examples) Usage examples -------------------------------------------------------------------------------- List all models available to the token: curl -X GET "https://api.siray.ai/v1/models" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" Retrieve one model: curl -X GET "https://api.siray.ai/v1/models/openai/gpt-4o" \ -H "Authorization: Bearer ${SIRAY_API_TOKEN}" > For provider-qualified IDs that contain `/`, URL-encode the slash if your HTTP client does not preserve it in path parameters. #### Authorizations [​](https://docs.siray.ai/api-reference/models#authorization-authorization) Authorization string header required API token passed as a Bearer token in the Authorization header. #### Response 200 - application/json Model list or an error envelope * Option 1 * Option 2 OpenAI-compatible model list response. [​](https://docs.siray.ai/api-reference/models#response-one-of-0-success) success boolean required [​](https://docs.siray.ai/api-reference/models#response-one-of-0-data) data object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/models#response-one-of-0-object) object string required Allowed value: `"list"` --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'minimax/minimax-h3-i2v', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'minimax/minimax-h3-i2v',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "duration": 5, "image": "example_value", "model": "minimax/minimax-h3-i2v", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ duration: 5, image: 'example_value', model: 'minimax/minimax-h3-i2v', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'duration' => 5,\ 'image' => 'example_value',\ 'model' => 'minimax/minimax-h3-i2v',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"duration\": 5,\n \"image\": \"example_value\",\n \"model\": \"minimax/minimax-h3-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-i2v` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#body-size) size enum required Size Available options: `768p`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v-spicy", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v-spicy", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', duration: 5, model: 'minimax/minimax-h3-t2v-spicy', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'duration' => 5,\ 'model' => 'minimax/minimax-h3-t2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v-spicy", "prompt": "example_value", "size": "768p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "21:9", "duration": 5, "model": "minimax/minimax-h3-t2v-spicy", "prompt": "example_value", "size": "768p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', duration: 5, model: 'minimax/minimax-h3-t2v-spicy', prompt: 'example_value', size: '768p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'duration' => 5,\ 'model' => 'minimax/minimax-h3-t2v-spicy',\ 'prompt' => 'example_value',\ 'size' => '768p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"duration\": 5,\n \"model\": \"minimax/minimax-h3-t2v-spicy\",\n \"prompt\": \"example_value\",\n \"size\": \"768p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#body-model) model enum required Model name to use for the request Available options: `minimax/minimax-h3-t2v-spicy` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#body-size) size enum required Size Available options: `768p`, `2k` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/minimax-h3-t2v-spicy#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 1, "model": "pixverse/pixverse-c1-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 1, "model": "pixverse/pixverse-c1-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 1, model: 'pixverse/pixverse-c1-t2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 1,\ 'model' => 'pixverse/pixverse-c1-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 1, "model": "pixverse/pixverse-c1-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 1, "model": "pixverse/pixverse-c1-t2v", "negative_prompt": "example_value", "prompt": "example_value", "seed": -1, "size": "360p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 1, model: 'pixverse/pixverse-c1-t2v', negative_prompt: 'example_value', prompt: 'example_value', seed: -1, size: '360p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 1,\ 'model' => 'pixverse/pixverse-c1-t2v',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '360p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 1,\n \"model\": \"pixverse/pixverse-c1-t2v\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"360p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `2:3`, `3:2`, `21:9` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-model) model enum required Model name to use for the request Available options: `pixverse/pixverse-c1-t2v` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-size) size enum required Size Available options: `360p`, `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 2147483647` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/pixverse-c1-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-max", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-max", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-kontext-t2i-max', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-kontext-t2i-max',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-max", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-max", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-kontext-t2i-max', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-kontext-t2i-max',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4`, `21:9`, `9:21`, `2:1`, `1:2` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-kontext-t2i-max` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-max#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-pro", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-pro", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'match_input_image', image: 'example_value', model: 'black-forest-labs/flux-kontext-i2i-pro', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'match_input_image',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-kontext-i2i-pro',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-pro", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-pro", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'match_input_image', image: 'example_value', model: 'black-forest-labs/flux-kontext-i2i-pro', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'match_input_image',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-kontext-i2i-pro',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `match_input_image`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4`, `21:9`, `9:21`, `2:1`, `1:2` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-kontext-i2i-pro` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-pro#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "auto", "audio_enable": false, "duration": 5, "model": "black-forest-labs/flux-3-v2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "auto", "audio_enable": False, "duration": 5, "model": "black-forest-labs/flux-3-v2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'auto', audio_enable: false, duration: 5, model: 'black-forest-labs/flux-3-v2v', prompt: 'example_value', safety_tolerance: 4, size: '720p', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'auto',\ 'audio_enable' => false,\ 'duration' => 5,\ 'model' => 'black-forest-labs/flux-3-v2v',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 4,\ 'size' => '720p',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "auto", "audio_enable": false, "duration": 5, "model": "black-forest-labs/flux-3-v2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "auto", "audio_enable": False, "duration": 5, "model": "black-forest-labs/flux-3-v2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'auto', audio_enable: false, duration: 5, model: 'black-forest-labs/flux-3-v2v', prompt: 'example_value', safety_tolerance: 4, size: '720p', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'auto',\ 'audio_enable' => false,\ 'duration' => 5,\ 'model' => 'black-forest-labs/flux-3-v2v',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 4,\ 'size' => '720p',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"model\": \"black-forest-labs/flux-3-v2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `auto`, `21:9`, `2:1`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, `18`, `19`, `20` [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-3-v2v` [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-video) video string required Input video URL [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `0 <= x <= 4` Example: `4` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-3-v2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "auto", "audio_enable": false, "duration": 5, "end_image": "example_value", "image": "example_value", "model": "black-forest-labs/flux-3-i2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "auto", "audio_enable": False, "duration": 5, "end_image": "example_value", "image": "example_value", "model": "black-forest-labs/flux-3-i2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'auto', audio_enable: false, duration: 5, end_image: 'example_value', image: 'example_value', model: 'black-forest-labs/flux-3-i2v', prompt: 'example_value', safety_tolerance: 4, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'auto',\ 'audio_enable' => false,\ 'duration' => 5,\ 'end_image' => 'example_value',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-3-i2v',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 4,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "auto", "audio_enable": false, "duration": 5, "end_image": "example_value", "image": "example_value", "model": "black-forest-labs/flux-3-i2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "auto", "audio_enable": False, "duration": 5, "end_image": "example_value", "image": "example_value", "model": "black-forest-labs/flux-3-i2v", "prompt": "example_value", "safety_tolerance": 4, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'auto', audio_enable: false, duration: 5, end_image: 'example_value', image: 'example_value', model: 'black-forest-labs/flux-3-i2v', prompt: 'example_value', safety_tolerance: 4, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'auto',\ 'audio_enable' => false,\ 'duration' => 5,\ 'end_image' => 'example_value',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-3-i2v',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 4,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"auto\",\n \"audio_enable\": false,\n \"duration\": 5,\n \"end_image\": \"example_value\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-3-i2v\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 4,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `auto`, `21:9`, `2:1`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-duration) duration enum required Fixed duration Available options: `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, `18`, `19`, `20` [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-3-i2v` [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-end-image) end\_image string End frame image URL for image-to-video generation [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `0 <= x <= 4` Example: `4` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-3-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "model": "black-forest-labs/flux-1.1-pro-ultra-t2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "21:9", "model": "black-forest-labs/flux-1.1-pro-ultra-t2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', model: 'black-forest-labs/flux-1.1-pro-ultra-t2i', output_format: 'jpg', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'model' => 'black-forest-labs/flux-1.1-pro-ultra-t2i',\ 'output_format' => 'jpg',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "21:9", "model": "black-forest-labs/flux-1.1-pro-ultra-t2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "21:9", "model": "black-forest-labs/flux-1.1-pro-ultra-t2i", "output_format": "jpg", "prompt": "example_value", "safety_tolerance": 6, "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '21:9', model: 'black-forest-labs/flux-1.1-pro-ultra-t2i', output_format: 'jpg', prompt: 'example_value', safety_tolerance: 6, seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '21:9',\ 'model' => 'black-forest-labs/flux-1.1-pro-ultra-t2i',\ 'output_format' => 'jpg',\ 'prompt' => 'example_value',\ 'safety_tolerance' => 6,\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"21:9\",\n \"model\": \"black-forest-labs/flux-1.1-pro-ultra-t2i\",\n \"output_format\": \"jpg\",\n \"prompt\": \"example_value\",\n \"safety_tolerance\": 6,\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `21:9`, `16:9`, `3:2`, `4:3`, `5:4`, `1:1`, `4:5`, `3:4`, `2:3`, `9:16`, `9:21` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-1.1-pro-ultra-t2i` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-output-format) output\_format enum Output format for the 3D model Available options: `jpg`, `png` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-safety-tolerance) safety\_tolerance integer Safety tolerance level, higher values allow more permissive content Required range: `1 <= x <= 6` Example: `6` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-1.1-pro-ultra-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "images": [\ "example_value"\ ], "model": "vidu/vidu-q2-pro-fast-i2v", "prompt": "example_value", "seed": -1, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "images": ["example_value"], "model": "vidu/vidu-q2-pro-fast-i2v", "prompt": "example_value", "seed": -1, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, images: ['example_value'], model: 'vidu/vidu-q2-pro-fast-i2v', prompt: 'example_value', seed: -1, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'vidu/vidu-q2-pro-fast-i2v',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "images": [\ "example_value"\ ], "model": "vidu/vidu-q2-pro-fast-i2v", "prompt": "example_value", "seed": -1, "size": "720p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "images": ["example_value"], "model": "vidu/vidu-q2-pro-fast-i2v", "prompt": "example_value", "seed": -1, "size": "720p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, images: ['example_value'], model: 'vidu/vidu-q2-pro-fast-i2v', prompt: 'example_value', seed: -1, size: '720p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'images' => [\ 'example_value'\ ],\ 'model' => 'vidu/vidu-q2-pro-fast-i2v',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '720p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"images\": [\n \"example_value\"\n ],\n \"model\": \"vidu/vidu-q2-pro-fast-i2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"720p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1`, `4:3`, `3:4` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-duration) duration enum required Fixed duration Available options: `4`, `8` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-images) images string\[\] required Array of input images, which can be data URL or image URL Required array length: `1 - 7` elements [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-model) model enum required Model name to use for the request Available options: `vidu/vidu-q2-pro-fast-i2v` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-size) size enum required Size Available options: `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/vidu-q2-pro-fast-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 3, "image": "example_value", "model": "vidu/vidu-q4-i2v", "prompt": "example_value", "size": "540p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 3, "image": "example_value", "model": "vidu/vidu-q4-i2v", "prompt": "example_value", "size": "540p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 3, image: 'example_value', model: 'vidu/vidu-q4-i2v', prompt: 'example_value', size: '540p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 3,\ 'image' => 'example_value',\ 'model' => 'vidu/vidu-q4-i2v',\ 'prompt' => 'example_value',\ 'size' => '540p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 3, "image": "example_value", "model": "vidu/vidu-q4-i2v", "prompt": "example_value", "size": "540p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 3, "image": "example_value", "model": "vidu/vidu-q4-i2v", "prompt": "example_value", "size": "540p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 3, image: 'example_value', model: 'vidu/vidu-q4-i2v', prompt: 'example_value', size: '540p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 3,\ 'image' => 'example_value',\ 'model' => 'vidu/vidu-q4-i2v',\ 'prompt' => 'example_value',\ 'size' => '540p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 3,\n \"image\": \"example_value\",\n \"model\": \"vidu/vidu-q4-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"540p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1`, `4:3`, `3:4` [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-duration) duration enum required Fixed duration Available options: `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16` [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-model) model enum required Model name to use for the request Available options: `vidu/vidu-q4-i2v` [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-size) size enum required Size Available options: `540p`, `720p`, `1080p`, `2k`, `4k` [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/vidu-q4-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "model": "vidu/vidu-q3-pro-t2v", "prompt": "example_value", "seed": -1, "size": "540p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "model": "vidu/vidu-q3-pro-t2v", "prompt": "example_value", "seed": -1, "size": "540p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, model: 'vidu/vidu-q3-pro-t2v', prompt: 'example_value', seed: -1, size: '540p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'model' => 'vidu/vidu-q3-pro-t2v',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '540p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "16:9", "audio_enable": false, "duration": 4, "model": "vidu/vidu-q3-pro-t2v", "prompt": "example_value", "seed": -1, "size": "540p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "16:9", "audio_enable": False, "duration": 4, "model": "vidu/vidu-q3-pro-t2v", "prompt": "example_value", "seed": -1, "size": "540p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '16:9', audio_enable: false, duration: 4, model: 'vidu/vidu-q3-pro-t2v', prompt: 'example_value', seed: -1, size: '540p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '16:9',\ 'audio_enable' => false,\ 'duration' => 4,\ 'model' => 'vidu/vidu-q3-pro-t2v',\ 'prompt' => 'example_value',\ 'seed' => -1,\ 'size' => '540p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"16:9\",\n \"audio_enable\": false,\n \"duration\": 4,\n \"model\": \"vidu/vidu-q3-pro-t2v\",\n \"prompt\": \"example_value\",\n \"seed\": -1,\n \"size\": \"540p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `16:9`, `9:16`, `1:1`, `4:3`, `3:4` [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-duration) duration enum required Fixed duration Available options: `4`, `8` [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-model) model enum required Model name to use for the request Available options: `vidu/vidu-q3-pro-t2v` [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-size) size enum required Size Available options: `540p`, `720p`, `1080p` [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-audio-enable) audio\_enable boolean Whether to generate audio along with video [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/vidu-q3-pro-t2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "duration": 1, "image": "example_value", "model": "x-ai/grok-imagine-video-i2v", "prompt": "example_value", "size": "480p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "1:1", "duration": 1, "image": "example_value", "model": "x-ai/grok-imagine-video-i2v", "prompt": "example_value", "size": "480p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', duration: 1, image: 'example_value', model: 'x-ai/grok-imagine-video-i2v', prompt: 'example_value', size: '480p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'x-ai/grok-imagine-video-i2v',\ 'prompt' => 'example_value',\ 'size' => '480p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "duration": 1, "image": "example_value", "model": "x-ai/grok-imagine-video-i2v", "prompt": "example_value", "size": "480p" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "aspect_ratio": "1:1", "duration": 1, "image": "example_value", "model": "x-ai/grok-imagine-video-i2v", "prompt": "example_value", "size": "480p" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', duration: 1, image: 'example_value', model: 'x-ai/grok-imagine-video-i2v', prompt: 'example_value', size: '480p' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'duration' => 1,\ 'image' => 'example_value',\ 'model' => 'x-ai/grok-imagine-video-i2v',\ 'prompt' => 'example_value',\ 'size' => '480p'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"duration\": 1,\n \"image\": \"example_value\",\n \"model\": \"x-ai/grok-imagine-video-i2v\",\n \"prompt\": \"example_value\",\n \"size\": \"480p\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `3:2`, `2:3` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-duration) duration enum required Fixed duration Available options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-model) model enum required Model name to use for the request Available options: `x-ai/grok-imagine-video-i2v` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#body-size) size enum required Size Available options: `480p`, `720p` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/grok-imagine-video-i2v#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#content-area) Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-2.6-pro-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-2.6-pro-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-2.6-pro-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-2.6-pro-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / video / generations Try it Generate video cURL curl --request POST \ --url https://api.siray.ai/v1/video/generations \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "character_orientation": "video", "image": "example_value", "keep_original_sound": false, "model": "kuaishou/kling-2.6-pro-motion-control", "prompt": "example_value", "video": "example_value" } ' import requests url = "https://api.siray.ai/v1/video/generations" payload = { "character_orientation": "video", "image": "example_value", "keep_original_sound": False, "model": "kuaishou/kling-2.6-pro-motion-control", "prompt": "example_value", "video": "example_value" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ character_orientation: 'video', image: 'example_value', keep_original_sound: false, model: 'kuaishou/kling-2.6-pro-motion-control', prompt: 'example_value', video: 'example_value' }) }; fetch('https://api.siray.ai/v1/video/generations', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/video/generations",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'character_orientation' => 'video',\ 'image' => 'example_value',\ 'keep_original_sound' => false,\ 'model' => 'kuaishou/kling-2.6-pro-motion-control',\ 'prompt' => 'example_value',\ 'video' => 'example_value'\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/video/generations" payload := strings.NewReader("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/video/generations") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/video/generations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"character_orientation\": \"video\",\n \"image\": \"example_value\",\n \"keep_original_sound\": false,\n \"model\": \"kuaishou/kling-2.6-pro-motion-control\",\n \"prompt\": \"example_value\",\n \"video\": \"example_value\"\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for video generation models [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-character-orientation) character\_orientation enum required Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). Available options: `video`, `image` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-model) model enum required Model name to use for the request Available options: `kuaishou/kling-2.6-pro-motion-control` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-video) video string required Input video URL [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#body-keep-original-sound) keep\_original\_sound boolean Whether to keep the original sound in video generation #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/kling-2.6-pro-motion-control#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-niji-6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-niji-6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-niji-6-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '0.5', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-niji-6-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '0.5',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-niji-6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": false, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": false, "weird": 0 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "chaos": 0, "model": "midjourney/midjourney-niji-6-t2i", "negative_prompt": "example_value", "prompt": "example_value", "quality": "0.5", "raw": False, "seed": -1, "style_reference": "example_value", "style_weight": 100, "stylize": 100, "tile": False, "weird": 0 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', chaos: 0, model: 'midjourney/midjourney-niji-6-t2i', negative_prompt: 'example_value', prompt: 'example_value', quality: '0.5', raw: false, seed: -1, style_reference: 'example_value', style_weight: 100, stylize: 100, tile: false, weird: 0 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'chaos' => 0,\ 'model' => 'midjourney/midjourney-niji-6-t2i',\ 'negative_prompt' => 'example_value',\ 'prompt' => 'example_value',\ 'quality' => '0.5',\ 'raw' => false,\ 'seed' => -1,\ 'style_reference' => 'example_value',\ 'style_weight' => 100,\ 'stylize' => 100,\ 'tile' => false,\ 'weird' => 0\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"chaos\": 0,\n \"model\": \"midjourney/midjourney-niji-6-t2i\",\n \"negative_prompt\": \"example_value\",\n \"prompt\": \"example_value\",\n \"quality\": \"0.5\",\n \"raw\": false,\n \"seed\": -1,\n \"style_reference\": \"example_value\",\n \"style_weight\": 100,\n \"stylize\": 100,\n \"tile\": false,\n \"weird\": 0\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `3:2`, `2:3` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-model) model enum required Model name to use for the request Available options: `midjourney/midjourney-niji-6-t2i` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-chaos) chaos integer Chaos parameter: influences variation in initial image grids (0-100) Required range: `0 <= x <= 100` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-negative-prompt) negative\_prompt string Negative prompt to specify what should not appear in the generation [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-quality) quality enum Quality option Available options: `0.5`, `1`, `2` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-raw) raw boolean Raw mode: reduces Midjourney's default aesthetic processing [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-style-reference) style\_reference string Style reference for generation, can be an image URL, a numeric value, or "random" [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-style-weight) style\_weight number default:100 Weight of the style reference (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-stylize) stylize integer default:100 Stylize parameter: how strongly Midjourney's aesthetic is applied (0-1000) Required range: `0 <= x <= 1000` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-tile) tile boolean Tile mode: generates images that can be used as repeating tiles [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#body-weird) weird integer Weird parameter: introduces unusual aesthetics to generated images (0-3000) Required range: `0 <= x <= 3000` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/midjourney-niji-6-t2i#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 16384, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.6v-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 16384, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.6v-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 16384, messages: [{content: 'example_value', role: 'system'}], model: 'z-ai/glm-4.6v-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 16384,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'z-ai/glm-4.6v-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 16384, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.6v-flash", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 16384, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.6v-flash", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 16384, messages: [{content: 'example_value', role: 'system'}], model: 'z-ai/glm-4.6v-flash', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 16384,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'z-ai/glm-4.6v-flash',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 16384,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.6v-flash\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-model) model enum required Model name to use for the request Available options: `z-ai/glm-4.6v-flash` [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-max-tokens) max\_tokens integer default:16384 Maximum number of tokens to generate Required range: `1 <= x <= 16384` [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.6v-flash#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/glm-4.7#content-area) Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 131072, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.7", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 131072, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.7", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 131072, messages: [{content: 'example_value', role: 'system'}], model: 'z-ai/glm-4.7', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 131072,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'z-ai/glm-4.7',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } POST / v1 / chat / completions Try it Create chat completion cURL curl --request POST \ --url https://api.siray.ai/v1/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "frequency_penalty": 0, "max_tokens": 131072, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.7", "presence_penalty": 0, "stream": false, "temperature": 1, "top_p": 1 } ' import requests url = "https://api.siray.ai/v1/chat/completions" payload = { "frequency_penalty": 0, "max_tokens": 131072, "messages": [\ {\ "content": "example_value",\ "role": "system"\ }\ ], "model": "z-ai/glm-4.7", "presence_penalty": 0, "stream": False, "temperature": 1, "top_p": 1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ frequency_penalty: 0, max_tokens: 131072, messages: [{content: 'example_value', role: 'system'}], model: 'z-ai/glm-4.7', presence_penalty: 0, stream: false, temperature: 1, top_p: 1 }) }; fetch('https://api.siray.ai/v1/chat/completions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/chat/completions",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'frequency_penalty' => 0,\ 'max_tokens' => 131072,\ 'messages' => [\ [\ 'content' => 'example_value',\ 'role' => 'system'\ ]\ ],\ 'model' => 'z-ai/glm-4.7',\ 'presence_penalty' => 0,\ 'stream' => false,\ 'temperature' => 1,\ 'top_p' => 1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/chat/completions" payload := strings.NewReader("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/chat/completions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/chat/completions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"frequency_penalty\": 0,\n \"max_tokens\": 131072,\n \"messages\": [\n {\n \"content\": \"example_value\",\n \"role\": \"system\"\n }\n ],\n \"model\": \"z-ai/glm-4.7\",\n \"presence_penalty\": 0,\n \"stream\": false,\n \"temperature\": 1,\n \"top_p\": 1\n}" response = http.request(request) puts response.read_body 200 { "choices": [\ {\ "index": 123,\ "delta": {\ "content": "",\ "reasoning": "",\ "reasoning_content": "",\ "role": "system",\ "tool_calls": [\ {\ "function": {\ "arguments": "",\ "description": "",\ "name": "",\ "parameters": ""\ },\ "id": "",\ "index": 123,\ "type": ""\ }\ ]\ },\ "finish_reason": "stop",\ "logprobs": ""\ }\ ], "created": 123, "id": "", "model": "", "object": "", "system_fingerprint": "", "usage": { "completion_tokens": 123, "completion_tokens_details": { "audio_tokens": 123, "reasoning_tokens": 123, "text_tokens": 123 }, "input_tokens": 123, "output_tokens": 123, "prompt_tokens": 123, "prompt_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "total_tokens": 123, "input_tokens_details": { "audio_tokens": 123, "cached_tokens": 123, "image_tokens": 123, "text_tokens": 123, "cache_write_tokens": 123 }, "prompt_cache_hit_tokens": 123 } } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload OpenAI-compatible chat completions API request format [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-messages) messages object\[\] required Array of conversation messages with roles Minimum array length: `1` Show child attributes [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-model) model enum required Model name to use for the request Available options: `z-ai/glm-4.7` [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-frequency-penalty) frequency\_penalty number default:0 Penalty for frequent tokens Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-max-tokens) max\_tokens integer default:131072 Maximum number of tokens to generate Required range: `1 <= x <= 131072` [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-presence-penalty) presence\_penalty number default:0 Penalty for new topics Required range: `-2 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-stream) stream boolean default:false Enable streaming response [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-temperature) temperature number default:1 Controls randomness in output (higher = more random) Required range: `0 <= x <= 2` [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#body-top-p) top\_p number default:1 Nucleus sampling parameter (controls diversity) Required range: `0 <= x <= 1` #### Response 200 - application/json Successful response Chat completion response [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-choices) choices object\[\] required Show child attributes [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-created) created integer required Unix timestamp of when the completion was created [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-id) id string required Unique identifier for the chat completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-model) model string required The model used for the completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-object) object string required Object type, typically 'chat.completion.chunk' [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-system-fingerprint) system\_fingerprint string System fingerprint for the completion [​](https://docs.siray.ai/api-reference/model-api/glm-4.7#response-usage-one-of-0) usage object | null Token usage information Show child attributes --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-pro", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-pro", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-kontext-t2i-pro', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-kontext-t2i-pro',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-pro", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "1:1", "model": "black-forest-labs/flux-kontext-t2i-pro", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: '1:1', model: 'black-forest-labs/flux-kontext-t2i-pro', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => '1:1',\ 'model' => 'black-forest-labs/flux-kontext-t2i-pro',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"1:1\",\n \"model\": \"black-forest-labs/flux-kontext-t2i-pro\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4`, `21:9`, `9:21`, `2:1`, `1:2` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-kontext-t2i-pro` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-t2i-pro#response-fail-code) fail\_code string Failure code if the task submission did not succeed --- # Siray AI API Docs | OpenAI Compatible API > Documentation Index > ------------------- > > Fetch the complete documentation index at: [/llms.txt](https://docs.siray.ai/llms.txt) > > Use this file to discover all available pages before exploring further. [Skip to main content](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#content-area) Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-max", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-max", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'match_input_image', image: 'example_value', model: 'black-forest-labs/flux-kontext-i2i-max', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'match_input_image',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-kontext-i2i-max',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } POST / v1 / images / generations / async Try it Generate image cURL curl --request POST \ --url https://api.siray.ai/v1/images/generations/async \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-max", "prompt": "example_value", "seed": -1 } ' import requests url = "https://api.siray.ai/v1/images/generations/async" payload = { "aspect_ratio": "match_input_image", "image": "example_value", "model": "black-forest-labs/flux-kontext-i2i-max", "prompt": "example_value", "seed": -1 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: JSON.stringify({ aspect_ratio: 'match_input_image', image: 'example_value', model: 'black-forest-labs/flux-kontext-i2i-max', prompt: 'example_value', seed: -1 }) }; fetch('https://api.siray.ai/v1/images/generations/async', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err)); "https://api.siray.ai/v1/images/generations/async",\ CURLOPT_RETURNTRANSFER => true,\ CURLOPT_ENCODING => "",\ CURLOPT_MAXREDIRS => 10,\ CURLOPT_TIMEOUT => 30,\ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\ CURLOPT_CUSTOMREQUEST => "POST",\ CURLOPT_POSTFIELDS => json_encode([\ 'aspect_ratio' => 'match_input_image',\ 'image' => 'example_value',\ 'model' => 'black-forest-labs/flux-kontext-i2i-max',\ 'prompt' => 'example_value',\ 'seed' => -1\ ]),\ CURLOPT_HTTPHEADER => [\ "Authorization: Bearer ",\ "Content-Type: application/json"\ ],\ ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.siray.ai/v1/images/generations/async" payload := strings.NewReader("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } HttpResponse response = Unirest.post("https://api.siray.ai/v1/images/generations/async") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}") .asString(); require 'uri' require 'net/http' url = URI("https://api.siray.ai/v1/images/generations/async") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"aspect_ratio\": \"match_input_image\",\n \"image\": \"example_value\",\n \"model\": \"black-forest-labs/flux-kontext-i2i-max\",\n \"prompt\": \"example_value\",\n \"seed\": -1\n}" response = http.request(request) puts response.read_body 200 { "code": "success", "data": { "task_id": "" }, "message": "", "fail_code": "" } #### Authorizations [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#authorization-authorization) Authorization string header required Bearer authentication using API key #### Body application/json Request payload Request format for image generation models [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#body-aspect-ratio) aspect\_ratio enum required Aspect ratio Available options: `match_input_image`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4`, `21:9`, `9:21`, `2:1`, `1:2` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#body-image) image string required Input image for generation, it can be data URL or image URL [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#body-model) model enum required Model name to use for the request Available options: `black-forest-labs/flux-kontext-i2i-max` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#body-prompt) prompt string required Text prompt for generation [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#body-seed) seed integer Random seed for generation Required range: `-1 <= x <= 9999999999` #### Response 200 - application/json Successful response Standard async task creation response [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#response-code) code string required Status code returned by the service Example: `"success"` [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#response-data) data object required Response payload containing task details Show child attributes [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#response-message) message string required Additional information about the request result [​](https://docs.siray.ai/api-reference/model-api/flux-kontext-i2i-max#response-fail-code) fail\_code string Failure code if the task submission did not succeed ---