Skip to content
Primary navigation

Create project

Project admin().organization().projects().create(ProjectCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/projects

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

ParametersExpand Collapse
ProjectCreateParams params
String name

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

Optional<String> externalKeyId

External key ID to associate with the project.

Optional<String> geography

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.

String id

The identifier, which can be referenced in API endpoints

long createdAt

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

formatunixtime
JsonValue; object_ "organization.project"constant"organization.project"constant

The object type, which is always organization.project

Optional<Long> archivedAt

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

formatunixtime
Optional<String> externalKeyId

The external key associated with the project.

Optional<String> name

The name of the project. This appears in reporting.

Optional<String> status

active or archived

Create project

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.admin.organization.projects.Project;
import com.openai.models.admin.organization.projects.ProjectCreateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        ProjectCreateParams params = ProjectCreateParams.builder()
            .name("name")
            .build();
        Project project = client.admin().organization().projects().create(params);
    }
}
{
    "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"
}