Skip to content
Primary navigation

Create project

admin.organization.projects.create(ProjectCreateParams**kwargs) -> Project
POST/organization/projects

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

ParametersExpand Collapse
name: str

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

external_key_id: Optional[str]

External key ID to associate with the project.

geography: Optional[str]

Create the project with the specified data residency region. Your organization must have access to Data residency functionality in order to use. See data residency controls to review the functionality and limitations of setting this field.

ReturnsExpand Collapse
class Project: …

Represents an individual project.

id: str

The identifier, which can be referenced in API endpoints

created_at: int

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

formatunixtime
object: Literal["organization.project"]

The object type, which is always organization.project

archived_at: Optional[int]

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

formatunixtime
external_key_id: Optional[str]

The external key associated with the project.

name: Optional[str]

The name of the project. This appears in reporting.

status: Optional[str]

active or archived

Create project

import os
from openai import OpenAI

client = OpenAI(
    admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"),  # This is the default and can be omitted
)
project = client.admin.organization.projects.create(
    name="name",
)
print(project.id)
{
    "id": "proj_abc",
    "object": "organization.project",
    "name": "Project ABC",
    "created_at": 1711471533,
    "archived_at": null,
    "status": "active"
}
Returns Examples
{
    "id": "proj_abc",
    "object": "organization.project",
    "name": "Project ABC",
    "created_at": 1711471533,
    "archived_at": null,
    "status": "active"
}