> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livepeer.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a signing key

> The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and  the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs.
Up to 10 signing keys can be generated, after that you must delete at least one signing key to create a new one.




## OpenAPI

````yaml POST /access-control/signing-key
openapi: 3.1.0
info:
  title: Livepeer API Reference
  description: |
    Welcome to the Livepeer API reference docs. Here you will find all the
    endpoints exposed on the standard Livepeer API, learn how to use them and
    what they return.
  version: 1.0.0
servers:
  - url: https://livepeer.studio/api
security:
  - apiKey: []
tags:
  - name: stream
    description: Operations related to livestream api
  - name: asset
    description: Operations related to asset/vod api
  - name: webhook
    description: Operations related to webhook api
  - name: multistream
    description: Operations related to multistream api
  - name: session
    description: Operations related to session api
  - name: room
    description: Operations related to rooms api
  - name: transcode
    description: Operations related to transcode api
  - name: metrics
    description: Operations related to metrics api
  - name: playback
    description: Operations related to playback api
  - name: accessControl
    description: Operations related to access control/signing keys api
  - name: task
    description: Operations related to tasks api
  - name: generate
    description: Operations related to AI generate api
paths:
  /access-control/signing-key:
    post:
      tags:
        - accessControl
      summary: Create a signing key
      description: >
        The publicKey is a representation of the public key, encoded as base 64
        and is passed as a string, and  the privateKey is displayed only on
        creation. This is the only moment where the client can save the private
        key, otherwise it will be lost. Remember to decode your string when
        signing JWTs.

        Up to 10 signing keys can be generated, after that you must delete at
        least one signing key to create a new one.
      operationId: createSigningKey
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/signing-key'
                x-speakeasy-name-override: data
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-codeSamples:
        - lang: typescript
          label: createSigningKey
          source: |-
            import { Livepeer } from "livepeer";

            const livepeer = new Livepeer({
              apiKey: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await livepeer.accessControl.create();

              // Handle the result
              console.log(result);
            }

            run();
        - lang: go
          label: createSigningKey
          source: "package main\n\nimport(\n\tlivepeergo \"github.com/livepeer/livepeer-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n    s := livepeergo.New(\n        livepeergo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n    )\n\n    ctx := context.Background()\n    res, err := s.AccessControl.Create(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.SigningKey != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: createSigningKey
          source: |-
            from livepeer import Livepeer

            s = Livepeer(
                api_key="<YOUR_BEARER_TOKEN_HERE>",
            )

            res = s.access_control.create()

            if res.signing_key is not None:
                # handle response
                pass
components:
  schemas:
    signing-key:
      type: object
      additionalProperties: false
      required:
        - publicKey
      properties:
        id:
          type: string
          readOnly: true
          example: 78df0075-b5f3-4683-a618-1086faca35dc
        name:
          type: string
          description: Name of the signing key
          example: key1
        userId:
          type: string
          readOnly: true
          example: 78df0075-b5f3-4683-a618-1086faca35dc
          deprecated: true
        createdAt:
          readOnly: true
          type: number
          description: Timestamp (in milliseconds) at which the signing-key was created
          example: 1587667174725
        lastSeen:
          readOnly: true
          type: number
          description: Timestamp (in milliseconds) at which the signing-key was last used
          example: 1587667174725
        publicKey:
          type: string
        disabled:
          type: boolean
          description: Disable the signing key to allow rotation safely
          example: false
        projectId:
          type: string
          description: The ID of the project
          example: aac12556-4d65-4d34-9fb
    error:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: string
            example:
              - id not provided
              - Account not found
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````