Skip to content

Latest commit

 

History

History
74 lines (53 loc) · 2.24 KB

File metadata and controls

74 lines (53 loc) · 2.24 KB
title API keys
description Create, name, copy, and delete API keys from your ModelRunner profile
icon key

Retrieve and manage your API keys

Use API keys to authenticate requests to ModelRunner. Follow these steps to create a key, give it a clear name, copy it securely, and delete it when no longer needed.

Go to your account menu and select Profile, then open API Keys. Click Create API key.
<Tip>
Prefer one key per environment or integration (for example: "staging-web", "prod-data-pipeline").
</Tip>
Enter a descriptive name so you can identify usage later, then confirm to generate the key. Copy the value and store it in a secure secrets manager or environment variable. You will use it in the Authorization header.
<CodeGroup>
```bash cURL
curl -X GET "https://queue.modelrunner.run/{owner}/{model}/requests/{request_id}/status" \
  -H "Authorization: Key YOUR_API_KEY"
```

```javascript Node.js
const res = await fetch(
  `https://queue.modelrunner.run/${owner}/${model}/requests/${requestId}/status`,
  { headers: { Authorization: `Key ${process.env.MODELRUNNER_API_KEY}` } }
);
const data = await res.json();
```
</CodeGroup>

<Warning>
You can only view the full API key once at creation time. If lost, delete it and create a new one. Never share keys publicly or embed them in client-side code.
</Warning>
Your API key is ready. Test it with a quick request and verify you receive a valid response.

Delete an API key

If an API key is no longer needed or has been exposed, you should delete it immediately to prevent unauthorized access.

To delete an API key:

  • Go to the API Keys section in your profile.
  • Find the key you want to remove.
  • Click Delete and confirm your choice.

After deletion, any requests using that key will fail with a 401 Unauthorized error.

Regularly review and remove unused or compromised API keys to keep your account secure.