The Generation APIs are time and resource consuming, so we designed them to be asynchronous. This means that you submit a task without getting the result immediately.
Please refrain from calling this API too frequently as it may incur some addtional stress to our servers. We may throttle some requests that are sent too frequently.
Instead, your program can then periodically check the status of the task you submitted by supplying the API endpoint the task subscription key you got from your Generation API call. Once this API tell you that your task has finished, you can safely use the Download API to get a list of URLs from where you can download the result models of your task submitted.
The following table lists the possible values from the API call in the status field and the semantics of them.
Pricing
We do not charge any addtional credits for calling this API to check the status of your task.
Request
Authentication
This API uses bearer key for authentication. You need to include a valid token in the Authorization header for all requests. Refer to the Quickstart section for how to generate an API key for your account.
Authorization: Bearer RODIN_API_KEY
Body
The API takes one parameter in the POST request body.
import requests# ConstantsENDPOINT ="https://hyperhuman.deemos.com/api/v2/status"API_KEY ="your api key"# Replace with your actual API keySUBSCRIPTION_KEY ="your-subscription-key"# Replace with your actual subscription key# Prepare the headersheaders ={'accept':'application/json','Content-Type':'application/json','Authorization':f'Bearer {API_KEY}',}# Prepare the JSON payloaddata ={"subscription_key": SUBSCRIPTION_KEY}# Make the POST requestresponse = requests.post(ENDPOINT, headers=headers, json=data)# Parse and return the JSON responseprint(response.json())
packagemainimport ("bytes""encoding/json""fmt""net/http")const BaseURI ="https://hyperhuman.deemos.com/api"typeCommonErrorstruct { Error *string`json:"error,omitempty"`}typeApiTaskStatusPairstruct { Uuid string`json:"uuid"` Status string`json:"status"`}typeApiStatusResponsestruct {CommonError Jobs []ApiTaskStatusPair`json:"jobs"`}funcCheckStatus(token string, subscriptionKey string) (*ApiStatusResponse, error) { payload :=map[string]string{"subscription_key": subscriptionKey} jsonData, err := json.Marshal(payload)if err !=nil {returnnil, err } req, err := http.NewRequest("POST", fmt.Sprintf("%s/v2/status", BaseURI), bytes.NewBuffer(jsonData))if err !=nil {returnnil, err } req.Header.Set("Authorization", "Bearer "+token) req.Header.Set("Content-Type", "application/json") resp, err := http.DefaultClient.Do(req)if err !=nil {returnnil, err }defer resp.Body.Close()var responseData ApiStatusResponse err = json.NewDecoder(resp.Body).Decode(&responseData)if err !=nil {returnnil, err }if responseData.Error !=nil {returnnil, fmt.Errorf("error: %s", *responseData.Error) }return&responseData, nil}funcmain() {// 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)}