Research preview. Apply for access. We review each application and email you when it's approved, with your API key ready on the API keys page.

Examples

Each page shows one API feature in a runnable example, while the cookbook has runnable recipes for whole workflows.

The curl commands read the ACS_API_KEY and ACS_API_BASE variables, and the Python snippets use the openai client. Quick start sets up both.

Most examples leave the sampling fields and seed unset. They sample with the neutral values, such as 1.0 for temperature and top_p, so your output can differ from the responses shown. The exception is the two-pass recipe on the prompt_logprobs page, which sets them.

To make your own runs repeatable, set a seed, or set temperature to 0 for greedy decoding. A request sent on its own then repeats its output, but when the server is busy, the logprobs can move a little and a token can change.

Token-level inspection

  • logprobs returns the top-k alternatives at each generated token.
  • prompt_logprobs returns the top-k predictions at each prompt position.
  • echo puts the prompt in front of the generated text.

Streaming and concurrency

  • stream sends the completion as server-sent events while the model generates it.
  • Batch rollouts sends many requests at once, up to the limit of 16 running requests per key.

Long requests and recovery

  • Cold-boot waiting keeps one request open while a model starts.
  • Completion jobs lets a completion finish on the server after you disconnect, so you submit it once and poll for the result.
  • Budget-cap recovery handles 429 budget_exceeded when a token budget runs out.

Evaluation

  • Evaluate with Inspect runs Inspect evals on these base models through its openai-api-completions provider.

Next steps