Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Create project

client.admin.organization.projects.create(ProjectCreateParams { name, external_key_id, geography, residency } body, RequestOptionsoptions?): Project { id, created_at, object, 5 more }
POST/organization/projects

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

ParametersExpand Collapse
body: ProjectCreateParams { name, external_key_id, geography, residency }
name: string

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

external_key_id?: string | null

External key ID to associate with the project.

geography?: string | null

Deprecated.

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. Deprecated: use residency instead. Do not provide both geography and residency.

residency?: ProjectResidency | null

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

ReturnsExpand Collapse
Project { id, created_at, object, 5 more }

Represents an individual project.

id: string

The identifier, which can be referenced in API endpoints

created_at: number

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

formatunixtime
object: "organization.project"

The object type, which is always organization.project

archived_at?: number | null

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

formatunixtime
external_key_id?: string | null

The external key associated with the project.

name?: string | null

The name of the project. This appears in reporting.

residency?: ProjectResidency

The residency configuration for the project.

status?: string | null

active or archived

Create project

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const project = await client.admin.organization.projects.create({ name: 'name' });

console.log(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"
}