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

# Get a Project

> Retrieve a [Project](/core-resources/project) from its `project_id` or `project_name`.

<Accordion title="Authentication" icon="key">
  Every request sent to Scale's API requires authentication. In short, your API Key is the Bearer token. See the [Authentication](/get-started/authentication) section for more details.
</Accordion>

<Tip>
  ### Required query parameters

  You are expected to provide one of the following:

  * **Project ID** (`project_id`)
  * **Project Name** (`project_name`)
</Tip>


## OpenAPI

````yaml GET /v2/project
openapi: 3.1.0
info:
  title: GenAI API Spec
  description: 'Data Engine: Generative AI API Specification'
  version: 0.0.1
servers:
  - url: https://api.scale.com
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /v2/project:
    get:
      tags:
        - v2
      summary: Get a Project
      description: >-
        Retrieve a [Project](/core-resources/project) from its `project_id` or
        `project_name`.
      operationId: getProject
      parameters:
        - $ref: '#/components/parameters/project_id'
        - $ref: '#/components/parameters/project_name'
      responses:
        '200':
          description: Project details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
              examples:
                Sample Project:
                  $ref: '#/components/examples/SampleProject'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_code:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: An error has occurred.
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            API_KEY='live_...'
            PROJECT_ID='project_123'
            curl --request GET \
                --url "https://api.scale.com/v2/project?project_id=$PROJECT_ID" \
                --header "Authorization: Bearer $API_KEY"
        - lang: python
          label: Python SDK
          source: |
            import scaleapi

            API_KEY = 'live_...'
            client = scaleapi.ScaleClient(API_KEY)

            PROJECT_ID = 'project_123'
            response = client.v2.get_project(PROJECT_ID)
            print(response.to_json())
        - lang: python
          label: Python
          source: |
            import requests

            API_KEY = 'live_...'
            PROJECT_ID = 'project_123'

            response = requests.request(
              "GET",
              url="https://api.scale.com/v2/project",
              params={"project_id": PROJECT_ID},
              headers={
                "Accept": "application/json",
                "Authorization": f"Bearer {API_KEY}",
              },
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >
            const API_KEY = 'live_...';

            const PROJECT_ID = 'project_123';


            const params = new URLSearchParams({ project_id: PROJECT_ID });


            const response = await fetch('https://api.scale.com/v2/project?' +
            params.toString(), {
              method: 'GET',
              headers: {
                Accept: 'application/json',
                Authorization: `Bearer ${API_KEY}`,
              },
            });

            console.log(await response.json());
        - lang: go
          label: Go
          source: |
            package main

            import (
              "fmt"

              "io/ioutil"
              "net/http"
            )

            func main() {
              apiKey := "live_..."
              projectId := "project_123"

              url := fmt.Sprintf("https://api.scale.com/v2/project?project_id=%s", projectId)

              req, _ := http.NewRequest("GET", url, nil)

              req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", apiKey))

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(string(body))
            }
        - lang: java
          label: Java
          source: |
            package com.scale.api;

            import kong.unirest.HttpResponse;
            import kong.unirest.Unirest;

            public class App {
                public static void main(String[] args) {
                    String apiKey = "live_...";
                    String projectId = "project_123";

                    String url = String.format("https://api.scale.com/v2/project?project_id=%s", projectId);

                    HttpResponse<String> response = Unirest.get(url)
                      .header("Authorization", String.format("Bearer %s", apiKey))
                      .asString();

                    System.out.println(response.getBody());
                }
            }
components:
  parameters:
    project_id:
      name: project_id
      in: query
      required: false
      description: Scale's unique identifier for the project.
      schema:
        $ref: '#/components/schemas/ProjectId'
    project_name:
      name: project_name
      in: query
      required: false
      description: The name of the project.
      schema:
        $ref: '#/components/schemas/ProjectName'
  schemas:
    Project:
      type: object
      required:
        - id
        - name
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/ProjectId'
          description: Unique identifier for the project
        name:
          $ref: '#/components/schemas/ProjectName'
        created_at:
          $ref: '#/components/schemas/DateString'
        types:
          type: array
          description: List of project types associated with the project.
          items:
            $ref: '#/components/schemas/GenAIProjectType'
          example:
            - 'RLHF: Pref Ranking'
        models:
          type: array
          description: List of models associated with the project.
          items:
            $ref: '#/components/schemas/Model'
          example:
            - gpt-4
            - my-model-123
    ProjectId:
      type: string
      description: A unique identifier for the project.
      example: project_abc123
    ProjectName:
      type: string
      description: The name of the project.
      example: My Scale Project
    DateString:
      type: string
      format: date-time
      description: A timestamp formatted as an ISO 8601 date-time string.
    GenAIProjectType:
      type: string
      enum:
        - SFT
        - 'RLHF: Pref Ranking'
        - 'RLHF: Pref Ranking with Rewrites'
        - 'RLVR: Reinforcement Learning with Verifiable Rewards'
        - Rubrics
        - Process Supervision
        - Evals
        - Prompt Generation
        - Content Understanding
        - Other
    Model:
      type: string
      description: The name of the model that generated the message.
      example: my-model-123
  examples:
    SampleProject:
      value:
        id: project_123
        name: Project Name Example
        types:
          - 'RLHF: Pref Ranking with Rewrites'
        created_at: '2022-07-25T07:32:34.318Z'
        models:
          - gpt-4
          - my-model-123
  securitySchemes:
    bearerAuth:
      description: >-
        Your API Key is the Bearer token. See the
        [Authentication](/get-started/authentication) section to learn how to
        access your key.
      type: http
      scheme: bearer
    basicAuth:
      description: >-
        Basic HTTP Authentication. Your API Key is your username.  Learn more
        about setting up Authentication [here](/get-started/authentication).
      type: http
      scheme: basic

````