Zuplo API v4
Zuplo Developer API

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

GET
https://dev-api-v4-main-a471234.zuplo.app
/v4/accounts/{accountId}/projects

Lists the account's projects, oldest first. Filter by type to list only its AI Gateways.

List projects › path Parameters

accountId
​string · maxLength: 64 · required

The account ID, a UUID.

List projects › query Parameters

type
​ProjectType · enum

Only 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.

Enum values:
ai-gateway
api-gateway
limit
​integer · min: 1 · max: 100

The maximum number of items to return.

Default: 10
offset
​integer · min: 0

The number of items to skip before the first item returned.

Default: 0

List projects › Responses

A page of projects.

A page of projects.
​Project[] · required

The projects on this page.

limit
​integer · required

The page size that was applied.

offset
​integer · required

The number of items skipped before this page.

total
​integer · required

The number of items in the whole collection.

hasMore
​boolean · required

Whether there are more items after this page.

next
​string | null · required

The relative URL of the next page, or null on the last page.


Create a project

POST
https://dev-api-v4-main-a471234.zuplo.app
/v4/accounts/{accountId}/projects

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

Create a project › path Parameters

accountId
​string · maxLength: 64 · required

The account ID, a UUID.

Create a project › Request Body

A new project.
name
​string · minLength: 3 · maxLength: 40 · pattern: ^[a-z][a-z0-9-]*[a-z… · required

The project's name, unique in the account. Lowercase letters, digits and hyphens. It cannot be changed later.

type
​ProjectType · enum · required

What a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.

Enum values:
ai-gateway
api-gateway

Create a project › Responses

The project was created.

One gateway in an account. An `ai-gateway` project keeps everything its AI Gateway has in the bucket of its production environment.
id
​string · required

The project ID.

Example: prj_Hn4QzW7cVb2LpX9sTe5RgK1m
accountId
​string · required

The account the project belongs to.

Example: 5f0c7c2e-8d3a-4b1e-9f2a-6c1d0e7b3a49
name
​string · required

The project's name, unique in the account. It is part of the gateway's URL. Address the project by id.

Example: acme-ai-gateway
type
​ProjectType · enum · required

What a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.

Enum values:
ai-gateway
api-gateway
​ProjectBucket[] · required

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.

createdOn
​string · date-time · required

When the project was created.

updatedOn
​string · date-time · required

When the project was last changed.


Get a project

GET
https://dev-api-v4-main-a471234.zuplo.app
/v4/projects/{projectId}

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.

Get a project › path Parameters

projectId
​string · maxLength: 64 · required

The project ID (prj_…). Its members, environments and deployments are addressed under it.

Get a project › Responses

The project.

One gateway in an account. An `ai-gateway` project keeps everything its AI Gateway has in the bucket of its production environment.
id
​string · required

The project ID.

Example: prj_Hn4QzW7cVb2LpX9sTe5RgK1m
accountId
​string · required

The account the project belongs to.

Example: 5f0c7c2e-8d3a-4b1e-9f2a-6c1d0e7b3a49
name
​string · required

The project's name, unique in the account. It is part of the gateway's URL. Address the project by id.

Example: acme-ai-gateway
type
​ProjectType · enum · required

What a project is. ai-gateway is an AI Gateway, api-gateway an API gateway built from source. New values may be added.

Enum values:
ai-gateway
api-gateway
​ProjectBucket[] · required

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.

createdOn
​string · date-time · required

When the project was created.

updatedOn
​string · date-time · required

When the project was last changed.


Delete a project

DELETE
https://dev-api-v4-main-a471234.zuplo.app
/v4/projects/{projectId}

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.

Delete a project › path Parameters

projectId
​string · maxLength: 64 · required

The project ID (prj_…). Its members, environments and deployments are addressed under it.

Delete a project › Responses

The project was deleted.

No data returned