Skip to main content
An inference run serves the model a training job saved, on the GPUs that trained it, for 7 days after training. It is billed by its tokens (the model’s token_prices): prompt, cached prompt and generated tokens. More in Inference.
A run is billed until it is stopped. It stops itself after max_hours, or after idle_timeout seconds without a request, but stop it yourself when you are done.

Estimate and start

POST /v1/inference/estimate takes job_id or model, and max_hours, and returns the price, in the same shape as an RL run’s estimate. POST /v1/inference starts the run.
Refusals: 422 for a job that did not succeed or a model without inference, 410 for a job that finished more than 7 days ago.

The run object

GET /v1/inference/{id} returns one run; GET /v1/inference returns a list. The fields are an RL run’s, with the job in params.job_id.

Call the model

The run speaks OpenAI’s API. The base URL is /v1/inference/{id}/v1 and the key is your NexCloud key. It serves chat/completions, completions and models; any model name means the run’s model.
One call without stream must finish in about 90 seconds: stream a long answer, and send large batches with connect. Chat prompts render with thinking off, as jobs train.

Stop

POST /v1/inference/{id}/stop.

Images and videos

POST /v1/inference/{id}/images with {"dataset_id"} gives a run started with images a dataset’s files. The SDK’s live.add_images(paths) does it for you; see Inference.