NovelAI /user/ API

The /user/ API from NovelAI — 28 operation(s) for /user/.

OpenAPI Specification

novelai-user-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: NovelAI Primary /ai/ /ai/ /user/ API
  description: "\n      The Primary API describes actions that our Frontend makes against the NovelAI backend.\n\n      In general, third-party NovelAI API users should not engage with the Primary API beyond the /ai/ routes.\n\n      Third-party API users developing user-facing applications must ask for a user's Persistent API token to continue.\n      For security reasons it is not recommended to hold a user's credentials in plaintext.\n\n      IMPORTANT: Existing and new API users must read the upcoming generation-specific documentation:\n\n      Image Generation documentation: https://image.novelai.net/docs/index.html\n      Text Generation documentation: https://text.novelai.net/docs/index.html\n    "
  version: '1.0'
  contact: {}
servers:
- url: https://api.novelai.net
  description: NovelAI Primary API
tags:
- name: /user/
paths:
  /user/register:
    post:
      operationId: UserController_createUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '201':
          description: The user has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/login:
    post:
      operationId: UserController_loginUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
      responses:
        '201':
          description: Login successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessfulLoginResponse'
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Key is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/change-access-key:
    post:
      operationId: UserController_changeAccessKey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeAccessKeyRequest'
      responses:
        '200':
          description: Access Key change successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessfulLoginResponse'
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/sso/google:
    post:
      operationId: UserController_ssoGoogle
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleSSORequest'
      responses:
        '201':
          description: Login successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessfulLoginResponse'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/change-mailing-list-consent:
    patch:
      operationId: UserController_changeMailingListConsent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeMailingListRequest'
      responses:
        '200':
          description: ''
        '204':
          description: Update successful.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/resend-email-verification:
    post:
      operationId: UserController_requestEmailVerification
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailVerificationStartRequest'
      responses:
        '201':
          description: Email verification letter has been sent.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/verify-email:
    post:
      operationId: UserController_verifyEmail
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailVerificationRequest'
      responses:
        '200':
          description: The email has been successfully verified.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Verification token was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/information:
    get:
      operationId: UserController_getAccountInformation
      parameters: []
      responses:
        '200':
          description: Account information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInformationResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/osano-external-id:
    get:
      operationId: UserController_getOsanoExternalId
      parameters: []
      responses:
        '200':
          description: Osano External ID for this user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OsanoExternalIdResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/consent:
    put:
      operationId: UserController_upsertUserConsent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertConsentRequest'
      responses:
        '200':
          description: Consent settings have been updated.
        '400':
          description: A validation error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/deletion/request:
    post:
      operationId: UserController_requestAccountDeletion
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletionStartRequest'
      responses:
        '202':
          description: Your request has been processed. If the email address provided is registered, it will receive a letter with further instructions.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Cannot delete accounts with active recurring subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/deletion/delete:
    post:
      operationId: UserController_deleteAccount
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletionFinishRequest'
      responses:
        '200':
          description: Account deletion successful.
        '401':
          description: Deletion token was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Cannot delete accounts with active recurring subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/recovery/request:
    post:
      operationId: UserController_requestAccountRecovery
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecoveryStartRequest'
      responses:
        '202':
          description: Your request has been processed. If the email address provided is registered, it will receive a letter with further instructions.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/recovery/recover:
    post:
      operationId: UserController_recoverAccount
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecoveryFinishRequest'
      responses:
        '201':
          description: Account recovery successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessfulLoginResponse'
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Recovery token was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
  /user/delete:
    post:
      operationId: UserController_deleteAccountUnchecked
      parameters: []
      responses:
        '200':
          description: Account deletion successful.
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Cannot delete accounts with active recurring subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/data:
    get:
      operationId: UserController_getUserData
      parameters: []
      responses:
        '200':
          description: Various user information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAccountDataResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/priority:
    get:
      operationId: UserController_getCurrentPriority
      parameters: []
      responses:
        '200':
          description: Amount of max priority actions left, next max priority action refill (UNIX timestamp) and current task priority.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriorityResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/giftkeys:
    get:
      operationId: UserController_getGiftKeys
      parameters: []
      responses:
        '200':
          description: Purchased Gift Keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GiftKeysResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/subscription:
    get:
      operationId: UserController_getSubscription
      parameters: []
      responses:
        '200':
          description: Current subscription, date of expiry and perks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/keystore:
    get:
      operationId: UserController_getKeystore
      parameters: []
      responses:
        '200':
          description: Keystore buffer in Base64 format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKeystoreResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
    put:
      operationId: UserController_updateKeystore
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateKeystoreRequest'
      responses:
        '200':
          description: Edit is successful.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/objects/{type}:
    get:
      operationId: UserController_getObjects
      parameters:
      - name: type
        required: true
        in: path
        schema:
          type: string
      - name: offset
        required: true
        in: query
        schema:
          type: number
      - name: limit
        required: true
        in: query
        schema:
          type: number
      - name: order
        required: true
        in: query
        schema:
          type: string
      responses:
        '200':
          description: List of serverside-stored objects of that type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectsResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
    put:
      operationId: UserController_createObject
      parameters:
      - name: type
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDataInput'
      responses:
        '200':
          description: Object created successfully.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Specified object was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/objects/{type}/{id}:
    get:
      operationId: UserController_getObject
      parameters:
      - name: type
        required: true
        in: path
        schema:
          type: string
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Found object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserData'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
    patch:
      operationId: UserController_editObject
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: type
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDataInput'
      responses:
        '200':
          description: Object edited successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserData'
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Specified object was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: A conflict occured while updating this object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
    delete:
      operationId: UserController_deleteObject
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: type
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Object deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserData'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Specified object was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/clientsettings:
    get:
      operationId: UserController_getClientSettings
      parameters: []
      responses:
        '200':
          description: Client settings in an arbitrary format.
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
    put:
      operationId: UserController_updateClientSettings
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: string
      responses:
        '200':
          description: Edit is successful.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/objects/batch:
    delete:
      operationId: UserController_batchDeleteObjects
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDeleteRequest'
      responses:
        '200':
          description: Specified object types have been successfully deleted.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/create-persistent-token:
    post:
      operationId: UserController_createPersistentToken
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePersistentTokenInput'
      responses:
        '200':
          description: Token created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePersistentTokenResponse'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePersistentTokenResponse'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/submission:
    post:
      operationId: UserController_postUserSubmission
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSubmissionInput'
      responses:
        '200':
          description: Submission is successful.
        '400':
          description: A validation error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/submission/{event}:
    get:
      operationId: UserController_getUserSubmission
      parameters:
      - name: event
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: User submission
        '401':
          description: Access Token is incorrect.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: An unknown error occured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      tags:
      - /user/
      security:
      - bearer: []
  /user/vote-submission/{event}:
    get:
      operationId: UserContro

# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/novelai/refs/heads/main/openapi/novelai-user-api-openapi.yml