Check Status
Check the status of a task submitted to the API.
Status
Meaning
Request
Authentication
Body
Parameter
Type
Description
Response
Property
Type
Description
Examples
Last updated
Check the status of a task submitted to the API.
Last updated
POST /api/v2/status HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"subscription_key": "text"
}{
"error": "OK",
"jobs": [
{
"uuid": "text",
"status": "Waiting"
}
]
}Authorization: Bearer RODIN_API_KEYexport RODIN_API_KEY="your api key"
curl -X 'POST' \
'https://hyperhuman.deemos.com/api/v2/status' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"subscription_key": "your-subscription-key"
}'
unset RODIN_API_KEYimport requests
# Constants
ENDPOINT = "https://hyperhuman.deemos.com/api/v2/status"
API_KEY = "your api key" # Replace with your actual API key
SUBSCRIPTION_KEY = "your-subscription-key" # Replace with your actual subscription key
# Prepare the headers
headers = {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}',
}
# Prepare the JSON payload
data = {
"subscription_key": SUBSCRIPTION_KEY
}
# Make the POST request
response = requests.post(ENDPOINT, headers=headers, json=data)
# Parse and return the JSON response
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
const BaseURI = "https://hyperhuman.deemos.com/api"
type CommonError struct {
Error *string `json:"error,omitempty"`
}
type ApiTaskStatusPair struct {
Uuid string `json:"uuid"`
Status string `json:"status"`
}
type ApiStatusResponse struct {
CommonError
Jobs []ApiTaskStatusPair `json:"jobs"`
}
func CheckStatus(token string, subscriptionKey string) (*ApiStatusResponse, error) {
payload := map[string]string{"subscription_key": subscriptionKey}
jsonData, err := json.Marshal(payload)
if err != nil {
return nil, err
}
req, err := http.NewRequest("POST", fmt.Sprintf("%s/v2/status", BaseURI), bytes.NewBuffer(jsonData))
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
var responseData ApiStatusResponse
err = json.NewDecoder(resp.Body).Decode(&responseData)
if err != nil {
return nil, err
}
if responseData.Error != nil {
return nil, fmt.Errorf("error: %s", *responseData.Error)
}
return &responseData, nil
}
func main() {
// Replace with your actual API key
token := "your api key"
// Replace with your subscription key
resp, _ := CheckStatus(token, "your subscription key for a task")
fmt.Println(resp)
}{
"jobs": [
"123e4567-e89b-12d3-a456-426614174000": "Generating"
]
}