Projects

Manage the projects within an orgnanization includes creation, updating, and archiving or projects. The Default project cannot be modified or archived.source

List projects

get https://api.openai.com/v1/organization/projects

Returns a list of projects.source

Query parameters

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.source

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

If true returns all projects including those that have been archived. Archived projects are not included by default.source

Returns

A list of Project objects.source

Example request
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"
Response

Create project

post https://api.openai.com/v1/organization/projects

Create a new project in the organization. Projects can be created and archived, but cannot be deleted.source

Request body

The friendly name of the project, this name appears in reports.source

Returns

The created Project object.source

Example request
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"
  }'
Response

Retrieve project

get https://api.openai.com/v1/organization/projects/{project_id}

Retrieves a project.source

Path parameters

The ID of the project.source

Returns

The Project object matching the specified ID.source

Example request
1
2
3
curl https://api.openai.com/v1/organization/projects/proj_abc \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json"
Response

Modify project

post https://api.openai.com/v1/organization/projects/{project_id}

Modifies a project in the organization.source

Path parameters

The ID of the project.source

Request body

The updated name of the project, this name appears in reports.source

Returns

The updated Project object.source

Example request
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

post https://api.openai.com/v1/organization/projects/{project_id}/archive

Archives a project in the organization. Archived projects cannot be used or updated.source

Path parameters

The ID of the project.source

Returns

The archived Project object.source

Example request
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"
Response

The project object

Represents an individual project.source

The identifier, which can be referenced in API endpointssource

The object type, which is always organization.projectsource

The name of the project. This appears in reporting.source

The Unix timestamp (in seconds) of when the project was created.source

The Unix timestamp (in seconds) of when the project was archived or null.source

active or archivedsource

OBJECT The project object
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"
}