Create an API key (requires admin)
POST
/api/apikeys
const url = 'https://api.langparse.dev/api/apikeys';const options = { method: 'POST', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["parse"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.langparse.dev/api/apikeys \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "name": "example", "scopes": [ "parse" ] }'The secret is returned ONCE. scopes default to [“parse”]; granting manage/admin needs the admin role.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
scopes
Array<string>
Responses
Section titled “Responses”New key (secret shown once)
Media typeapplication/json
object
keyId
string
name
string
scopes
Array<string>
secret
string
Examplegenerated
{ "keyId": "example", "name": "example", "scopes": [ "example" ], "secret": "example"}