Skip to content

AI URI

Original Author: Michael Vorburger.ch
Contributors: YOU, contribute?
Status: Ready to Implement

Introduction

As you know, “There are only two hard things in Computer Science: cache invalidation and naming things.”

This spec proposes a convention for consistently naming some things related to AI with URIs.

These URIs are independent of any specific programming language, framework, tool, etc.

Perhaps your favorite one could adopt it!

Language Models (LM)

Ollama ๐Ÿฆ™

http://localhost:11434?type=ollama&model=gemma3:1b is the URI of the Gemma 3 (1B) large language model running in Ollama, at http://localhost:11434.

The model query parameter of the URI needs to use a model name from https://ollama.com/search.

Google AI ๐Ÿ”ฎ

google://?model=gemini-2.5-flash-preview-04-17 is the URI of the Gemini 2.5 Flash (Preview 04-17) LLM, used via the Google (Gemini) AI API.

For security, the API key is not part of this URI, but configured elsewhere; typically in a secret named GOOGLE_AI_API_KEY. Such keys can be easily obtained by clicking on Get API key in https://aistudio.google.com.

Note that the Google (Gemini) AI API is a different API from the Google Cloud Vertex AI Platform API.

Mock ๐Ÿฆœ

mocklm:hello,%20world is the URI of a mock LM which, like a ๐Ÿฆœ parrot, always replies with “hello, world” to any prompt.

Security

It is intentional that none of these URIs contain API keys. They are configured “elsewhere”, with a mechanism specific to the supporting framework or tool; typically in a secret.

This is primarily for security reasons, as such URIs may be used e.g. in agent configuration files stored under source control, or even shown to technical end-users in UIs.

It is also often more convenient in practice; because while the choice of a model, and its parameters, is often specific to a given Agent configuration, the specific API key really is not, and instead belongs to separate configuration.

We are not aware of any similar LM URI naming scheme. Please add any that you know of here.

ToDo

  1. Add many more URIs
  2. Support (default) “standard” ?topP / topK, temperature, seed etc. query parameters

Support

Haiku

A URI's a name,
For AI, it's the same,
Ollama, Google, ...
No longer a struggle,
To call models by name.