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

# Create Theme

> ### Description
Custom chat themes



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/themes
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/themes:
    post:
      tags:
        - Chat Themes
      summary: Create Theme
      description: |-
        ### Description
        Custom chat themes
      operationId: POST-V4-/themes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from scale_gp import SGPClient

            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )
            theme = client.themes.create(
                account_id="account_id",
                logo_blob="logo_blob",
                theme_vars={},
                title="title",
            )
            print(theme.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttheme, err := client.Themes.New(context.TODO(), sgp.ThemeNewParams{\n\t\tAccountID: sgp.F(\"account_id\"),\n\t\tLogoBlob:  sgp.F(\"logo_blob\"),\n\t\tThemeVars: sgp.F(sgp.ThemeNewParamsThemeVars{}),\n\t\tTitle:     sgp.F(\"title\"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", theme.ID)\n}\n"
components:
  schemas:
    ThemeRequest:
      properties:
        title:
          type: string
          title: Title
        theme_vars:
          $ref: '#/components/schemas/ThemeVars'
        logo_blob:
          type: string
          title: Logo Blob
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
      type: object
      required:
        - title
        - theme_vars
        - logo_blob
        - account_id
      title: ThemeRequest
    ThemeResponse:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        theme_vars:
          $ref: '#/components/schemas/ThemeVars'
        logo_blob:
          type: string
          title: Logo Blob
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        archived_at:
          title: Archived At
          description: The date and time when the entity was archived in ISO format.
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date and time when the entity was last updated in ISO format.
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
      type: object
      required:
        - id
        - title
        - theme_vars
        - logo_blob
        - created_at
        - updated_at
        - created_by_user_id
        - created_by_identity_type
        - account_id
      title: ThemeResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ThemeVars:
      properties:
        accentPrimary:
          type: string
          title: Accentprimary
        accentSecondary:
          type: string
          title: Accentsecondary
        background:
          type: string
          title: Background
        foreground:
          type: string
          title: Foreground
      type: object
      title: ThemeVars
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````