All pages

Hosted inference APIs

Cloud captioning with no local GPU: OpenAI, Hugging Face Inference Providers, Replicate and NVIDIA NIM. Each needs an API key, and each request sends the image to that provider.

Used by

PackageWhat forReads
argus-lens (opens in new tab)

Cloud backends: openai (gpt-4o), hf-inference (BLIP-2), replicate (Florence-2 large), nvidia-nim (Kosmos-2).

OPENAI_API_KEY, HF_TOKEN, REPLICATE_API_TOKEN, NVIDIA_API_KEY, [openai], [replicate]

argus-cortex (opens in new tab)

RemoteProvider names the providers. It reads no env: the key is passed in.

[remote]

Official guides

Minimal setup

  1. Create an API key with the provider.

  2. Install the extra the backend needs: pip install 'argus-lens[openai]' or 'argus-lens[replicate]'. The Hugging Face and NIM backends need no extra.

  3. Export the key and pick the backend:

    export OPENAI_API_KEY=…
    argus-lens caption ./images/ --backend openai
    

Every image you caption this way is uploaded to that provider. Read their data-retention terms before captioning anything private.

In Studio's compose, set the key in the repo-root .env, and compose passes it to lens. The published lens image includes the Hugging Face and NIM backends. openai and replicate also need their extras, so build lens from source with LENS_EXTRAS=server,local,openai,replicate and -f compose.build.yaml.