Skip to content
Primary navigation

Create checkpoint permissions

fine_tuning.checkpoints.permissions.create(fine_tuned_model_checkpoint, **kwargs) -> Page<PermissionCreateResponse { id, created_at, object, project_id } >
POST/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions

NOTE: Calling this endpoint requires an admin API key.

This enables organization owners to share fine-tuned models with other projects in their organization.

ParametersExpand Collapse
fine_tuned_model_checkpoint: String
project_ids: Array[String]

The project identifiers to grant access to.

ReturnsExpand Collapse
class PermissionCreateResponse { id, created_at, object, project_id }

The checkpoint.permission object represents a permission for a fine-tuned model checkpoint.

id: String

The permission identifier, which can be referenced in the API endpoints.

created_at: Integer

The Unix timestamp (in seconds) for when the permission was created.

object: :"checkpoint.permission"

The object type, which is always "checkpoint.permission".

project_id: String

The project identifier that the permission is for.

Create checkpoint permissions

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

page = openai.fine_tuning.checkpoints.permissions.create(
  "ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd",
  project_ids: ["string"]
)

puts(page)
{
  "object": "list",
  "data": [
    {
      "object": "checkpoint.permission",
      "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
      "created_at": 1721764867,
      "project_id": "proj_abGMw1llN8IrBb6SvvY5A1iH"
    }
  ],
  "first_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
  "last_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
  "has_more": false
}
Returns Examples
{
  "object": "list",
  "data": [
    {
      "object": "checkpoint.permission",
      "id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
      "created_at": 1721764867,
      "project_id": "proj_abGMw1llN8IrBb6SvvY5A1iH"
    }
  ],
  "first_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
  "last_id": "cp_zc4Q7MP6XxulcVzj4MZdwsAB",
  "has_more": false
}