Create OpenAI API Key
To create an OpenAI API key, send a POST request to /v2/gen-ai/openai/keys.
Request body
Example request
{
"api_key": "\"sk-proj--123456789098765432123456789\"",
"name": "\"Production Key\""
}Response
A successful response.
Example response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [
{
"agreement": {
"description": "example string",
"name": "example name",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"created_at": "2023-01-01T00:00:00Z",
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version": {
"major": 123,
"minor": 123,
"patch": 123
}
}
],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}Changes
Changed in 4 of the 8 revisions of this API.1328
- ○
api tag
DigitalOcean-public.v2-new_GradientAI Platformaddedapi-tag-added
- ○
api tag
GradientAI Platformremovedapi-tag-removed
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
api operation id
create_openai_api_keyremoved and replaced withgenai_create_openai_api_keyapi-operation-id-removed
- ○
the endpoint scheme security
bearer_authwas added to the APIapi-security-added
- ○
api tag
GradientAI Platformaddedapi-tag-added
- ○
api tag
GenAIAPIremovedapi-tag-removed
- ○
request body became optional
request-body-became-optional
- ○
added the non-success response with the status
401response-non-success-status-added
- ○
added the non-success response with the status
404response-non-success-status-added
- ○
added the non-success response with the status
429response-non-success-status-added
- ○
added the non-success response with the status
500response-non-success-status-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
request body became required
request-body-became-required
- ●
the optional response header
ratelimit-limitremoved for the status200optional-response-header-removed
- ●
the optional response header
ratelimit-remainingremoved for the status200optional-response-header-removed
- ●
the optional response header
ratelimit-resetremoved for the status200optional-response-header-removed
- ○
api operation id
genai_create_openai_api_keyremoved and replaced withcreate_openai_api_keyapi-operation-id-removed
- ○
the endpoint scheme security
bearer_authwas removed from the APIapi-security-removed
- ○
api tag
GenAIAPIaddedapi-tag-added
- ○
api tag
GradientAI Platformremovedapi-tag-removed
- ○
removed the non-success response with the status
401response-non-success-status-removed
- ○
removed the non-success response with the status
404response-non-success-status-removed
- ○
removed the non-success response with the status
429response-non-success-status-removed
- ○
removed the non-success response with the status
500response-non-success-status-removed
This revision also has 436 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
api operation id
create_openai_api_keyremoved and replaced withgenai_create_openai_api_keyapi-operation-id-removed
- ○
the endpoint scheme security
bearer_authwas added to the APIapi-security-added
- ○
api tag
GradientAI Platformaddedapi-tag-added
- ○
api tag
GenAIAPIremovedapi-tag-removed
- ○
request body became optional
request-body-became-optional
- ○
added the non-success response with the status
401response-non-success-status-added
- ○
added the non-success response with the status
404response-non-success-status-added
- ○
added the non-success response with the status
429response-non-success-status-added
- ○
added the non-success response with the status
500response-non-success-status-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○