POST
/
api
/
v1
/
inference
/
call
Get status of a specific request
curl --request POST \
  --url https://api.optexity.com/api/v1/inference/call \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "task_id": "<string>"
}'
{
  "success": true,
  "task_id": "<string>",
  "status": "running",
  "end_point": "<string>",
  "goal": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "result": "<string>",
  "progress": 50,
  "error": "<string>"
}

Get Status of a Specific Request

This endpoint allows you to check the status of a specific inference request using its task ID. You can use this to monitor the progress of running tasks or retrieve results of completed tasks.

Request Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key for authentication

Request Body

FieldTypeRequiredDescription
task_idstringYesThe unique identifier of the task to check

Example Request

curl -X POST /api/v1/inference/call \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task_id": "task_123456789"
  }'

Example Response

For a completed task:
{
  "success": true,
  "task_id": "task_123456789",
  "status": "completed",
  "end_point": "https://api.example.com/process",
  "goal": "Analyze customer feedback sentiment",
  "created_at": "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T10:32:15Z",
  "result": "Positive sentiment detected with 85% confidence",
  "execution_time": "2.25 seconds"
}
For a running task:
{
  "success": true,
  "task_id": "task_987654321",
  "status": "running",
  "end_point": "https://api.example.com/analyze",
  "goal": "Process document data",
  "created_at": "2024-01-15T11:00:00Z",
  "progress": 75,
  "estimated_completion": "2024-01-15T11:02:30Z"
}
For a failed task:
{
  "success": true,
  "task_id": "task_555666777",
  "status": "failed",
  "end_point": "https://api.example.com/process",
  "goal": "Analyze data",
  "created_at": "2024-01-15T09:00:00Z",
  "failed_at": "2024-01-15T09:01:30Z",
  "error": "Invalid input data format",
  "error_code": "INVALID_INPUT"
}

Error Responses

400 Bad Request
{
  "error": "Missing required field: task_id"
}
401 Unauthorized
{
  "error": "Invalid API key"
}
404 Not Found
{
  "error": "Task not found with ID: task_123456789"
}
500 Internal Server Error
{
  "error": "Failed to retrieve task status"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Response

200
application/json

Task status retrieved successfully

The response is of type object.