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

# Get API key identity

> Returns identity information about the authenticated API key. Useful for confirming which project and organization a key is scoped to, and for obtaining the project slug used to compose the `model` value (`<project_slug>/<endpoint_slug>`) in dedicated endpoint inference calls.
Requires a Bearer API key in the `Authorization` header. Cookie, session, and SLS JWT credentials are not accepted.




## OpenAPI

````yaml GET /whoami
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
security:
  - bearerAuth: []
paths:
  /whoami:
    get:
      tags:
        - Account
      summary: Get API key identity
      description: >
        Returns identity information about the authenticated API key. Useful for
        confirming which project and organization a key is scoped to, and for
        obtaining the project slug used to compose the `model` value
        (`<project_slug>/<endpoint_slug>`) in dedicated endpoint inference
        calls.

        Requires a Bearer API key in the `Authorization` header. Cookie,
        session, and SLS JWT credentials are not accepted.
      operationId: whoami
      responses:
        '200':
          description: API key identity information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoamiResponse'
        '401':
          description: Unauthorized — missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
      x-codeSamples:
        - lang: Python
          label: Together AI SDK (v2)
          source: |
            from together import Together

            client = Together()
            identity = client.whoami()
            print(identity)
        - lang: TypeScript
          label: Together AI SDK (TypeScript)
          source: |
            import Together from "together-ai";

            const client = new Together();
            const identity = await client.whoami();
            console.log(identity);
        - lang: JavaScript
          label: Together AI SDK (JavaScript)
          source: |
            import Together from "together-ai";

            const client = new Together();
            const identity = await client.whoami();
            console.log(identity);
        - lang: Shell
          label: cURL
          source: |
            curl https://api.together.ai/v1/whoami \
                 -H "Authorization: Bearer $TOGETHER_API_KEY"
components:
  schemas:
    WhoamiResponse:
      type: object
      required:
        - api_key_id
        - project_id
        - project_name
        - project_slug
        - organization_id
        - organization_name
      properties:
        api_key_id:
          type: string
          description: The ID of the API key that authenticated the request.
        project_id:
          type: string
          description: The ID of the project the API key is scoped to.
        project_name:
          type: string
          description: Human-readable name of the project.
        project_slug:
          type: string
          description: >
            DNS-friendly project identifier. Used with an endpoint slug as
            `<project_slug>/<endpoint_slug>` to form the `model` value in
            dedicated endpoint inference calls.
        organization_id:
          type: string
          description: The ID of the organization that owns the project.
        organization_name:
          type: string
          description: Human-readable name of the organization.
    ErrorData:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
            - type
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````