Ir para a navegação

Create Project

Create a project to group related generations and assets. Pass the returned id as projectId on POST /v2/generate or POST /v2/assets to file them under this project so they show up together in Studio. Only name is required — visibility defaults to USER and mode to CREATOR. Supply a client-generated UUID as id for idempotent creation. A retry with the same id returns the existing project and ignores other request fields; an id owned by another user/organization or a deleted project returns 409.

Autenticação

x-api-keystring
Autenticação de chave de API via cabeçalho

Solicitação

This endpoint expects an object.
namestringObrigatório
A name for the project.
idstringOpcional

Optional client-supplied project id (UUID) for idempotent creation. Re-sending the same id returns the existing project instead of creating a duplicate; the other request fields are ignored on such a replay. Fails with 409 if the id already belongs to a different user or organization, or to a deleted project.

descriptionstringOpcional
An optional description for the project.
visibilityenumOpcionalPadrão é USER

Who can see the project. Defaults to USER (visible only to the owner).

Valores permitidos:
modeenumOpcionalPadrão é CREATOR
The project mode. Defaults to CREATOR.
Valores permitidos:
defaultWorkflowenumOpcional

The default top-level creator workflow for this project.

Resposta

Project created successfully
idstring
A unique identifier for a project.
createdAtdatetime
The date and time the project was created.
updatedAtdatetime
The date and time the project was last updated.
visibilityenum
Who can see the project.
Valores permitidos:
modeenum
The project mode.
Valores permitidos:
namestringOpcional
The display name of the project.
descriptionstringOpcional
An optional description of the project.
defaultWorkflowenum or nullOpcional

The default top-level creator workflow for this project. Null for projects created outside the creator-workflows surface.

Erros

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error