Skip to content

One agent, as the only OpenAI model at its own base URL

GET
/api/v1/agents/{name}/v1/models
curl --request GET \
--url http://localhost:11044/api/v1/agents/example/v1/models \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
name
required
string

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

The agent, as a model

Media typeapplication/json

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
data
required

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

Array<object>

An agent, or the world itself, presented as an OpenAI model

object
created
required

When the list was made, in Unix epoch seconds; not when the agent was created

integer format: int64
id
required

The agent’s name, or world for the world itself; send it as model to talk to it

string
object
required

Always model

string
owned_by
required

Always embabel

string
object
required

Always list

string

Example generated

{
"data": [
{
"created": 1,
"id": "example",
"object": "example",
"owned_by": "example"
}
],
"object": "example"
}

No API key or session

Media typeapplication/json

An OpenAI-shaped error body, answered by the OpenAI-compatible endpoints when they refuse a request

object
error
required

The refusal

object
code
required

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

string
message
required

Human-readable reason, e.g. why the agent may not be talked to now

string
type
required

Always invalid_request_error

string

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

Media typeapplication/json

An OpenAI-shaped error body, answered by the OpenAI-compatible endpoints when they refuse a request

object
error
required

The refusal

object
code
required

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

string
message
required

Human-readable reason, e.g. why the agent may not be talked to now

string
type
required

Always invalid_request_error

string

Example generated

{
"error": {
"code": "example",
"message": "example",
"type": "example"
}
}

No agent of that name may be talked to now

Media typeapplication/json

An OpenAI-shaped error body, answered by the OpenAI-compatible endpoints when they refuse a request

object
error
required

The refusal

object
code
required

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

string
message
required

Human-readable reason, e.g. why the agent may not be talked to now

string
type
required

Always invalid_request_error

string

Example generated

{
"error": {
"code": "example",
"message": "example",
"type": "example"
}
}