The world itself and the agents you can talk to now, as OpenAI models
const url = 'http://localhost:11044/api/v1/openai/v1/models';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/openai/v1/models \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”World first, when the caller may talk to it, then the agents, as models
The world itself and the agents the caller can talk to now, as OpenAI models; answered by GET /openai/v1/models and, holding just that agent, GET /agents/{name}/v1/models
object
On /openai/v1: world first, unless the caller’s API key is an agent key, then the agents that may be talked to now and that the key, if scoped to some agents, reaches
An agent, or the world itself, presented as an OpenAI model
object
When the list was made, in Unix epoch seconds; not when the agent was created
The agent’s name, or world for the world itself; send it as model to talk to it
Always model
Always embabel
Always list
Example generated
{ "data": [ { "created": 1, "id": "example", "object": "example", "owned_by": "example" } ], "object": "example"}No API key or session
An OpenAI-shaped error body, answered by the OpenAI-compatible endpoints when they refuse a request
object
The refusal
object
Model_not_found when no agent of that name may be talked to now, key_scope when the API key does not reach the agent or the world itself, invalid_request when there is no user message to answer or embabel_observing is asked of the world
Human-readable reason, e.g. why the agent may not be talked to now
Always invalid_request_error
Example generated
{ "error": { "code": "example", "message": "example", "type": "example" }}
