Create an API key
curl --request POST \
--url https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>']})
};
fetch('https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys"
payload = {
"name": "<string>",
"scopes": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "33c19c9d-b9e1-4928-8369-1995c2726c9b",
"key": "ig_live_...",
"key_prefix": "ig_live_abcd",
"scopes": ["runs:read", "runs:write"]
}
Credentials
Create an API key
Create a scoped workspace key and reveal its secret once.
POST
/
v1
/
workspaces
/
{workspace_id}
/
api-keys
Create an API key
curl --request POST \
--url https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>']})
};
fetch('https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://agent.infragrid.ai/v1/workspaces/{workspace_id}/api-keys"
payload = {
"name": "<string>",
"scopes": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "33c19c9d-b9e1-4928-8369-1995c2726c9b",
"key": "ig_live_...",
"key_prefix": "ig_live_abcd",
"scopes": ["runs:read", "runs:write"]
}
Requires an authenticated dashboard session. Returns
Allowed scopes:
201 Created.
uuid
required
Workspace that will own the credential.
string
required
Human-readable key name. 1–100 characters.
string[]
required
One or more unique public API scopes.
string | null
Optional ISO 8601 expiration timestamp.
runs:read, runs:write, runs:local, blueprints:read, blueprints:run, blueprint_runs:read, and blueprint_runs:cancel.
Response
{
"id": "33c19c9d-b9e1-4928-8369-1995c2726c9b",
"key": "ig_live_...",
"key_prefix": "ig_live_abcd",
"scopes": ["runs:read", "runs:write"]
}
string
required
Plaintext
ig_live_ secret. Returned only once.string
required
Safe prefix used to identify the credential later.
string[]
required
Granted scopes.
Copy the
key value directly into a server-side secret manager. It cannot be recovered after this response.Last modified on August 17, 2026