Adds a public key to your account. Instances you create after this
call get this key. Instances that already exist keep the key they were
created with. Registering the same public key again creates a new ID.
A trailing newline is accepted and preserved.
The key must be one OpenSSH public key line, for example the content
of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front
of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types
sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com,
and RSA keys of 2048 bits or more are accepted. Other key types,
certificates, and RSA keys shorter than 2048 bits get 400.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
Register an SSH public key with the Compute API before creating an instance. New instances use the most recently registered key, including registrations made in the console. Existing instances keep their original key.
Send only the public key, normally the file ending in .pub. Never send the private key.
Request
Create a local ssh-key.json file containing:
{ "content": "YOUR_SSH_PUBLIC_KEY"}
Replace the placeholder with one complete OpenSSH public key (up to 8,192 characters). Accepted types are Ed25519, ECDSA P-256/P-384/P-521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, and RSA with at least 2,048 bits. Then send the file:
A successful registration returns 201 Created with id, content, and created_at. id is a UUID. created_at is a date-time string or null. Save the ID so you can retrieve the key.Registering the same key again creates another record with a new ID. It does not return the existing ID or a duplicate-key conflict. A trailing newline is preserved.
Validation and scope
Invalid key content returns 400. Rejected inputs include malformed keys, RSA keys shorter than 2048 bits, options prefixes such as no-pty, SSH certificates, and multiple key lines.A missing or invalid API key returns 401. Account restrictions can return 403, throttling returns 429, and a server error returns 500.This API supports registration and retrieval by ID. Key listing, deletion, names, and fingerprints are not available in this release.Use the key with the instance creation workflow. For authentication and throttling errors, see Handle errors and rate limits.
Authorizations
Authorization
string
header
required
An API key issued by Hive Compute support. See Authentication
above for how to request one.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Hivenet Docs","colors":{"primary":"#D46E35","light":"#D46E35","dark":"#D46E35"},"logo":{"light":"https://mintcdn.com/hivenet/TWEg6sSBW1tiOeI2/logo/hivenet-logo-color-light.svg?fit=max\u0026auto=format\u0026n=TWEg6sSBW1tiOeI2\u0026q=85\u0026s=4fc5fd5b28244278713ed9ad46ba2e31","dark":"https://mintcdn.com/hivenet/TWEg6sSBW1tiOeI2/logo/hivenet-logo-color-dark.svg?fit=max\u0026auto=format\u0026n=TWEg6sSBW1tiOeI2\u0026q=85\u0026s=f7d319f0aaa3145e379a1adf68e157a1"},"favicon":"https://mintcdn.com/hivenet/wLiroph8DC3pwMz6/logo/website-favicon.png?fit=max\u0026auto=format\u0026n=wLiroph8DC3pwMz6\u0026q=85\u0026s=137d9df86fe96dec70d8619d227df3ed","api":{"playground":{"proxy":true},"examples":{"languages":["curl","javascript","Python"],"autogenerate":true},"url":"full"},"appearance":{"strict":false},"navbar":{"links":[{"href":"https://www.hivenet.com/support","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://console.hivecompute.ai/"}},"footer":{"socials":{"x":"https://x.com/hivenet_cloud","linkedin":"https://www.linkedin.com/company/hivenetdistributedcloud"}},"integrations":{"intercom":{"appId":"e7qrp69x"},"mixpanel":{"projectToken":"46ebe1e68e7ebacfc28d1e27e8ba0abf"}},"contextual":{"options":["copy","chatgpt","claude","perplexity","download-pdf","view","assistant"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Console","icon":"computer","href":"https://console.hivecompute.ai/"},{"anchor":"Help Center","icon":"book-open-cover","href":"https://help.hivenet.com/en/"},{"anchor":"Community","icon":"discord","href":"https://discord.com/invite/p2CwYSKsQU"},{"anchor":"Blog","icon":"newspaper","href":"https://compute.hivenet.com/computes-blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hivenet","hasAudioNarration":false,"actualSubdomain":"hivenet","customDomains":["docs.hivenet.com"],"gitSource":{"type":"github","owner":"hivererer","repo":"hivenet-compute-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b05a5d96451cb5adcee209f","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"Documentation","count":58},{"language":"default","tag":"Compute API","count":34},{"language":"default","tag":"API reference","count":26},{"language":"default","tag":"Hivenet Object Storage","count":13},{"language":"default","tag":"Connectivity","count":9},{"language":"default","tag":"Inference Service","count":9},{"language":"default","tag":"Essentials","count":8},{"language":"default","tag":"Instances","count":8},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Tutorials","count":7}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@hivenet.com"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"public-api/endpoints/register-ssh-key","slug":"/public-api/endpoints/register-ssh-key","pageMetadata":{"title":"Register SSH key","sidebarTitle":"Register SSH key","openapi":"public-v1.yaml POST /ssh-keys","authMethod":"bearer","playground":"none","keywords":["Compute API","Register SSH key"],"description":"Adds a public key to your account. Instances you create after this\ncall get this key. Instances that already exist keep the key they were\ncreated with. Registering the same public key again creates a new ID.\nA trailing newline is accepted and preserved.\n\nThe key must be one OpenSSH public key line, for example the content\nof `~/.ssh/id_ed25519.pub`, with no `authorized_keys` options in front\nof it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types\n`sk-ssh-ed25519@openssh.com` and `sk-ecdsa-sha2-nistp256@openssh.com`,\nand RSA keys of 2048 bits or more are accepted. Other key types,\ncertificates, and RSA keys shorter than 2048 bits get `400`.\n","href":"/public-api/endpoints/register-ssh-key"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Adds a public key to your account. Instances you create after this\\ncall get this key. Instances that already exist keep the key they were\\ncreated with. Registering the same public key again creates a new ID.\\nA trailing newline is accepted and preserved.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The key must be one OpenSSH public key line, for example the content\\nof \", _jsx(_components.code, {\n children: \"~/.ssh/id_ed25519.pub\"\n }), \", with no \", _jsx(_components.code, {\n children: \"authorized_keys\"\n }), \" options in front\\nof it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types\\n\", _jsx(_components.code, {\n children: \"sk-ssh-ed25519@openssh.com\"\n }), \" and \", _jsx(_components.code, {\n children: \"sk-ecdsa-sha2-nistp256@openssh.com\"\n }), \",\\nand RSA keys of 2048 bits or more are accepted. Other key types,\\ncertificates, and RSA keys shorter than 2048 bits get \", _jsx(_components.code, {\n children: \"400\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Register an SSH public key with the Compute API before creating an instance. New instances use the most recently registered key, including registrations made in the console. Existing instances keep their original key.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Send only the public key, normally the file ending in `,_jsx(_components.code,{children:`.pub`}),`. Never send the private key.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(_components.p,{children:[`Create a local `,_jsx(_components.code,{children:`ssh-key.json`}),` file containing:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_SSH_PUBLIC_KEY\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replace the placeholder with one complete OpenSSH public key (up to 8,192 characters). Accepted types are Ed25519, ECDSA P-256/P-384/P-521, `,_jsx(_components.code,{children:`sk-ssh-ed25519@openssh.com`}),`, `,_jsx(_components.code,{children:`sk-ecdsa-sha2-nistp256@openssh.com`}),`, and RSA with at least 2,048 bits. Then send the file:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.hivecompute.ai/v1/ssh-keys\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HIVENET_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @ssh-key.json`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`A successful registration returns `,_jsx(_components.code,{children:`201 Created`}),` with `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`content`}),`, and `,_jsx(_components.code,{children:`created_at`}),`. `,_jsx(_components.code,{children:`id`}),` is a UUID. `,_jsx(_components.code,{children:`created_at`}),` is a date-time string or `,_jsx(_components.code,{children:`null`}),`. Save the ID so you can `,_jsx(_components.a,{href:`/public-api/endpoints/get-ssh-key`,children:`retrieve the key`}),`.`]}),`\n`,_jsx(_components.p,{children:`Registering the same key again creates another record with a new ID. It does not return the existing ID or a duplicate-key conflict. A trailing newline is preserved.`}),`\n`,_jsx(Heading,{level:`2`,id:`validation-and-scope`,children:`Validation and scope`}),`\n`,_jsxs(_components.p,{children:[`Invalid key content returns `,_jsx(_components.code,{children:`400`}),`. Rejected inputs include malformed keys, RSA keys shorter than 2048 bits, options prefixes such as `,_jsx(_components.code,{children:`no-pty`}),`, SSH certificates, and multiple key lines.`]}),`\n`,_jsxs(_components.p,{children:[`A missing or invalid API key returns `,_jsx(_components.code,{children:`401`}),`. Account restrictions can return `,_jsx(_components.code,{children:`403`}),`, throttling returns `,_jsx(_components.code,{children:`429`}),`, and a server error returns `,_jsx(_components.code,{children:`500`}),`.`]}),`\n`,_jsx(_components.p,{children:`This API supports registration and retrieval by ID. Key listing, deletion, names, and fingerprints are not available in this release.`}),`\n`,_jsxs(_components.p,{children:[`Use the key with the `,_jsx(_components.a,{href:`/public-api/create-an-instance-using-the-compute-api`,children:`instance creation workflow`}),`. For authentication and throttling errors, see `,_jsx(_components.a,{href:`/public-api/handle-errors-and-rate-limits`,children:`Handle errors and rate limits`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Register SSH key","sidebarTitle":"Register SSH key","openapi":"public-v1.yaml POST /ssh-keys","authMethod":"bearer","playground":"none","keywords":["Compute API","Register SSH key"],"description":"Adds a public key to your account. Instances you create after this\ncall get this key. Instances that already exist keep the key they were\ncreated with. Registering the same public key again creates a new ID.\nA trailing newline is accepted and preserved.\n\nThe key must be one OpenSSH public key line, for example the content\nof `~/.ssh/id_ed25519.pub`, with no `authorized_keys` options in front\nof it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types\n`sk-ssh-ed25519@openssh.com` and `sk-ecdsa-sha2-nistp256@openssh.com`,\nand RSA keys of 2048 bits or more are accepted. Other key types,\ncertificates, and RSA keys shorter than 2048 bits get `400`.\n","href":"/public-api/endpoints/register-ssh-key"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Validation and scope","slug":"validation-and-scope","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createSshKey","tags":["SSH keys"],"summary":"Register an SSH key","description":"Adds a public key to your account. Instances you create after this\ncall get this key. Instances that already exist keep the key they were\ncreated with. Registering the same public key again creates a new ID.\nA trailing newline is accepted and preserved.\n\nThe key must be one OpenSSH public key line, for example the content\nof `~/.ssh/id_ed25519.pub`, with no `authorized_keys` options in front\nof it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types\n`sk-ssh-ed25519@openssh.com` and `sk-ecdsa-sha2-nistp256@openssh.com`,\nand RSA keys of 2048 bits or more are accepted. Other key types,\ncertificates, and RSA keys shorter than 2048 bits get `400`.\n","requestBody":"1d284c05-ff29-4ea2-b2db-7ac18a6f5718","responses":{"201":"f5201b23-19a4-4bad-ba19-f31e77025507","400":"8128c539-4547-433a-ac48-86359803887f","401":"8615c037-ba70-4778-a587-8f57f54c8feb","403":"8bd87a58-a131-4bea-8c9c-a77125d5e364","429":"b8b5715a-30a2-45e6-88be-22533636bcbd","500":"e9ba7574-5f6f-455f-9cfe-38356ab3a14b"},"method":"post","type":"path","servers":["6caf56be-55c7-4e22-a446-a406b56f9a76","c91fc2cb-eacb-4ba8-a73d-6792a349e798"],"security":["35ddbe93-e56c-4863-a1dd-299bb31f55de"],"path":"/ssh-keys","baseUrlOptions":["https://api.hivecompute.ai/v1","https://staging-api.hivecompute.ai/v1"],"title":"Register an SSH key","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","urlDisplay":"full"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","maxLength":8192,"description":"The public key, in OpenSSH format.","example":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETCectK27yhdmuct8RFCynCjeWek5/ShKk6ISJZFSx+ you@laptop","isRequired":true,"uniqueKey":"content","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"content":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETCectK27yhdmuct8RFCynCjeWek5/ShKk6ISJZFSx+ you@laptop"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"f5201b23-19a4-4bad-ba19-f31e77025507":{"description":"The key was registered.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"id","typeLabel":"string\u003cuuid>"},"content":{"type":"string","description":"The public key, as registered.","uniqueKey":"content","typeLabel":"string"},"created_at":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"created_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"created_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"created_at","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","content":"\u003cstring>","created_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"8128c539-4547-433a-ac48-86359803887f":{"description":"The request was malformed or a parameter was invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","CONFLICT","TOO_MANY_REQUESTS","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"description":"Stable, machine-readable error code.","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Do not match on this text.","uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Identifies this request in our logs. Quote it to support.","uniqueKey":"error.request_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"VALIDATION_ERROR","message":"[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"VALIDATION_ERROR","message":"[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8615c037-ba70-4778-a587-8f57f54c8feb":{"description":"The API key is missing, malformed or not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","CONFLICT","TOO_MANY_REQUESTS","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"description":"Stable, machine-readable error code.","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Do not match on this text.","uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Identifies this request in our logs. Quote it to support.","uniqueKey":"error.request_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"UNAUTHORIZED","message":"Missing API token","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","message":"Missing API token","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8bd87a58-a131-4bea-8c9c-a77125d5e364":{"description":"Your account cannot use the API now, for example because it is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","CONFLICT","TOO_MANY_REQUESTS","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"description":"Stable, machine-readable error code.","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Do not match on this text.","uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Identifies this request in our logs. Quote it to support.","uniqueKey":"error.request_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"FORBIDDEN","message":"You do not have access to this resource.","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"FORBIDDEN","message":"You do not have access to this resource.","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}},"exampleType":"examples"}},"exampleType":"examples"},"b8b5715a-30a2-45e6-88be-22533636bcbd":{"description":"Too many requests. Wait the number of seconds given in `Retry-After`\nbefore retrying.\n","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","CONFLICT","TOO_MANY_REQUESTS","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"description":"Stable, machine-readable error code.","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Do not match on this text.","uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Identifies this request in our logs. Quote it to support.","uniqueKey":"error.request_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"TOO_MANY_REQUESTS","message":"Too Many Requests","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"TOO_MANY_REQUESTS","message":"Too Many Requests","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}},"exampleType":"examples"}},"exampleType":"examples"},"e9ba7574-5f6f-455f-9cfe-38356ab3a14b":{"description":"Something went wrong on our side. Retry, then contact support with the\n`request_id`.\n\nThe `message` is deliberately generic and carries no detail about the\ncause. Quote the `request_id`, which identifies the underlying error in\nour logs.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","VALIDATION_ERROR","CONFLICT","TOO_MANY_REQUESTS","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"description":"Stable, machine-readable error code.","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Do not match on this text.","uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Identifies this request in our logs. Quote it to support.","uniqueKey":"error.request_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"INTERNAL_ERROR","message":"An internal error occurred.","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"INTERNAL_ERROR","message":"An internal error occurred.","request_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"35ddbe93-e56c-4863-a1dd-299bb31f55de":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key issued by Hive Compute support. See **Authentication**\nabove for how to request one.\n","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"6caf56be-55c7-4e22-a446-a406b56f9a76":{"url":"https://api.hivecompute.ai/v1","description":"Production"},"c91fc2cb-eacb-4ba8-a73d-6792a349e798":{"url":"https://staging-api.hivecompute.ai/v1","description":"Staging"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key issued by Hive Compute support. See **Authentication**\nabove for how to request one.\n","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key issued by Hive Compute support. See **Authentication**\nabove for how to request one.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"public-v1.yaml"},"subdomain":"hivenet","siteName":"Hivenet Docs","title":"Register SSH key - Hivenet Docs","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T14:57:34.961Z","originalFileLocation":"public-api/endpoints/register-ssh-key.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Adds a public key to your account. Instances you create after this call get this key. Instances that already exist keep the key they were created with. Registering the same public key again creates a new ID. A trailing newline is accepted and preserved. The key must be one OpenSSH public key line, for example the content of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com, and RSA keys of 2048 bits or more are accepted. Other key types, certificates, and RSA keys shorter than 2048 bits get 400.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hivenet Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Register SSH key - Hivenet Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adds a public key to your account. Instances you create after this call get this key. Instances that already exist keep the key they were created with. Registering the same public key again creates a new ID. A trailing newline is accepted and preserved. The key must be one OpenSSH public key line, for example the content of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com, and RSA keys of 2048 bits or more are accepted. Other key types, certificates, and RSA keys shorter than 2048 bits get 400.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hivenet Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hivenet.mintlify.site/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Register+SSH+key\u0026amp;description=Adds+a+public+key+to+your+account.+Instances+you+create+after+this%0Acall+get+this+key.+Instances+that+already+exist+keep+the+key+they+were%0Acreated+with.+Register\u0026amp;theme=072b658adc15a34810fb37fc\u0026amp;signature=08983a749b6de11fec7135829bdf779a015cba6abbc1a3b5cef915519e7d0fa2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Register SSH key - Hivenet Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adds a public key to your account. Instances you create after this call get this key. Instances that already exist keep the key they were created with. Registering the same public key again creates a new ID. A trailing newline is accepted and preserved. The key must be one OpenSSH public key line, for example the content of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com, and RSA keys of 2048 bits or more are accepted. Other key types, certificates, and RSA keys shorter than 2048 bits get 400.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hivenet.mintlify.site/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Register+SSH+key\u0026amp;description=Adds+a+public+key+to+your+account.+Instances+you+create+after+this%0Acall+get+this+key.+Instances+that+already+exist+keep+the+key+they+were%0Acreated+with.+Register\u0026amp;theme=072b658adc15a34810fb37fc\u0026amp;signature=08983a749b6de11fec7135829bdf779a015cba6abbc1a3b5cef915519e7d0fa2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/hivenet/dBFcnj6sz1puistJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hivenet Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#D46E35\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/public-api/endpoints/register-ssh-key.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hivenet.com/#organization\",\"name\":\"Hivenet Docs\",\"url\":\"https://docs.hivenet.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hivenet/TWEg6sSBW1tiOeI2/logo/hivenet-logo-color-light.svg?fit=max\u0026auto=format\u0026n=TWEg6sSBW1tiOeI2\u0026q=85\u0026s=4fc5fd5b28244278713ed9ad46ba2e31\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hivenet.com#website\",\"name\":\"Hivenet Docs\",\"url\":\"https://docs.hivenet.com\",\"publisher\":{\"@id\":\"https://docs.hivenet.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key#webpage\",\"url\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key\",\"name\":\"Register SSH key\",\"description\":\"Adds a public key to your account. Instances you create after this call get this key. Instances that already exist keep the key they were created with. Registering the same public key again creates a new ID. A trailing newline is accepted and preserved. The key must be one OpenSSH public key line, for example the content of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com, and RSA keys of 2048 bits or more are accepted. Other key types, certificates, and RSA keys shorter than 2048 bits get 400.\",\"dateModified\":\"2026-11-24T14:57:34.961Z\",\"isPartOf\":{\"@id\":\"https://docs.hivenet.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.hivenet.com/public-api/endpoints/list-instances\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Register SSH key\",\"item\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key#apireference\",\"headline\":\"Register SSH key\",\"name\":\"Register SSH key\",\"description\":\"Adds a public key to your account. Instances you create after this call get this key. Instances that already exist keep the key they were created with. Registering the same public key again creates a new ID. A trailing newline is accepted and preserved. The key must be one OpenSSH public key line, for example the content of ~/.ssh/id_ed25519.pub, with no authorized_keys options in front of it. Ed25519, ECDSA (P-256, P-384, P-521), the security-key types sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com, and RSA keys of 2048 bits or more are accepted. Other key types, certificates, and RSA keys shorter than 2048 bits get 400.\",\"url\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hivenet.com/public-api/endpoints/register-ssh-key#webpage\"},\"dateModified\":\"2026-11-24T14:57:34.961Z\",\"keywords\":\"Compute API, Register SSH key\",\"publisher\":{\"@id\":\"https://docs.hivenet.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hivenet.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hivenet Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Hivenet Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/public-api/endpoints/register-ssh-key.md","siteName":"Hivenet Docs","nav":{"global":{"anchors":[{"anchor":"Console","icon":"computer","href":"https://console.hivecompute.ai/"},{"anchor":"Help Center","icon":"book-open-cover","href":"https://help.hivenet.com/en/"},{"anchor":"Community","icon":"discord","href":"https://discord.com/invite/p2CwYSKsQU"},{"anchor":"Blog","icon":"newspaper","href":"https://compute.hivenet.com/computes-blog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Tutorials","pages":[{"title":"Tutorials","href":"/tutorials/how-to/configuration-image-generation"}]},{"tab":"Compute API","pages":[{"group":"Guides","pages":[{"title":"Get started with the Compute API","sidebarTitle":"Get started","href":"/public-api/get-started-with-the-compute-api"},{"title":"Make your first API request","sidebarTitle":"First API request","href":"/public-api/make-your-first-api-request"},{"title":"Authenticate API requests","sidebarTitle":"Authentication","href":"/public-api/authenticate-api-requests"},{"title":"Create an instance using the Compute API","sidebarTitle":"Create an instance","href":"/public-api/create-an-instance-using-the-compute-api"},{"title":"Work with instances","sidebarTitle":"Instances","href":"/public-api/work-with-instances"},{"title":"Use pagination and filters","sidebarTitle":"Pagination and filters","href":"/public-api/use-pagination-and-filters"},{"title":"Handle errors and rate limits","sidebarTitle":"Errors and rate limits","href":"/public-api/handle-errors-and-rate-limits"}]},{"group":"API reference","expanded":true,"pages":[{"title":"List instances","sidebarTitle":"List instances","openapi":"public-v1.yaml GET /instances","href":"/public-api/endpoints/list-instances"},{"title":"Get instance","sidebarTitle":"Get instance","openapi":"public-v1.yaml GET /instances/{id}","href":"/public-api/endpoints/get-instance"},{"title":"Get instance logs","openapi":"public-v1.yaml GET /instances/{id}/logs","href":"/public-api/endpoints/get-instance-logs"},{"title":"Get instance metrics","sidebarTitle":"Get instance metrics","openapi":"public-v1.yaml GET /instances/{id}/metrics","playground":"none","href":"/public-api/endpoints/get-instance-metrics"},{"title":"Start instance","openapi":"public-v1.yaml POST /instances/{id}/start","href":"/public-api/endpoints/start-instance"},{"title":"Stop instance","sidebarTitle":"Stop instance","openapi":"public-v1.yaml POST /instances/{id}/stop","href":"/public-api/endpoints/stop-instance"},{"title":"Terminate instance","openapi":"public-v1.yaml POST /instances/{id}/terminate","href":"/public-api/endpoints/terminate-instance"},{"title":"List regions","sidebarTitle":"List regions","openapi":"public-v1.yaml GET /regions","href":"/public-api/endpoints/list-regions"},{"title":"List presets","sidebarTitle":"List presets","openapi":"public-v1.yaml GET /presets","href":"/public-api/endpoints/list-presets"},{"title":"Create instance","sidebarTitle":"Create instance","openapi":"public-v1.yaml POST /instances","playground":"none","href":"/public-api/endpoints/create-instance"},{"title":"List images","sidebarTitle":"List images","openapi":"public-v1.yaml GET /images","playground":"none","description":"Returns the images of one type. Each item carries `type`, so you can\ngive its `id` and `type` together when you launch an instance.\n\n`type=vm` returns every virtual machine image available to your\naccount, in one page (Windows images are listed, but cannot be\ncreated through the API in this release): `pagination.next` is always `null`, `pagination.size` is\nthe number of images, and `cursor`, `size` and `mine=true` are refused.\nAn image is left out when no location your account can use allows its\noperating system family.\n\n`type=container` returns a cursor-paginated list. By default it is the\nHive catalogue. With `mine=true` it is the templates you saved\nyourself. Templates belong to one user, so a teammate's templates are\nnever listed.\n","href":"/public-api/endpoints/list-images"},{"title":"Register SSH key","sidebarTitle":"Register SSH key","openapi":"public-v1.yaml POST /ssh-keys","playground":"none","href":"/public-api/endpoints/register-ssh-key"},{"title":"Get SSH key","sidebarTitle":"Get SSH key","openapi":"public-v1.yaml GET /ssh-keys/{id}","playground":"none","description":"Returns one of your SSH keys. A key that belongs to another account\nanswers `404`, the same as a key that does not exist.\n","href":"/public-api/endpoints/get-ssh-key"},{"group":"Instances","pages":[{"title":"List your instances","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /instances","href":"/api-reference/instances/list-your-instances"},{"title":"Create an instance","deprecated":null,"version":null,"openapi":"/public-v1.yaml post /instances","href":"/api-reference/instances/create-an-instance"},{"title":"Get an instance","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /instances/{id}","href":"/api-reference/instances/get-an-instance"},{"title":"Read an instance's logs","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /instances/{id}/logs","href":"/api-reference/instances/read-an-instances-logs"},{"title":"Read an instance's metrics","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /instances/{id}/metrics","href":"/api-reference/instances/read-an-instances-metrics"},{"title":"Start an instance","deprecated":null,"version":null,"openapi":"/public-v1.yaml post /instances/{id}/start","href":"/api-reference/instances/start-an-instance"},{"title":"Stop an instance","deprecated":null,"version":null,"openapi":"/public-v1.yaml post /instances/{id}/stop","href":"/api-reference/instances/stop-an-instance"},{"title":"Terminate an instance","deprecated":null,"version":null,"openapi":"/public-v1.yaml post /instances/{id}/terminate","href":"/api-reference/instances/terminate-an-instance"}]},{"group":"Catalogue","pages":[{"title":"List regions","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /regions","href":"/api-reference/catalogue/list-regions"},{"title":"List hardware presets","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /presets","href":"/api-reference/catalogue/list-hardware-presets"}]},{"group":"Images","pages":[{"title":"List images","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /images","href":"/api-reference/images/list-images"}]},{"group":"SSH keys","pages":[{"title":"Register an SSH key","deprecated":null,"version":null,"openapi":"/public-v1.yaml post /ssh-keys","href":"/api-reference/ssh-keys/register-an-ssh-key"},{"title":"Get an SSH key","deprecated":null,"version":null,"openapi":"/public-v1.yaml get /ssh-keys/{id}","href":"/api-reference/ssh-keys/get-an-ssh-key"}]}]},{"title":"API changelog","sidebarTitle":"Changelog","href":"/public-api/api-changelog"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Register SSH key - Hivenet Docs","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CalkZbx8.js","snippetPresets-DtvvunBK.js","utils-Bn5byECU.js","style-to-object-BY3JEAdk.js","utils-DOTAoFcT.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CDauU9aU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k2aHAqp5.js","_Uint8Array-CQuRedKT.js","isObject-FP1Yky1u.js","Page-Dz3zehSO.js","api-description-markdown-DwoksVHI.js","DynamicMarkdown-XsrWkK-b.js","CodeSnippet-BBA8eWiP.js","SectionHeading-AR_EzDYe.js","ApiExamples-CSBS2nDe.js","usePlaygroundInputsStore-BkN7uKke.js","shallow-6IMgYiEa.js","isEqual-DicuCknl.js","CodeSnippets-C268fsRY.js","getApiPlaygroundDisplay-DMK5GRGS.js","MethodPill-CvOL8UTX.js","getPastedJson-BazkMjRw.js","Check2Icon-BL_xILK9.js","axios-CsQoIw0U.js","Markdown-CX8Sr5UZ.js","AssistantPageLink-B3VcLrB0.js","dist-WDJo6xkj.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}