Projects
A project is one gateway in an account. Create an ai-gateway project to get
an AI Gateway: Zuplo creates its production environment and that environment's
bucket, and deploys the gateway without a Git repository.
A project is listed and created in its account
(/v4/accounts/{accountId}/projects) and read at the root by its ID
(/v4/projects/{projectId}), and its buckets list the
bucket of each of its environment types. An AI Gateway project has one, its
production bucket, and everything the gateway holds is under
/v4/buckets/{bucketId}.
A project is also a container, like a bucket: what is in it, its members,
environments and deployments, is addressed under /v4/projects/{projectId}.
List projects
Lists the account's projects, oldest first. Filter by type to list only its AI Gateways.
path Parameters
accountIdThe account ID, a UUID.
query Parameters
typeOnly return projects of this type.
What a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.
limitThe maximum number of items to return.
offsetThe number of items to skip before the first item returned.
List projects › Responses
A page of projects.
The projects on this page.
limitThe page size that was applied.
offsetThe number of items skipped before this page.
totalThe number of items in the whole collection.
hasMoreWhether there are more items after this page.
nextThe relative URL of the next page, or null on the last page.
Create a project
Creates a project in the account. This preview creates ai-gateway projects;
other types return 400.
Creating an ai-gateway project creates its production environment, that
environment's bucket, and the gateway's user app. The bucket and the user app
are created in the background, right after the response, so its buckets is
usually still empty. List the account's buckets with the project's ID,
GET /v4/accounts/{accountId}/buckets?projectId=…, until the production
bucket is there, the only one an AI Gateway project has. The gateway itself
deploys in the background too, normally within a few minutes, and needs no
Git repository. To wait for it, read the production environment,
GET /v4/projects/{projectId}/environments?type=production, for its id
and url (the gateway's URL), then read its newest deployment,
GET /v4/projects/{projectId}/deployments?environmentId=…&limit=1, until it
has succeeded. That does not guarantee every edge serves the gateway yet:
only a request to its url shows that. The environment has no status
(null) for an AI Gateway. You can add providers, pools and apps while it
deploys.
name must be unique in the account and cannot be changed later, because it is
part of the gateway's URL. The new project is read at the root: its Location
is /v4/projects/{projectId}.
path Parameters
accountIdThe account ID, a UUID.
Create a project › Request Body
name^[a-z][a-z0-9-]*[a-z… · requiredThe project's name, unique in the account. Lowercase letters, digits and hyphens. It cannot be changed later.
typeWhat a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.
Create a project › Responses
The project was created.
idThe project ID.
accountIdThe account the project belongs to.
nameThe project's name, unique in the account. It is part of the gateway's URL. Address the project by id.
typeWhat a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.
The bucket of each of the project's environment types, production first.
The environments of one type share it. An ai-gateway project has only a
production environment, so it has one bucket, which is created right after
the project: empty until then.
createdOnWhen the project was created.
updatedOnWhen the project was last changed.
Get a project
Returns a project, its type and the bucket of each of its environment types.
A project is read at the root by its ID; its accountId says which account
it is in. A project the caller cannot see, including one in another account
than an account-scoped API key's, returns 404 as if it did not exist.
path Parameters
projectIdThe project ID (prj_…). Its members, environments and deployments are addressed under it.
Get a project › Responses
The project.
idThe project ID.
accountIdThe account the project belongs to.
nameThe project's name, unique in the account. It is part of the gateway's URL. Address the project by id.
typeWhat a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.
The bucket of each of the project's environment types, production first.
The environments of one type share it. An ai-gateway project has only a
production environment, so it has one bucket, which is created right after
the project: empty until then.
createdOnWhen the project was created.
updatedOnWhen the project was last changed.
Delete a project
Deletes a project, its environments and their buckets with everything in them.
For an AI Gateway, that is the gateway, its providers and their stored
credentials, pools, apps, the user app, people's budgets and every API key.
Requests to the gateway fail right away. A repeated delete returns 404, which
clients should treat as success. A project the caller cannot see, including
one in another account than an account-scoped API key's, returns 404 as if
it did not exist.
path Parameters
projectIdThe project ID (prj_…). Its members, environments and deployments are addressed under it.
Delete a project › Responses
The project was deleted.