Skip to content

Silico Grove API Integration Guide ​

Integrate text, image, video, and audio capabilities through the endpoint matching each feature. Preserve request field names exactly.

ItemValue
Primary Base URLhttps://ai.silicogrove.com/v1
Backup Base URLhttps://api.silicogrove.com/v1 when the primary domain is unavailable
AuthenticationAuthorization: Bearer YOUR_API_KEY
JSON requestsContent-Type: application/json
File uploadsmultipart/form-data

Start with Quick start, then confirm access in Models and access.

Quick Start ​

Follow the steps from creating an API key to making your first request.

  1. Create and securely store an API key in the console.
  2. List the models available to that key.
  3. Send requests to the matching capability endpoint.

Do not duplicate the Base URL

The OpenAI SDK base_url includes /v1. Do not append /v1 again when composing complete endpoint URLs. The backup address requires client-side failover configuration.

List available models ​

bash
curl -X GET "https://ai.silicogrove.com/v1/models" \
  -H "Authorization: Bearer YOUR_API_KEY"

Minimal text request ​

bash
curl -X POST "https://ai.silicogrove.com/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4-mini","messages":[{"role":"user","content":"Hello, reply in one sentence."}]}'

Python OpenAI SDK ​

python
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://ai.silicogrove.com/v1")
response = client.chat.completions.create(
    model="gpt-5.4-mini",
    messages=[{"role": "user", "content": "Hello, reply in one sentence."}],
)
print(response.choices[0].message.content)

Models and Access ​

Check available models before calling an API to confirm access for your account and key.

Available models depend on your account, group, and API key permissions. Treat GET /v1/models as the source of truth.

