Skip to content

The world itself and the agents you can talk to now, as OpenAI models

GET
/api/v1/openai/v1/models
curl --request GET \
--url http://localhost:11044/api/v1/openai/v1/models \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

World first, when the caller may talk to it, then the agents, as models

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"
}
}