Query a task
Use the complete id returned by the creation request and the same API environment and API key.
Query GET /v1/inferences/{task_id}, not the generation task endpoint.
export SEEAPI_API_BASE_URL='https://api.seeapi.com'
export SEEAPI_API_KEY='YOUR_API_KEY'
export SEEAPI_TASK_ID='task_xxx'
curl --request GET "$SEEAPI_API_BASE_URL/v1/inferences/$SEEAPI_TASK_ID" \
--header "Authorization: Bearer $SEEAPI_API_KEY"
Query response — 200 OK
This completed response is based on an actual successful task with all seven categories checked. The task ID is a placeholder. Scores, token counts, and consumed credits are sample values for this task, not fixed values or a per-request price.
{
"id": "task_xxx",
"object": "inference",
"model": "text-nsfw-filter",
"endpoint": "text-moderation",
"provider": "seeapi",
"status": "succeeded",
"consumed_credits": 0.022,
"input_tokens": 1300,
"output_tokens": 129,
"result": {
"type": "json",
"data": {
"flagged": false,
"threshold": 0.5,
"categories": {
"hate": {
"score": 0.03,
"flagged": false
},
"violence": {
"score": 0.04,
"flagged": false
},
"self_harm": {
"score": 0.03,
"flagged": false
},
"harassment": {
"score": 0.04,
"flagged": false
},
"sexual_minors": {
"score": 0.03,
"flagged": false
},
"sexual_explicit": {
"score": 0.03,
"flagged": false
},
"sexual_suggestive": {
"score": 0.07,
"flagged": false
}
}
}
},
"error": null
}Response fields
status describes task execution. For queued or processing, query again with backoff. succeeded does not mean the content passed moderation.
result is the structured assessment. A null result is not a clean assessment.
result.data.flagged is the overall verdict for the selected categories and threshold. A flagged assessment is not a failed task.
result.data.threshold records the applied threshold. Lower values are stricter.
result.data.categories contains only the categories selected for this request. Each entry provides score and flagged. Unreturned categories must not be treated as checked or safe.
Display the returned verdicts without recomputing them. Results can contain errors and are not definitive safety determinations.
error contains task failure details when applicable; inspect code and message separately from the moderation verdict.
Credits and token usage
consumed_credits: SeeAPI credits consumed by this completed task. The example consumed 0.022 credits; this is not a fixed price for every request.
input_tokens: Input token usage reported for the task. The example reports 1300 input tokens. Tokens are not the same as characters.
output_tokens: Output token usage reported for the task. The example reports 129 output tokens.
These three fields are at the response top level, alongside status and result, not inside result.data. Use the returned values for usage display; do not infer token counts from text length or copy this example’s credit amount as a fixed charge.