curl --request GET \
--url https://api.octen.ai/v1/grounded-generation/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.octen.ai/v1/grounded-generation/{generation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.octen.ai/v1/grounded-generation/{generation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.octen.ai/v1/grounded-generation/{generation_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 <token>"
],
]);
$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.octen.ai/v1/grounded-generation/{generation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.octen.ai/v1/grounded-generation/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octen.ai/v1/grounded-generation/{generation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "20260924021635985E9WHYPV4FI",
"generation_id": "mm-3ca3c4ff37c546b6b59f2e9cde09f2f6",
"modality": "image",
"status": "succeeded",
"output_url": "https://apt-multimodal-output.octen.ai/apt-multimodal-output/images%2F2026_09_24%2Fmm-3ca3c4ff37c546b6b59f2e9cde09f2f6.jpg?se=...&sig=...",
"references": [
{
"source_id": "source1",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg",
"title": "Cristiano Ronaldo - Wikipedia",
"cover_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:..."
}
],
"search_results": [
{
"query": "Cristiano Ronaldo",
"results": [
{
"type": "image",
"title": "Cristiano Ronaldo - Wikipedia",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg",
"source_page": "https://en.wikipedia.org/wiki/Cristiano_Ronaldo",
"description": "en.wikipedia.org",
"cover_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:..."
}
]
}
],
"created_at": 1790215572,
"updated_at": 1790215601,
"usage": {
"image_count": 1
}
}{
"code": 401,
"msg": "Invalid API Key",
"request_id": "req_abc123def456"
}{
"code": 404,
"msg": "Task not found or expired.",
"request_id": "req_abc123def456"
}{
"code": 429,
"msg": "Exceeding the rate limit",
"request_id": "req_abc123def456"
}{
"code": 500,
"msg": "Internal error",
"request_id": "req_abc123def456"
}Generation Result
Returns a grounded generation task by id.
curl --request GET \
--url https://api.octen.ai/v1/grounded-generation/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.octen.ai/v1/grounded-generation/{generation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.octen.ai/v1/grounded-generation/{generation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.octen.ai/v1/grounded-generation/{generation_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 <token>"
],
]);
$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.octen.ai/v1/grounded-generation/{generation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.octen.ai/v1/grounded-generation/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octen.ai/v1/grounded-generation/{generation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"request_id": "20260924021635985E9WHYPV4FI",
"generation_id": "mm-3ca3c4ff37c546b6b59f2e9cde09f2f6",
"modality": "image",
"status": "succeeded",
"output_url": "https://apt-multimodal-output.octen.ai/apt-multimodal-output/images%2F2026_09_24%2Fmm-3ca3c4ff37c546b6b59f2e9cde09f2f6.jpg?se=...&sig=...",
"references": [
{
"source_id": "source1",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg",
"title": "Cristiano Ronaldo - Wikipedia",
"cover_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:..."
}
],
"search_results": [
{
"query": "Cristiano Ronaldo",
"results": [
{
"type": "image",
"title": "Cristiano Ronaldo - Wikipedia",
"url": "https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg",
"source_page": "https://en.wikipedia.org/wiki/Cristiano_Ronaldo",
"description": "en.wikipedia.org",
"cover_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:..."
}
]
}
],
"created_at": 1790215572,
"updated_at": 1790215601,
"usage": {
"image_count": 1
}
}{
"code": 401,
"msg": "Invalid API Key",
"request_id": "req_abc123def456"
}{
"code": 404,
"msg": "Task not found or expired.",
"request_id": "req_abc123def456"
}{
"code": 429,
"msg": "Exceeding the rate limit",
"request_id": "req_abc123def456"
}{
"code": 500,
"msg": "Internal error",
"request_id": "req_abc123def456"
}Authorizations
Bearer token used for request authentication. Alternatively, you can send the API key in the x-api-key header. Note: A payment method is required to use the API.
Path Parameters
The task id returned by the Grounded Generation API.
Response
Successful grounded generation task response
Unique task id.
The type of output this task generates.
image, video Task state.
queued, running, succeeded, failed Unix timestamp in seconds when the task was created.
Unix timestamp in seconds when the task was last updated.
Unique identifier for the request.
Signed download URL for the output, present when status is succeeded. Requires no API key, and is valid for 7 days after the task was created.
The reference material used to generate the output.
Show child attributes
Show child attributes
The search results the references were selected from, grouped by query.
Show child attributes
Show child attributes
Failure reason, present when status is failed. Failed tasks are not billed.
Show child attributes
Show child attributes
Metering for the task. Present only when status is succeeded.
Show child attributes
Show child attributes
Was this page helpful?