Skip to main content
POST
/
api
/
v1
/
keys
Create an API key
curl --request POST \
  --url https://vine.getcourtyard.ai/api/v1/keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my-service-key",
  "env": "test",
  "scopes": [
    "<string>"
  ]
}
'
{
  "key": {
    "id": "<string>",
    "name": "<string>",
    "keyPrefix": "<string>",
    "plaintext": "<string>",
    "scopes": [
      "<string>"
    ],
    "rateTier": "<string>",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
name
string
required

Human label for the key (e.g. 'hassan-dev').

Required string length: 1 - 100
Example:

"my-service-key"

env
enum<string>
default:test

Key prefix environment. Defaults to 'test'.

Available options:
live,
test
scopes
string[]

Override default scopes. Defaults to ['detect', 'extract', 'extractions:read'].

Response

Key created.

key
object

Includes the one-time plaintext.