Projects
Manage the projects within an orgnanization includes creation, updating, and archiving or projects. The Default project cannot be modified or archived.
List projects
Returns a list of projects.
Query parameters
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
A cursor for use in pagination. after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Returns
A list of Project objects.
1
2
3
curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Create project
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
Returns
The created Project object.
1
2
3
4
5
6
curl -X POST https://api.openai.com/v1/organization/projects \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Project ABC"
}'
Retrieve project
Retrieves a project.
Returns
The Project object matching the specified ID.
1
2
3
curl https://api.openai.com/v1/organization/projects/proj_abc \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
Modify project
Modifies a project in the organization.
Returns
The updated Project object.
1
2
3
4
5
6
curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Project DEF"
}'
Archive project
Archives a project in the organization. Archived projects cannot be used or updated.
Returns
The archived Project object.
1
2
3
curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
The project object
Represents an individual project.
1
2
3
4
5
6
7
8
{
"id": "proj_abc",
"object": "organization.project",
"name": "Project example",
"created_at": 1711471533,
"archived_at": null,
"status": "active"
}