CapabilityTypical modelsEndpoint
Textgpt-5.4-mini, Claude, Gemini/v1/chat/completions
Imagesgpt-image-2, Gemini image models, grok-imagine-imageRecommended async /v1/images/tasks; sync /v1/images/generations
VideoRecommended: grok-video-1.5 (only 6, 8, 10, 12, or 15 seconds), kling-video-v3, video-ds-2.0, as-sd2.0-fast; grok-imagine-video, grok-imagine-video-1.5 (currently unavailable)/v1/videos
AudioCheck the returned model list/v1/audio/*

Text ​

Send text or supported multimodal content through the chat API to receive model responses.

Chat Completions ​

bash
curl -X POST "https://ai.silicogrove.com/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4-mini","messages":[{"role":"system","content":"You are a concise assistant."},{"role":"user","content":"Write a product introduction."}],"stream":false}'

Responses API ​

bash
curl -X POST "https://ai.silicogrove.com/v1/responses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4-mini","input":"Introduce yourself in one sentence."}'

Image generation time varies, so asynchronous tasks suit API integrations: submit first, then query for the result.

Use asynchronous tasks to generate and edit images. Submit a task, receive its ID, then query for the result without holding a synchronous request open.

GoalComplete workflow
Edit a local imageUpload reference → Submit task → Poll task
Generate from textSubmit task → Poll task

Each code block is an independent curl command. Replace its placeholders and paste it directly into a terminal; no variable setup is needed. Replace YOUR_API_KEY in every command with your API key.

Editing: Upload reference → Submit task → Poll task ​

Step 1: Upload two local reference images separately ​

Use the first image for the subject and the second for the background. Replace each file path with a real file on your computer.

Upload the subject image:

bash
curl --request POST \
  'https://ai.silicogrove.com/pg/assets' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --form 'kind=image' \
  --form 'file=@/path/to/subject.jpg'

Upload the background image:

bash
curl --request POST \
  'https://ai.silicogrove.com/pg/assets' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --form 'kind=image' \
  --form 'file=@/path/to/background.jpg'

Each upload returns its own data.url. Replace YOUR_SUBJECT_IMAGE_URL in the JSON below with the subject upload URL and YOUR_BACKGROUND_IMAGE_URL with the background upload URL. If either upload fails, resolve the error before submitting.

Step 2: Submit the editing task ​

bash
curl --request POST \
  'https://ai.silicogrove.com/v1/images/tasks' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "gpt-image-2",
  "prompt": "Keep the subject from the first reference image and place it naturally into the background from the second reference image, matching lighting, perspective, and shadows",
  "images": [
    {"image_url": "YOUR_SUBJECT_IMAGE_URL"},
    {"image_url": "YOUR_BACKGROUND_IMAGE_URL"}
  ],
  "size": "1024x1024",
  "quality": "high",
  "n": 1
}'

A successful submission returns HTTP 202. Copy its id. This means the task was accepted; the image is not ready yet.

The first images item is the subject and the second is the background, matching the prompt. n: 1 requests one output image; it does not limit the reference count to one. For a single reference, upload one file and keep only the first array item. Upload and append further references the same way, up to 10.

Step 3: Poll the editing task ​

Replace YOUR_TASK_ID in the URL with the complete id returned by Step 2:

bash
curl --request GET \
  'https://ai.silicogrove.com/v1/images/tasks/YOUR_TASK_ID' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Repeat the query every 2 to 5 seconds. Keep waiting for queued / processing; stop on completed and download the images from data[].url, or stop on failed and read error.message. On an HTTP error, inspect the response instead of automatically resubmitting a generation task.

Text-to-image: Submit task → Poll task ​

Step 1: Submit the generation task ​

Send the prompt and generation parameters. Omit images; do not send images: [], image, or mask.

bash
curl --request POST \
  'https://ai.silicogrove.com/v1/images/tasks' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "model": "gpt-image-2",
    "prompt": "A cat sitting by a window, realistic photography",
    "size": "1024x1024",
    "quality": "high",
    "n": 1
  }'

Step 2: Poll the generation task ​

Replace YOUR_TASK_ID in the URL with the complete id returned by this submission:

bash
curl --request GET \
  'https://ai.silicogrove.com/v1/images/tasks/YOUR_TASK_ID' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Repeat the query every 2 to 5 seconds. Keep waiting for queued / processing; stop on completed and download the images from data[].url, or stop on failed and read error.message. On an HTTP error, inspect the response instead of automatically resubmitting a generation task.

Request parameters ​

Common headers ​

ParameterTypeRequiredDescription
AuthorizationstringYesBearer YOUR_API_KEY. Required for upload, submission, and retrieval. Only the task owner can retrieve the task.
Content-TypestringFor JSON submissionUse application/json to submit JSON. For uploads, let curl -F generate multipart/form-data and its boundary. GET retrieval needs no Content-Type header.

Upload reference: POST /pg/assets ​

Use a multipart form. Upload one image per request; upload multiple references separately.

ParameterTypeRequiredValues or limitsDescription
kindstringYesimageIdentifies the upload as an image reference.
filefileYesJPEG, PNG, WebP; nonempty, up to 10 MiBA local image file. Use curl --form 'file=@/local/path/image.jpg', then read data.url from the successful response.

Submit task: POST /v1/images/tasks ​

These parameters apply to the JSON workflows above. Supported sizes, quality levels, and advanced options vary by model; do not send every optional parameter by default.

ParameterTypeRequiredValues or limitsDescription
modelstringYesAvailable via GET /v1/modelsThe image model, such as gpt-image-2.
promptstringYesNonempty textGeneration or editing instructions. For multiple images, describe the role of each reference in array order.
imagesobject[]For editing1 to 10 itemsReference images. Omit this field entirely for text-to-image; do not send an empty array. Reference count is independent of output count n.
images[].image_urlstringIn every itemUse the upload response's data.urlReference image URL. Each object must contain only this field. The API also accepts a complete image data URL; this workflow consistently uploads local files first.
nintegerNoDefaults to 1; explicitly send 1 to 10Requested output image count. Use 1 for Gemini image models; other models may impose a smaller limit.
sizestringNoFor example 1024x1024, 1536x1024, 1024x1536Output size. Supported values and omission behavior depend on the model. Examples explicitly use 1024x1024.
qualitystringNoFor example auto, low, medium, high; Gemini supports 1k, 2k, 4kOutput quality or resolution tier, depending on the model. Examples use high; models do not necessarily support the same values.
streambooleanNoOmit or use falseRetrieve async results by polling; true is unsupported.
response_formatstringNoOmit for these workflowsMay affect the upstream response, but async tasks always return stored data[].url values, not base64 output.
backgroundstringNoCommonly auto, opaque, transparentBackground mode, supported only by some models.
output_formatstringNoCommonly png, jpeg, webpOutput image format, supported only by some models.
output_compressionintegerNoUsually 0 to 100JPEG/WebP compression quality, supported only by some models.
stylestringNoCommonly vivid, naturalImage style, supported only by some models.
moderationstringNoCommonly auto, lowModeration strength, supported only by some models.
input_fidelitystringNoCommonly low, highEditing reference fidelity, supported only by some models.
maskstringNoA mask reference supported by the modelSpecifies the editing area and requires reference images. Not needed for this two-image example. Unsupported for Gemini edits.

YOUR_API_KEY, YOUR_SUBJECT_IMAGE_URL, YOUR_BACKGROUND_IMAGE_URL, and YOUR_TASK_ID are placeholders to replace. Image URLs must come from Step 1 upload responses; task IDs must come from submission responses. Do not pass local file paths as images[].image_url.

Poll task: GET /v1/images/tasks/{task_id} ​

ParameterLocationTypeRequiredDescription
task_idURL pathstringYesThe id returned by submission, such as task_0123456789abcdef. Send no request body. Use the actual ID returned for this task.

Query every 2 to 5 seconds and stop on completed or failed. See “Task response reference” below for status, output, and error fields.

Parameters and limits ​

  • Available models depend on GET /v1/models. Examples use gpt-image-2; Gemini image models require n: 1. See image parameters.
  • R2 storage must be enabled. Omit stream or set it to false. Tasks become completed after results are stored; provider or storage failures refund the reserved quota.
  • Upload JPEG, PNG, or WebP images, up to 10 MiB each. JSON edits use images[].image_url, not a standalone image, string arrays, or extra object fields. Gemini edits do not support mask.
  • Uploaded references and output URLs are temporary. Download results promptly. See reference assets for upload details.

Task response reference ​

Submission response ​

A successful submission returns HTTP 202 Accepted:

json
{
  "id": "task_0123456789abcdef",
  "object": "image.task",
  "status": "queued",
  "progress": "0%",
  "created_at": 1786192453,
  "started_at": 0,
  "completed_at": 0
}

Retrieve and poll ​

bash
curl "https://ai.silicogrove.com/v1/images/tasks/task_0123456789abcdef" \
  -H "Authorization: Bearer YOUR_API_KEY"

Only the user who created a task can retrieve it. Poll every 2 to 5 seconds; avoid high-frequency concurrent polling.

FieldTypePresent whenDescription
idstringAlwaysPublic task ID in task_... format.
objectstringAlwaysAlways image.task.
statusstringAlwaysqueued, processing, completed, or failed.
progressstringAlwaysPercentage string such as 0%, 10%, or 100%.
created_atintegerAlwaysTask submission Unix timestamp.
started_atintegerAlwaysExecution start Unix timestamp, or 0 before execution.
completed_atintegerAlwaysTerminal Unix timestamp, or 0 before completion.
createdintegerSuccessCreation timestamp from the image result.
dataarraySuccessImage results; read the output from data[].url.
error.messagestringFailureTask failure reason.
error.typestringFailureCurrently image_task_failed.
statusMeaningTerminal
queuedWaiting for a workerNo
processingCalling the provider or storing outputNo
completedFinished; data[].url is availableYes
failedFailed; inspect errorYes

Completed response:

json
{
  "id": "task_0123456789abcdef",
  "object": "image.task",
  "status": "completed",
  "progress": "100%",
  "created_at": 1786192453,
  "started_at": 1786192455,
  "completed_at": 1786192550,
  "created": 1786192548,
  "data": [{"url": "https://file.lunadownload.com/temporary/2026/08/12/uuid.png"}]
}

Failed response:

json
{
  "id": "task_0123456789abcdef",
  "object": "image.task",
  "status": "failed",
  "progress": "100%",
  "created_at": 1786192453,
  "started_at": 1786192455,
  "completed_at": 1786192550,
  "error": {"message": "upstream request failed", "type": "image_task_failed"}
}

Async HTTP status codes ​

StatusScenario
202Task created.
400Invalid parameters, multipart file, n, or stream.
403API key, quota, group, or model access denied.
404Task is absent, has a different type, or belongs to another user.
429Request or model concurrency limit reached.
503R2 storage required by async tasks is not configured or available.

Submission or retrieval failures that occur before a task response use this error envelope:

json
{
  "error": {
    "message": "R2 storage is required for asynchronous image tasks",
    "type": "storage_unavailable",
    "code": "storage_unavailable"
  }
}

There is currently no /v1/images/tasks/{task_id}/content endpoint. Download data[].url from the completed response directly.

Synchronous Images ​

Synchronous endpoints wait for images within a single request, for clients that need a synchronous response.

Start with async image tasks: upload → submit → poll for editing, or submit → poll for text-to-image. This section covers synchronous endpoints and the native Gemini protocol.

List models with your API key before use; its GET /v1/models response is the source of truth.

bash
curl "https://ai.silicogrove.com/v1/models" \
  -H "Authorization: Bearer YOUR_API_KEY"
ModelGenerateEditOpenAI image APINative Gemini API
gpt-image-2YesYesYesNo
gpt-image-2-allDepends on visibility in /v1/modelsDepends on upstreamYesNo
gemini-3-pro-imageYesYesYesYes
gemini-3.1-flash-imageYesYesYesYes
gemini-3-pro-image-previewYesYesYesYes
gemini-3.1-flash-image-previewYesYesYesYes
gemini-2.5-flash-imageYesYesYesYes
grok-imagine-image, grok-imagine-image-proDepends on visibility in /v1/modelsDepends on upstreamYesNo

Use https://ai.silicogrove.com as the primary Base URL and https://api.silicogrove.com as an explicit backup. All requests use Authorization: Bearer YOUR_API_KEY.

OpenAI-compatible generation ​

This interface works with gpt-image-2 and Gemini image models.

bash
curl "https://ai.silicogrove.com/v1/images/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A premium product poster, realistic photography, clean background",
    "size": "1024x1024",
    "quality": "high",
    "n": 1,
    "response_format": "url"
  }'

Gemini model example:

bash
curl "https://ai.silicogrove.com/v1/images/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image",
    "prompt": "A 16:9 neon city in the rain at night",
    "size": "1792x1024",
    "quality": "2k",
    "n": 1,
    "response_format": "url"
  }'

OpenAI-compatible editing ​

Use multipart form data. Do not set Content-Type manually; curl or your SDK must generate the multipart boundary.

bash
curl "https://ai.silicogrove.com/v1/images/edits" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=gpt-image-2" \
  -F "prompt=Keep the subject and change the background to a city at night" \
  -F "image=@/path/to/input.png" \
  -F "size=1024x1024" \
  -F "quality=high" \
  -F "n=1"

For Gemini, change model to gemini-3.1-flash-image and use quality=2k.

Supported input formats are PNG, JPG, JPEG, and WebP. The playground currently accepts up to 3 reference images per request, up to 10 MB each.

OpenAI image parameters ​

The gateway accepts the common fields below. Individual models may support only a subset; an upstream may ignore or reject unsupported values. Treat /v1/models and the model's actual response as authoritative.

FieldTypeRequiredCommon values or limitsDescription
modelstringYesFrom GET /v1/modelsImage model name.
promptstringYesNatural-language textGeneration or editing instruction.
nintegerNo1 to 10; default 1Number of images. Gemini image models require 1; other models may impose lower limits.
sizestringNoCommon: 1024x1024, 1536x1024, 1024x1536, 1792x1024, 1024x1792Size or aspect-ratio mapping is model-dependent. DALL-E models enforce narrower enums.
qualitystringNoCommon: auto, low, medium, high, standard, hd, 1k, 2k, 4kQuality or output-resolution tier. Upstream case sensitivity may differ.
response_formatstringNourl, b64_jsonDesired synchronous response. Async tasks always return a persisted URL.
backgroundstringNoauto, opaque, transparentBackground mode; model-dependent.
output_formatstringNopng, jpeg, webpOutput file format; model-dependent.
output_compressionintegerNoUsually 0 to 100JPEG/WebP compression quality; model-dependent.
stylestringNoCommon: vivid, naturalStyle option; model-dependent.
moderationstringNoCommon: auto, lowModeration level; model-dependent.
streambooleanNotrue, falseRequests a streamed synchronous response. Async tasks require false or omission.
image, image[]fileFor multipart editingPNG, JPEG, WebP; async tasks allow at most 10 images, with a per-file limit of 10 MBReference image. Use image[] for multiple images. Async multipart files are persisted before worker execution.
imagesobject arrayFor async JSON editingAt most 10 itemsEvery item must contain only image_url.
maskfile or model-supported JSON URL/valueNoUsually PNGEdit mask; model-dependent.
input_fidelitystringNoCommon: low, highReference-image fidelity; model-dependent.

With curl -F, do not set Content-Type manually. Send scalar multipart values such as n and output_compression as text form fields.

OpenAI-compatible response ​

When R2 upload succeeds, a URL is returned:

json
{"created":1786192453,"data":[{"url":"https://file.lunadownload.com/temporary/2026/08/12/uuid.png"}]}

If R2 is not configured or upload fails, the response contains b64_json instead:

json
{"created":1786192453,"data":[{"b64_json":"iVBORw0KGgo..."}]}
FieldTypeDescription
createdintegerImage creation timestamp returned by the provider.
dataarrayImage result list.
data[].urlstringR2 or provider image URL. The URL may be periodically removed.
data[].b64_jsonstringBase64 image, normally present only for synchronous requests when R2 rewriting is unavailable.
data[].revised_promptstringProvider-revised prompt; returned only by some models.

Temporary image URLs

Images returned through file.lunadownload.com are temporary and periodically removed. Download and store generated files promptly.

Native Gemini generation ​

This interface is only for Gemini image models. gpt-image-2 does not support it.

bash
curl "https://ai.silicogrove.com/v1beta/models/gemini-3.1-flash-image:generateContent" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role":"user","parts":[{"text":"Generate a 16:9 neon city in the rain at night"}]}],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {"aspectRatio":"16:9","imageSize":"2K"}
    }
  }'

Native Gemini editing ​

Gemini has no separate native editing endpoint. Send the reference image as inlineData to the same generateContent endpoint.

bash
IMAGE_B64=$(base64 < input.png | tr -d '\n')

curl "https://ai.silicogrove.com/v1beta/models/gemini-3.1-flash-image:generateContent" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"contents\":[{\"role\":\"user\",\"parts\":[
      {\"text\":\"Keep the subject and change the background to a city at night\"},
      {\"inlineData\":{\"mimeType\":\"image/png\",\"data\":\"${IMAGE_B64}\"}}
    ]}],
    \"generationConfig\":{\"responseModalities\":[\"TEXT\",\"IMAGE\"],\"imageConfig\":{\"aspectRatio\":\"1:1\",\"imageSize\":\"2K\"}}
  }"

When R2 upload succeeds, generated media appears as fileData.fileUri; otherwise Gemini returns the original inlineData base64 payload.

Parameter mapping for Gemini models ​

OpenAI image parameterNative Gemini field
promptcontents[].parts[].text
image filecontents[].parts[].inlineData
size: 1024x1024aspectRatio: 1:1
size: 1792x1024aspectRatio: 16:9
size: 1024x1792aspectRatio: 9:16
size: 1536x1024aspectRatio: 3:2
size: 1024x1536aspectRatio: 2:3
quality: auto, fast, or 1kimageSize: 1K
quality: high, hd, or 2kimageSize: 2K
quality: 4kimageSize: 4K

Gemini image models currently generate one image per request: set n to 1.

Prefer async image tasks. For clients requiring synchronous responses, use these OpenAI-compatible endpoints:

text
POST /v1/images/generations
POST /v1/images/edits

Use POST /v1beta/models/{model}:generateContent only when you need the complete Gemini request format, multimodal contents, or the Gemini SDK.

Video ​

Video generation takes time; submit a task and poll its status to retrieve the finished video.

Video generation is asynchronous. Submit to POST /v1/videos, retain the returned task ID, then poll GET /v1/videos/{task_id} until the task reaches a terminal state. Video models must not be sent to /v1/chat/completions.

Available models depend on the API key and group. Call GET /v1/models before presenting model choices to end users.

ModelDurationResolution
grok-video-1.515 seconds by default; 6, 8, 10, 12, or 15 seconds when specifiedOptional; 720p recommended

grok-video-1.5 supports text-to-video, a single reference image, and multiple reference images (up to 7). The three examples below use the same endpoint; add image_urls when reference images are needed.

WARNING

When seconds is omitted, the request generates a 15-second video by default. When specified, seconds must be the string "6", "8", "10", "12", or "15". Sending "4" or any other value returns: seconds must be one of: 6, 8, 10, 12, 15.

Other supported Kling V3 models ​

ModelDurationResolutionBilling
kling-video-v33-15 seconds720p, 1080p, 4kPer second and selected resolution
kling-video-v3-omni3-15 seconds720p, 1080p, 4kPer second and selected resolution
kling-video-v3-turbo3-15 seconds720p, 1080pPer second and selected resolution

Send resolution as a top-level field in Kling create requests. Do not use the image-generation quality field for video resolution. The effective price is determined when the task is submitted, so do not rely on a fixed documented amount.

Grok Video 1.5 examples ​

Every example uses POST /v1/videos, Authorization: Bearer YOUR_API_KEY, and Content-Type: application/json.

1. Text to video ​

bash
curl -X POST "https://ai.silicogrove.com/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-video-1.5",
    "prompt": "A cinematic sunrise over a futuristic coastal city, slow aerial camera movement",
    "seconds": "15",
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

2. One reference image ​

json
{
  "model": "grok-video-1.5",
  "prompt": "Rotate the product smoothly in soft studio lighting, as a clean premium commercial",
  "seconds": "10",
  "aspect_ratio": "9:16",
  "resolution": "720p",
  "image_urls": ["https://example.com/product.png"]
}

3. Multiple reference images ​

json
{
  "model": "grok-video-1.5",
  "prompt": "Create a coherent product showcase using these references, with cinematic camera movement and premium commercial lighting",
  "seconds": "15",
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "image_urls": [
    "https://example.com/product-front.png",
    "https://example.com/product-detail.png"
  ]
}

The response includes a public id or task_id. Store that value; do not use an upstream task ID obtained from another API response.

json
{
  "id": "task_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "object": "video",
  "status": "queued"
}

This example uses the recommended grok-video-1.5 model to create a 15-second text-to-video task. A successful create request returns an asynchronous task. Store task_id, then use Poll a task to retrieve progress and output.

json
{
  "id": "task_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "task_id": "task_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "object": "video.generation",
  "model": "grok-video-1.5",
  "status": "queued",
  "progress": 0,
  "created_at": 1786869597,
  "result": {}
}

Reference assets ​

Use public HTTPS URLs or complete data: URLs such as data:image/png;base64,.... Do not send a local file path or bare base64 bytes. Local files can be uploaded through Reference assets first.

image_urls is the preferred field. images is accepted for compatibility. Send only one of them. reference_images and input_reference: {"image_url":"..."} are also accepted for integrations that use those names; do not combine reference_images and input_reference in one request.

Request fields ​

FieldRequiredDescription
modelYesA video model available to the API key.
promptYesDescribe the subject, motion, camera, visual style, and composition.
secondsNoRequested duration as a string. When omitted, grok-video-1.5 defaults to 15 seconds. When specified, it accepts only "6", "8", "10", "12", or "15".
aspect_ratioNo16:9, 9:16, or 1:1.
resolutionRequired for Kling V3; optional for Grok720p is recommended for Grok. Kling supports 480p, 720p, 1080p, or 4k, subject to the selected model. Send it as a top-level field; do not use quality as a replacement.
image_urlsNoPreferred array of up to 7 reference image URLs or complete data URLs.
imagesNoCompatibility alias for image_urls; do not send both.
imageNogrok-imagine-video-1.5 first-frame mode only. A single image URL or complete data URL. Do not combine with reference_images.
reference_imagesNoCompatibility array of reference images; do not combine with input_reference.
input_referenceNoCompatibility single-image form: { "image_url": "https://..." }.

The older video-ds-* models support images, videos, and audios. Their media limits are 4 images, 3 videos, and 1 audio file.

Poll a task ​

bash
curl -X GET "https://ai.silicogrove.com/v1/videos/TASK_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Treat queued and in_progress as non-terminal. completed means the video is available; failed means generation ended unsuccessfully. Poll no more frequently than once every 5 seconds, and retain the task ID if a client-side timeout is reached.

Download the completed video ​

bash
curl -L "https://ai.silicogrove.com/v1/videos/TASK_ID/content" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output result.mp4

The service may return a signed result URL internally. It is temporary and should be downloaded promptly. Use the content endpoint above rather than reconstructing an upstream URL, task ID, domain, or signature.

Security and reliability recommendations ​

API keys and callers ​

  • Store API keys only in server-side environment variables or a secrets manager. Browsers, mobile apps, and public frontend code must not hold long-lived keys.
  • Use separate API keys per application or purpose. A compromised key can then be revoked without interrupting unrelated workloads.
  • After creating a task, persist both your local business identifier and the returned task_id for polling, reconciliation, and retry control.

Reference assets and downloads ​

  • Reference URLs must be safely reachable by the video service. Do not provide private-network IP addresses, administrative endpoints, cloud credential URLs, or local file paths.
  • After completion, download videos through the authenticated /content endpoint rather than exposing temporary result URLs long term.
  • Create a replacement task only after the existing task explicitly returns failed. Continue polling the same task_id while it is queued or in_progress to prevent duplicate generations and charges.

Grok Imagine models (currently unavailable) ​

WARNING

grok-imagine-video and grok-imagine-video-1.5 are currently unavailable and must not be used for production requests. This section is retained as a historical parameter reference; use the active Kling models above.

ModelGeneration modesDurationResolution
grok-imagine-videoText to videoModel-dependentModel-dependent
grok-imagine-video-1.5Text to video, first-frame image to video, reference-image video4, 6, 8, 10, 12, or 15 secondsText and first-frame: 480p, 720p, 1080p; reference images: up to 720p

grok-imagine-video-1.5 has two mutually exclusive image modes: first-frame mode accepts one image URL; reference-image mode accepts 1-7 reference_images URLs and uses <IMAGE_1>, <IMAGE_2>, and similar placeholders in the prompt. Do not send image, images, image_urls, or input_reference with reference_images. Reference-image mode is limited to 720p.

Historical request example:

json
{
  "model": "grok-imagine-video-1.5",
  "prompt": "The person from <IMAGE_1> walks through a city street in a cinematic commercial shot",
  "reference_images": ["https://example.com/person.jpg"],
  "seconds": "8",
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

Reference Assets ​

Upload local images, videos, or audio as temporary assets for subsequent generation requests.

Upload local images, videos, and audio to the temporary asset endpoint. The returned data.url can be placed in a video request's images, videos, or audios array.

Temporary files are periodically removed

Uploaded assets and generated results are temporary. Their URLs may expire during periodic cleanup. Download and store required files promptly; do not treat returned URLs as permanent storage.

bash
# Image
curl -X POST "https://ai.silicogrove.com/pg/assets" -H "Authorization: Bearer YOUR_API_KEY" -F "kind=image" -F "file=@/path/to/ref.jpg"

# Video
curl -X POST "https://ai.silicogrove.com/pg/assets" -H "Authorization: Bearer YOUR_API_KEY" -F "kind=video" -F "file=@/path/to/ref.mp4"

# Audio
curl -X POST "https://ai.silicogrove.com/pg/assets" -H "Authorization: Bearer YOUR_API_KEY" -F "kind=audio" -F "file=@/path/to/ref.mp3"

Response example ​

json
{"success":true,"data":{"kind":"image","url":"https://file.lunadownload.com/temporary/2026/08/11/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.jpg","filename":"ref.jpg","content_type":"image/jpeg","size":123456}}
kindFormatsMaximum file size
imagejpg, png, webp10 MiB
videomp4, mov, webm100 MiB
audiomp3, m4a, wav, aac, ogg, webm20 MiB

Audio ​

Use the audio APIs to turn text into speech or transcribe recordings into text.

Speech synthesis ​

bash
curl -X POST "https://ai.silicogrove.com/v1/audio/speech" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_TTS_MODEL","input":"Welcome to Silico Grove API.","voice":"alloy","response_format":"mp3"}' \
  --output speech.mp3

Transcription and translation ​

bash
curl -X POST "https://ai.silicogrove.com/v1/audio/transcriptions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=YOUR_STT_MODEL" \
  -F "file=@/path/to/audio.mp3" \
  -F "response_format=json"

curl -X POST "https://ai.silicogrove.com/v1/audio/translations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=YOUR_STT_MODEL" \
  -F "file=@/path/to/audio.mp3" \
  -F "response_format=json"

Transcription and translation are multipart requests. The file field is file.

Troubleshooting ​

When a request fails, use its error symptoms to find the cause and corrective action.

SymptomLikely causeResolution
Model unavailableThe model and group do not match, or the key lacks permission.Call /v1/models with the same key to confirm the model name.
model is requiredA relay renamed the field.Preserve model; do not change it to model_name.
Video fails or enters a chat modelThe request was sent to a chat endpoint.Call POST /v1/videos.
Reference asset has no effectA local path was sent, or the value was not an array.Send public URLs in images, videos, or audios.
Invalid seconds typeThe duration was sent as a number.Use a string, such as "seconds": "15".
Upload failsWrong content type or file field name.Use -F and name the file field file.

When reporting an issue, include request time, model, endpoint, group, request ID, and the error response. Do not share API keys, authorization headers, or sensitive prompts.

Relay Integrations ​

When connecting through another gateway, configure the upstream address and preserve request fields as described below.

  • Use https://ai.silicogrove.com or https://ai.silicogrove.com/v1 as the primary upstream, depending on whether your relay adds /v1 automatically.
  • The backup upstream is https://api.silicogrove.com or https://api.silicogrove.com/v1; configure failover in the relay.
  • Synchronize /v1/models with a Silico Grove API key rather than entering unavailable models manually.
  • Video models must stay on /v1/videos; do not add them to a chat model pool.
  • Preserve the images, videos, and audios arrays when forwarding video requests.
  • Image editing and audio transcription are multipart requests; do not lose their file fields during forwarding.
  • Submit asynchronous images to POST /v1/images/tasks and poll GET /v1/images/tasks/{task_id}; do not wrap an asynchronous task as a synchronous image response.