Skip to main content

Prerequisites

The same as for calling a model: an agent whose budget admits the inference provider, and that agent’s API key.

Choose a model

Pick an image or video model on the Inference page, or from GET https://inference.agentic.anchorage.com/v1/models, where each callable model’s endpoint names the path to submit it to. Skip entries whose available is false; the Inference page leaves them out. See Choose a model.

Submit the generation

For a video, send the same request to /v1/videos/generations.
  • model is the identifier from the model list.
  • prompt describes what to generate. It can’t be blank.
  • Any other field the model accepts, such as n and size for an image, is passed to the provider unchanged.
  • Idempotency-Key is optional. Keep it for retries of this submit, and send a new one for the next generation.

Poll for the result

If the submit answered 202, poll its poll_url, a path on https://inference.agentic.anchorage.com, every few seconds until status is completed, failed, or timed_out. A completed job carries its output in data when there is output to return. A job that ended with payment_window_closed, payment_not_repeatable, or timed_out can still turn completed for a day after its submit, so keep polling it now and then during that day to collect the output. Before you submit a failed or timed-out generation again, check its transaction; see What a generation costs. Send the API key only to https://inference.agentic.anchorage.com: if a poll_url names any other host, don’t poll it. See Image and video generation for how polling, charging, retries, and errors work.