curl --request GET \
--url https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status', 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.nugen.in/api/v3/benchmarks/{benchmark_id}/status",
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.nugen.in/api/v3/benchmarks/{benchmark_id}/status"
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.nugen.in/api/v3/benchmarks/{benchmark_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status")
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{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"status": "PROCESSING",
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T12:30:00Z",
"updated_at": "2024-01-15T10:32:45Z",
"progress": 123,
"eta_seconds": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Benchmark Status
Get the status of a benchmark generation run.
This endpoint retrieves the current status of a benchmark generation run. Use this to track the progress of benchmark generation initiated by the create endpoint.
Path Parameters:
benchmark_id: Unique identifier returned from the create endpoint
Returns:
benchmark_id: unique identifierstatus: status (PROCESSINGwhile running,READYwhen finished)created_at,completed_at,updated_at: timestampsprogress,eta_seconds: not wired up yet, always null
Raises:
404: If benchmark task not found or documents not found for the task
Example Request:
GET /api/v3/benchmarks/benchmark_01k4x9m2p7q3r6a1/status
Headers: {"Authorization": "Bearer <api_key>"}
Example Response:
{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"status": "READY",
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:32:45Z",
"updated_at": "2024-01-15T10:32:45Z",
"progress": null,
"eta_seconds": null
}
Notes:
- Status remains
PROCESSINGwhile the generation process is running - Status changes to
READYonce all questions are generated
curl --request GET \
--url https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status', 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.nugen.in/api/v3/benchmarks/{benchmark_id}/status",
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.nugen.in/api/v3/benchmarks/{benchmark_id}/status"
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.nugen.in/api/v3/benchmarks/{benchmark_id}/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/benchmarks/{benchmark_id}/status")
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{
"benchmark_id": "benchmark_01k4x9m2p7q3r6a1",
"status": "PROCESSING",
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T12:30:00Z",
"updated_at": "2024-01-15T10:32:45Z",
"progress": 123,
"eta_seconds": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Get the status of a benchmark generation run, including current progress and timestamps for creation and completion
Benchmark id
"benchmark_01k4x9m2p7q3r6a1"
Benchmark status
PROCESSING, READY, FAILED, DEPLOYING, EVALUATING, UNDEPLOYED, EVALUATED, STOPPED, QUEUED "PROCESSING"
Timestamp when the benchmark was created
"2024-01-15T10:30:00Z"
Timestamp when generation completed; null while still running
"2024-01-15T12:30:00Z"
Timestamp of the last status change
"2024-01-15T10:32:45Z"
Completion progress, 0.0 to 100.0. Not wired up yet, always null.
Estimated time remaining in seconds. Not wired up yet, always null.
Was this page helpful?