Skip to content
ACS Infra
Completionjobs

Create Completion Job

POST
/v1/completion-jobs

Queue one completion to run on the server, also after your connection closes. The body is a body of POST /v1/completions that does not stream. The request is admitted first, as POST /v1/completions admits it: a model that the API does not serve answers 400 model_not_found, a value that admission refuses answers 400, and if the token budget cannot hold it, 429 budget_exceeded; nothing is queued. Send an Idempotency-Key so that a retry gets the same job: the same key with another request answers 409 idempotency_conflict.

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.

Header Parameters

idempotency-key?string

A key of your choice, 1 to 255 characters, such as a UUID. A retry with the same key and the same request does the work once: it gets the first answer, and is never charged twice. Kept 24 hours, one set for each User across all their API keys.

Length1 <= length <= 255

Request Body

application/json
  1. body
model*string

The Base model: an id from GET /v1/models, such as llama-8b.

Match^[^\u0000]*$
prompt*|array<integer>|array<>|array<array<integer>>

Text or a list of token ids, or a list of several such prompts. Each prompt gets n choices: choice i of prompt p has the index p * n + i.

max_tokens?integer

Generate at most this many tokens for each choice. A request generates at most 32000 tokens in all: the number of prompts × n × max_tokens.

Rangevalue <= 32000
temperature?number

Sample less likely tokens more often; 0 takes the most likely token each time. From 0 to 2, as vLLM takes it.

Range0 <= value <= 2
n?integer

How many choices to generate for each prompt; at most 128 in all.

Rangevalue <= 128
echo?boolean

Put the prompt before the generated text.

logprobs?|

Return the log probabilities of this many top tokens; at most 100.

Range0 <= value <= 100
prompt_logprobs?|

vLLM: log probabilities of the prompt tokens, and of this many top tokens at each, at most 100, and 33554432 in all: prompt tokens × n × (this + 1), and logprobs + 1 more with echo. -1 for the whole vocabulary, for at most 256 prompt tokens in all × n (16 with output_residual_stream). The API counts a text's tokens with the model's tokenizer, as Inference does, and token ids exactly. Not with stream: true.

Range-1 <= value <= 100
top_p?number

Sample from the most likely tokens up to this probability; more than 0 and at most 1, as OpenAI and vLLM take it.

Range0 < value <= 1
top_k?integer

vLLM: sample from this many most likely tokens; 0 or -1 for all.

Range-1 <= value
min_p?number

vLLM: leave out tokens less likely than this fraction of the most likely; from 0 to 1.

Range0 <= value <= 1
presence_penalty?number

Make a token that is already in the text less likely; from -2 to 2.

Range-2 <= value <= 2
frequency_penalty?number

Make a token less likely each time it is already in the text; from -2 to 2.

Range-2 <= value <= 2
repetition_penalty?number

vLLM: divide the scores of repeated tokens by this, more than 0; 1 for none.

Range0 < value
seed?|

From 0. The same seed samples the same tokens; vLLM can still change one now and then when it batches requests.

Range0 <= value
stop?|array<>|

Stop before any of these texts; at most 4.

stream?false

A completion job is never streamed.

Value infalse
stream_options?|

Only with stream: true.

priority?|||

vLLM: a lower number runs first, from 0. Requests of equal priority wait in order of arrival. null is 0; a text of digits and true or false count as their number.

user?|

Your id for the person who asked.

Match^[^\u0000]*$
add_special_tokens?boolean

vLLM: add the model's special tokens, such as BOS, to text.

output_residual_stream?|||array<>

vllm-lens: return the residual stream at these layers, in any order, each once, or true for every layer of the model, or false for none. Layer 0 is the first, and the last is capabilities.n_layers - 1 in GET /v1/models. A capture is at most 33554432 numbers (64 MiB as bfloat16): layers × tokens × the model's hidden size, where the tokens are the prompt's (as the model's tokenizer counts them) and max_tokens. So layers × tokens is at most 8192 for llama-8b (hidden size 4096), 2048 for llama-405b (hidden size 16384), 10922 for trinity-truebase (hidden size 3072); a model that the catalogue does not have counts as its largest hidden size, 16384.

apply_steering_vectors?array<>|

vllm-lens: add these vectors to the residual stream. At most 8 vectors, and 2097152 numbers in all (8 MiB as float32): layers × positions × the model's hidden size.

Response Body

The Idempotency-Key and the request came before: the job they made, as it is now.

application/json
  1. response

The Idempotency-Key and the request came before: the job they made, as it is now.

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
request_id*string

The id to send when you report a problem with this job.

model*string
status*string

queued and running until the job ends. Then succeeded when its completion answered 200, failed when it answered an error, or cancelled.

Value in"queued""running""succeeded""failed""cancelled"
cancel_requested*boolean

Whether the job was cancelled.

created_at*string

An ISO 8601 time in UTC, such as 2026-11-03T09:30:00.123+00:00.

started_at*|

When the job started to run. null until it starts.

finished_at*|

When the job ended. null until it ends.

expires_at*|

When the result of the ended job expires: 30 days after it ended. null until it ends.

result_expired*boolean
status_url*string

The path of GET /v1/completion-jobs/{job_id} for this job.

result_url*string

The path of GET /v1/completion-jobs/{job_id}/result for this job.

usage_pending*boolean

Whether the job holds tokens of your budget: true while it runs.

Example Request
curl -X POST 'https://api.v2.infra.acsresearch.org/v1/completion-jobs' \  -H 'Authorization: Bearer <API_KEY>' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "prompt": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "request_id": "string",  "model": "string",  "status": "queued",  "cancel_requested": true,  "created_at": "string",  "started_at": "string",  "finished_at": "string",  "expires_at": "string",  "result_expired": true,  "status_url": "string",  "result_url": "string",  "usage_pending": true}