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.New(ctx, body) (*Project, error)
POST
/organization/projects

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

Parameters
body AdminOrganizationProjectNewParams
Name param.Field[string]

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

ExternalKeyID param.Field[string]
Optional

External key ID to associate with the project.

Geography param.Field[string]
Optional

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 param.Field[ProjectResidency]
Optional

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.

Returns
type Project struct{…}

Represents an individual project.

ID string

The identifier, which can be referenced in API endpoints

CreatedAt int64

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

formatunixtime
Object OrganizationProject

The object type, which is always organization.project

ArchivedAt int64
Optional

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

formatunixtime
ExternalKeyID string
Optional

The external key associated with the project.

Name string
Optional

The name of the project. This appears in reporting.

Residency ProjectResidency
Optional

The residency configuration for the project.

Status string
Optional

active or archived

Create project

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAdminAPIKey("My Admin API Key"),
  )
  project, err := client.Admin.Organization.Projects.New(context.TODO(), openai.AdminOrganizationProjectNewParams{
    Name: "name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
}