curl --request GET \
--url https://app.gc.ai/api/external/v1/jobs/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/jobs/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/jobs/{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://app.gc.ai/api/external/v1/jobs/{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: <api-key>"
],
]);
$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://app.gc.ai/api/external/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/jobs/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "chat/completions",
"result": {
"result": "When reviewing a software license agreement, key terms to examine include:\n\n1. **License Grant** - Understand the scope of rights granted...",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documents": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"signed_url": "<string>",
"download_url": "<string>",
"original_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_filename": "<string>"
}
],
"emails": [
{
"to": "<string>",
"subject": "<string>",
"body": "<string>",
"plaintext_body": "<string>",
"cc": "<string>",
"bcc": "<string>"
}
],
"diagrams": [
{
"title": "<string>",
"diagram_type": "<string>",
"mermaid": "<string>"
}
]
},
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "<string>",
"completed_at": "<string>"
}{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "chat/completions",
"result": {
"result": "When reviewing a software license agreement, key terms to examine include:\n\n1. **License Grant** - Understand the scope of rights granted...",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documents": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"signed_url": "<string>",
"download_url": "<string>",
"original_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_filename": "<string>"
}
],
"emails": [
{
"to": "<string>",
"subject": "<string>",
"body": "<string>",
"plaintext_body": "<string>",
"cc": "<string>",
"bcc": "<string>"
}
],
"diagrams": [
{
"title": "<string>",
"diagram_type": "<string>",
"mermaid": "<string>"
}
]
},
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "<string>",
"completed_at": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Get Async Job Status
Poll an async API job created by endpoints like POST /chat/completions.
Use the job_id returned by a 202 Accepted response to check whether the job is still pending or has reached a terminal state.
curl --request GET \
--url https://app.gc.ai/api/external/v1/jobs/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/jobs/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/jobs/{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://app.gc.ai/api/external/v1/jobs/{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: <api-key>"
],
]);
$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://app.gc.ai/api/external/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/jobs/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "chat/completions",
"result": {
"result": "When reviewing a software license agreement, key terms to examine include:\n\n1. **License Grant** - Understand the scope of rights granted...",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documents": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"signed_url": "<string>",
"download_url": "<string>",
"original_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_filename": "<string>"
}
],
"emails": [
{
"to": "<string>",
"subject": "<string>",
"body": "<string>",
"plaintext_body": "<string>",
"cc": "<string>",
"bcc": "<string>"
}
],
"diagrams": [
{
"title": "<string>",
"diagram_type": "<string>",
"mermaid": "<string>"
}
]
},
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "<string>",
"completed_at": "<string>"
}{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "chat/completions",
"result": {
"result": "When reviewing a software license agreement, key terms to examine include:\n\n1. **License Grant** - Understand the scope of rights granted...",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documents": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"signed_url": "<string>",
"download_url": "<string>",
"original_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"original_filename": "<string>"
}
],
"emails": [
{
"to": "<string>",
"subject": "<string>",
"body": "<string>",
"plaintext_body": "<string>",
"cc": "<string>",
"bcc": "<string>"
}
],
"diagrams": [
{
"title": "<string>",
"diagram_type": "<string>",
"mermaid": "<string>"
}
]
},
"error": {
"code": "<string>",
"message": "<string>"
},
"created_at": "<string>",
"completed_at": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Headers
Optional RFC 7240 wait preference, for example wait=0. If both this header and the wait query parameter are supplied, they must match.
"wait=0"
Path Parameters
The async job ID
Query Parameters
Optional long-poll wait time in seconds. Use 0 for fire-and-forget behavior. If both wait and Prefer: wait=... are supplied, they must match. Values above 90 are clamped.
x >= 00
Response
Job found and currently in a terminal state
Async job identifier
Stable job kind for this endpoint
chat/completions Current job status
pending, running, succeeded, failed, canceled Completion payload when the job has succeeded
Show child attributes
Show child attributes
Failure payload when the job has failed
Show child attributes
Show child attributes
ISO 8601 creation timestamp
ISO 8601 completion timestamp, or null when not terminal
Was this page helpful?