> ## 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 Question Set

> ### Description
Creates a question set

### Details
This API can be used to create a question set. To use this API, review the request schema and pass in all fields that are required to create a question set.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/question-sets
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/question-sets:
    post:
      tags:
        - Question Sets
      summary: Create Question Set
      description: >-
        ### Description

        Creates a question set


        ### Details

        This API can be used to create a question set. To use this API, review
        the request schema and pass in all fields that are required to create a
        question set.
      operationId: POST-V4-/question-sets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionSetRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionSetResponse'
        '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
            )
            question_set = client.question_sets.create(
                account_id="account_id",
                name="name",
                question_ids=["string"],
            )
            print(question_set.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\tquestionSet, err := client.QuestionSets.New(context.TODO(), sgp.QuestionSetNewParams{\n\t\tAccountID:   sgp.F(\"account_id\"),\n\t\tName:        sgp.F(\"name\"),\n\t\tQuestionIDs: sgp.F([]string{\"string\"}),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", questionSet.ID)\n}\n"
components:
  schemas:
    QuestionSetRequest:
      properties:
        name:
          type: string
          title: Name
        question_id_to_config:
          title: Question Id To Config
          description: >-
            Specifies additional configurations to use for specific questions in
            the context of the question set. For example, `{<question_a_id>:
            {required: true}, <question_b_id>: {required: true}}` sets two
            questions as required.
          can_patch: false
          additionalProperties:
            $ref: '#/components/schemas/QuestionSetQuestionConfig'
          type: object
        instructions:
          title: Instructions
          description: Instructions to answer questions
          type: string
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        question_ids:
          title: Question Ids
          description: IDs of questions in the question set
          items:
            type: string
          type: array
      type: object
      required:
        - name
        - account_id
        - question_ids
      title: QuestionSetRequest
    QuestionSetResponse:
      properties:
        name:
          type: string
          title: Name
        question_id_to_config:
          title: Question Id To Config
          description: >-
            Specifies additional configurations to use for specific questions in
            the context of the question set. For example, `{<question_a_id>:
            {required: true}, <question_b_id>: {required: true}}` sets two
            questions as required.
          can_patch: false
          additionalProperties:
            $ref: '#/components/schemas/QuestionSetQuestionConfig'
          type: object
        instructions:
          title: Instructions
          description: Instructions to answer questions
          type: string
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        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.
        archived_at:
          title: Archived At
          description: The date and time when the entity was archived in ISO format.
          type: string
          format: date-time
      type: object
      required:
        - name
        - id
        - created_at
        - account_id
        - created_by_user_id
        - created_by_identity_type
      title: QuestionSetResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuestionSetQuestionConfig:
      properties:
        required:
          title: Required
          description: Whether the question is required. False by default.
          default: false
          type: boolean
      type: object
      title: QuestionSetQuestionConfig
    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

````