Skip to content
ACS Infra
Completionjobs

Get Completion Job Result

GET
/v1/completion-jobs/{job_id}/result

Return the answer of an ended job, with the status that POST /v1/completions gave it: 200 and the Completion, or the error object with its own status, such as 429 budget_exceeded or 502. A cancelled job answers 409 job_cancelled, and a job that the server failed to run answers 500 job_failed. While the job is queued or running, 202 with the job and Retry-After: 1. 30 days after the job ended, 410 job_result_expired.

Authorization

bearer
headerAuthorizationBearer <token>

An API key: Authorization: Bearer sk-acs-..., or a key of the old platform, acs-bm-.... A User makes and revokes keys in the App.

Path Parameters

job_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid

Response Body

The completion succeeded.

application/json
  1. response

The completion succeeded.

id*string
object*"text_completion"
Value in"text_completion"
created*integer
model*string
choices*array<>
usage*
activations?|null
Example Request
curl -X GET 'https://api.v2.infra.acsresearch.org/v1/completion-jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/result' \  -H 'Authorization: Bearer <API_KEY>'
Example Response
{  "id": "string",  "object": "text_completion",  "created": 0,  "model": "string",  "choices": [    {      "index": 0,      "text": "string",      "logprobs": {        "text_offset": [          0        ],        "token_logprobs": [          0        ],        "tokens": [          "string"        ],        "top_logprobs": [          {            "property1": 0,            "property2": 0          }        ]      },      "finish_reason": "string",      "stop_reason": "string",      "prompt_logprobs": [        {          "property1": {            "logprob": 0,            "rank": 0,            "decoded_token": "string"          },          "property2": {            "logprob": 0,            "rank": 0,            "decoded_token": "string"          }        }      ]    }  ],  "usage": {    "prompt_tokens": 0,    "completion_tokens": 0,    "total_tokens": 0  },  "activations": {    "residual_stream": {      "data": "string",      "dtype": "string",      "original_dtype": "string",      "shape": [        0      ],      "compression": "zstd"    }  }}