Skip to main content

project_api_keys

Creates, updates, deletes, gets or lists a project_api_keys resource.

Overview

Nameproject_api_keys
TypeResource
Idopenai.projects.project_api_keys

Fields

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints
namestringThe name of the API key
created_atintegerThe Unix timestamp (in seconds) of when the API key was created
objectstringThe object type, which is always organization.project.api_key
ownerobject
redacted_valuestringThe redacted value of the API key

Methods

NameAccessible byRequired ParamsDescription
list_project_api_keysSELECTproject_id
retrieve_project_api_keySELECTkey_id, project_id
delete_project_api_keyDELETEkey_id, project_id

SELECT examples

SELECT
id,
name,
created_at,
object,
owner,
redacted_value
FROM openai.projects.project_api_keys
WHERE project_id = '{{ project_id }}';

DELETE example

Deletes the specified project_api_keys resource.

/*+ delete */
DELETE FROM openai.projects.project_api_keys
WHERE key_id = '{{ key_id }}'
AND project_id = '{{ project_id }}';