One agent, as the only OpenAI model at its own base URL
const url = 'http://localhost:11044/api/v1/agents/example/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/agents/example/v1/models \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent’s name, exactly as id in GET /openai/v1/models; an agent that does not exist, was never signed, is off or is halted is a 404, and one the calling API key is not scoped to is a 403
Responses
Section titled “Responses”The agent, as a model
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" }}This key does not talk to that agent — the agent exists, the key’s scope does not reach it
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" }}No agent of that name may be talked to now
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" }}
