Checkpoints
Permissions
List checkpoint permissions
fine_tuning.checkpoints.permissions.retrieve(fine_tuned_model_checkpoint, **kwargs) -> PermissionRetrieveResponse
get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions
NOTE: This endpoint requires an admin API key.
Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.
Parameters
-
fine_tuned_model_checkpoint: String -
after: StringIdentifier for the last permission ID from the previous pagination request.
-
limit: IntegerNumber of permissions to retrieve.
-
order: :ascending | :descendingThe order in which to retrieve permissions.
-
:ascending -
:descending
-
-
project_id: StringThe ID of the project to get permissions for.
Returns
-
class PermissionRetrieveResponse-
data: Array[Data{ id, created_at, object, project_id}]-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
-
has_more: bool -
object: :list:list
-
first_id: String -
last_id: String
-
Example
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
permission = openai.fine_tuning.checkpoints.permissions.retrieve("ft-AF1WoRqd3aJAHsqc9NY7iL8F")
puts(permission)
Response
{
"data": [
{
"id": "id",
"created_at": 0,
"object": "checkpoint.permission",
"project_id": "project_id"
}
],
"has_more": true,
"object": "list",
"first_id": "first_id",
"last_id": "last_id"
}
List checkpoint permissions
fine_tuning.checkpoints.permissions.list(fine_tuned_model_checkpoint, **kwargs) -> ConversationCursorPage<PermissionListResponse>
get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions
NOTE: This endpoint requires an admin API key.
Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.
Parameters
-
fine_tuned_model_checkpoint: String -
after: StringIdentifier for the last permission ID from the previous pagination request.
-
limit: IntegerNumber of permissions to retrieve.
-
order: :ascending | :descendingThe order in which to retrieve permissions.
-
:ascending -
:descending
-
-
project_id: StringThe ID of the project to get permissions for.
Returns
-
class PermissionListResponseThe
checkpoint.permissionobject represents a permission for a fine-tuned model checkpoint.-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
Example
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
page = openai.fine_tuning.checkpoints.permissions.list("ft-AF1WoRqd3aJAHsqc9NY7iL8F")
puts(page)
Response
{
"data": [
{
"id": "id",
"created_at": 0,
"object": "checkpoint.permission",
"project_id": "project_id"
}
],
"has_more": true,
"object": "list",
"first_id": "first_id",
"last_id": "last_id"
}
Create checkpoint permissions
fine_tuning.checkpoints.permissions.create(fine_tuned_model_checkpoint, **kwargs) -> Page<PermissionCreateResponse>
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.
Parameters
-
fine_tuned_model_checkpoint: String -
project_ids: Array[String]The project identifiers to grant access to.
Returns
-
class PermissionCreateResponseThe
checkpoint.permissionobject represents a permission for a fine-tuned model checkpoint.-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
Example
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)
Response
{
"data": [
{
"id": "id",
"created_at": 0,
"object": "checkpoint.permission",
"project_id": "project_id"
}
],
"has_more": true,
"object": "list",
"first_id": "first_id",
"last_id": "last_id"
}
Delete checkpoint permission
fine_tuning.checkpoints.permissions.delete(permission_id, **kwargs) -> PermissionDeleteResponse
delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}
NOTE: This endpoint requires an admin API key.
Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.
Parameters
-
fine_tuned_model_checkpoint: String -
permission_id: String
Returns
-
class PermissionDeleteResponse-
id: StringThe ID of the fine-tuned model checkpoint permission that was deleted.
-
deleted: boolWhether the fine-tuned model checkpoint permission was successfully deleted.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
Example
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
permission = openai.fine_tuning.checkpoints.permissions.delete(
"cp_zc4Q7MP6XxulcVzj4MZdwsAB",
fine_tuned_model_checkpoint: "ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd"
)
puts(permission)
Response
{
"id": "id",
"deleted": true,
"object": "checkpoint.permission"
}
Domain Types
Permission Retrieve Response
-
class PermissionRetrieveResponse-
data: Array[Data{ id, created_at, object, project_id}]-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
-
has_more: bool -
object: :list:list
-
first_id: String -
last_id: String
-
Permission List Response
-
class PermissionListResponseThe
checkpoint.permissionobject represents a permission for a fine-tuned model checkpoint.-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
Permission Create Response
-
class PermissionCreateResponseThe
checkpoint.permissionobject represents a permission for a fine-tuned model checkpoint.-
id: StringThe permission identifier, which can be referenced in the API endpoints.
-
created_at: IntegerThe Unix timestamp (in seconds) for when the permission was created.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-
project_id: StringThe project identifier that the permission is for.
-
Permission Delete Response
-
class PermissionDeleteResponse-
id: StringThe ID of the fine-tuned model checkpoint permission that was deleted.
-
deleted: boolWhether the fine-tuned model checkpoint permission was successfully deleted.
-
object: :"checkpoint.permission"The object type, which is always "checkpoint.permission".
:"checkpoint.permission"
-