openapi: 3.1.0 info: title: LangSmith access_policies repos API description: 'The LangSmith API is used to programmatically create and manage LangSmith resources. ## Host https://api.smith.langchain.com ## Authentication To authenticate with the LangSmith API, set the `X-Api-Key` header to a valid [LangSmith API key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key). ' version: 0.1.0 servers: - url: / tags: - name: repos paths: /api/v1/repos: get: tags: - repos summary: List Repos description: Get all repos. operationId: list_repos_api_v1_repos_get security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: with_latest_manifest in: query required: false schema: type: boolean default: false title: With Latest Manifest - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 20 title: Limit - name: offset in: query required: false schema: type: integer minimum: 0 default: 0 title: Offset - name: tenant_handle in: query required: false schema: anyOf: - type: string - type: 'null' title: Tenant Handle - name: tenant_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Tenant Id - name: query in: query required: false schema: anyOf: - type: string - type: 'null' title: Query - name: has_commits in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Has Commits - name: tags in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' title: Tags - name: is_archived in: query required: false schema: anyOf: - enum: - 'true' - allow - 'false' type: string - type: 'null' title: Is Archived - name: is_public in: query required: false schema: anyOf: - $ref: '#/components/schemas/TrueFalseLiteral' - type: 'null' title: Is Public - name: upstream_repo_owner in: query required: false schema: anyOf: - type: string - type: 'null' title: Upstream Repo Owner - name: upstream_repo_handle in: query required: false schema: anyOf: - type: string - type: 'null' title: Upstream Repo Handle - name: tag_value_id in: query required: false schema: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Tag Value Id - name: repo_type in: query required: false schema: anyOf: - enum: - prompt - file - agent - skill type: string - type: 'null' title: Repo Type - name: repo_types in: query required: false schema: anyOf: - type: array items: enum: - prompt - file - agent - skill type: string - type: 'null' title: Repo Types - name: sort_field in: query required: false schema: anyOf: - enum: - num_likes - num_downloads - num_views - updated_at - relevance type: string - type: 'null' title: Sort Field - name: sort_direction in: query required: false schema: anyOf: - const: asc type: string - const: desc type: string - type: 'null' title: Sort Direction responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListReposResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - repos summary: Create Repo description: Create a repo. operationId: create_repo_api_v1_repos_post security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateRepoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreateRepoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - repos summary: Delete Repos description: "Delete multiple repos with partial success support.\n\nReturns:\n - 200: All repos deleted successfully\n - 207: Some repos deleted successfully, some failed" operationId: delete_repos_api_v1_repos_delete security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: repo_ids in: query required: true schema: type: array items: type: string format: uuid maxItems: 100 title: Repo Ids responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/repos/{owner}/{repo}: get: tags: - repos summary: Get Repo description: Get a repo. operationId: get_repo_api_v1_repos__owner___repo__get security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: owner in: path required: true schema: type: string title: Owner - name: repo in: path required: true schema: type: string title: Repo responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/GetRepoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - repos summary: Update Repo description: Update a repo. operationId: update_repo_api_v1_repos__owner___repo__patch security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: owner in: path required: true schema: type: string title: Owner - name: repo in: path required: true schema: type: string title: Repo requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateRepoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreateRepoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - repos summary: Delete Repo description: Delete a repo. operationId: delete_repo_api_v1_repos__owner___repo__delete security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: owner in: path required: true schema: type: string title: Owner - name: repo in: path required: true schema: type: string title: Repo responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/repos/{owner}/{repo}/fork: post: tags: - repos summary: Fork Repo description: Fork a repo. operationId: fork_repo_api_v1_repos__owner___repo__fork_post security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: owner in: path required: true schema: type: string title: Owner - name: repo in: path required: true schema: type: string title: Repo requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ForkRepoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/GetRepoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/repos/tags: get: tags: - repos summary: List Repo Tags description: Get all repo tags. operationId: list_repo_tags_api_v1_repos_tags_get security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 20 title: Limit - name: offset in: query required: false schema: type: integer minimum: 0 default: 0 title: Offset - name: tenant_handle in: query required: false schema: anyOf: - type: string - type: 'null' title: Tenant Handle - name: tenant_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Tenant Id - name: query in: query required: false schema: anyOf: - type: string - type: 'null' title: Query - name: has_commits in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Has Commits - name: tags in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' title: Tags - name: is_archived in: query required: false schema: anyOf: - enum: - 'true' - allow - 'false' type: string - type: 'null' title: Is Archived - name: is_public in: query required: false schema: anyOf: - $ref: '#/components/schemas/TrueFalseLiteral' - type: 'null' title: Is Public - name: upstream_repo_owner in: query required: false schema: anyOf: - type: string - type: 'null' title: Upstream Repo Owner - name: upstream_repo_handle in: query required: false schema: anyOf: - type: string - type: 'null' title: Upstream Repo Handle - name: tag_value_id in: query required: false schema: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Tag Value Id - name: repo_type in: query required: false schema: anyOf: - enum: - prompt - file - agent - skill type: string - type: 'null' title: Repo Type - name: repo_types in: query required: false schema: anyOf: - type: array items: enum: - prompt - file - agent - skill type: string - type: 'null' title: Repo Types responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListTagsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/repos/optimize-job: post: tags: - repos summary: Optimize Prompt Job description: Optimize prompt operationId: optimize_prompt_job_api_v1_repos_optimize_job_post requestBody: content: application/json: schema: $ref: '#/components/schemas/OptimizePromptJobRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OptimizePromptResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - API Key: [] - Tenant ID: [] - Bearer Auth: [] components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ListTagsResponse: properties: tags: items: $ref: '#/components/schemas/TagCount' type: array title: Tags type: object required: - tags title: ListTagsResponse PromptimConfig: properties: message_index: type: integer title: Message Index task_description: type: string title: Task Description dataset_name: type: string title: Dataset Name train_split: anyOf: - type: string - type: 'null' title: Train Split dev_split: anyOf: - type: string - type: 'null' title: Dev Split test_split: anyOf: - type: string - type: 'null' title: Test Split evaluators: items: type: string format: uuid type: array title: Evaluators num_epochs: type: integer title: Num Epochs auto_commit: type: boolean title: Auto Commit type: object required: - message_index - task_description - dataset_name - train_split - dev_split - test_split - evaluators - num_epochs - auto_commit title: PromptimConfig HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ListReposResponse: properties: repos: items: $ref: '#/components/schemas/RepoWithLookups' type: array title: Repos total: type: integer title: Total type: object required: - repos - total title: ListReposResponse CommitManifestResponse: properties: commit_hash: type: string title: Commit Hash manifest: additionalProperties: true type: object title: Manifest examples: anyOf: - items: $ref: '#/components/schemas/RepoExampleResponse' type: array - type: 'null' title: Examples type: object required: - commit_hash - manifest title: CommitManifestResponse description: Response model for get_commit_manifest. TrueFalseLiteral: type: string enum: - 'true' - 'false' title: TrueFalseLiteral CreateRepoRequest: properties: repo_handle: type: string title: Repo Handle description: anyOf: - type: string - type: 'null' title: Description readme: anyOf: - type: string - type: 'null' title: Readme is_public: type: boolean title: Is Public tags: anyOf: - items: type: string type: array - type: 'null' title: Tags repo_type: type: string enum: - prompt - file - agent - skill title: Repo Type default: prompt restricted_mode: anyOf: - type: boolean - type: 'null' title: Restricted Mode type: object required: - repo_handle - is_public title: CreateRepoRequest description: Fields to create a repo CreateRepoResponse: properties: repo: $ref: '#/components/schemas/RepoWithLookups' type: object required: - repo title: CreateRepoResponse UpdateRepoRequest: properties: description: anyOf: - type: string - type: 'null' title: Description readme: anyOf: - type: string - type: 'null' title: Readme tags: anyOf: - items: type: string type: array - type: 'null' title: Tags is_public: anyOf: - type: boolean - type: 'null' title: Is Public is_archived: anyOf: - type: boolean - type: 'null' title: Is Archived restricted_mode: anyOf: - type: boolean - type: 'null' title: Restricted Mode type: object title: UpdateRepoRequest description: Fields to update a repo ForkRepoRequest: properties: repo_handle: type: string title: Repo Handle readme: anyOf: - type: string - type: 'null' title: Readme description: anyOf: - type: string - type: 'null' title: Description tags: anyOf: - items: type: string type: array - type: 'null' title: Tags is_public: anyOf: - type: boolean - type: 'null' title: Is Public type: object required: - repo_handle title: ForkRepoRequest description: Fields to fork a repo TagCount: properties: tag: type: string title: Tag count: type: integer title: Count type: object required: - tag - count title: TagCount RepoExampleResponse: properties: id: type: string format: uuid title: Id start_time: anyOf: - type: string format: date-time - type: 'null' title: Start Time inputs: anyOf: - additionalProperties: true type: object - type: 'null' title: Inputs outputs: anyOf: - additionalProperties: true type: object - type: 'null' title: Outputs session_id: type: string format: uuid title: Session Id type: object required: - id - session_id title: RepoExampleResponse description: Response model for example runs GetRepoResponse: properties: repo: $ref: '#/components/schemas/RepoWithLookups' type: object required: - repo title: GetRepoResponse DemoConfig: properties: message_index: type: integer title: Message Index metaprompt: additionalProperties: true type: object title: Metaprompt examples: items: additionalProperties: true type: object type: array title: Examples overall_feedback: anyOf: - type: string - type: 'null' title: Overall Feedback type: object required: - message_index - metaprompt - examples - overall_feedback title: DemoConfig OptimizePromptResponse: properties: optimization_job_id: type: string format: uuid title: Optimization Job Id type: object required: - optimization_job_id title: OptimizePromptResponse description: Response from optimizing a prompt. OptimizePromptJobRequest: properties: algorithm: $ref: '#/components/schemas/EPromptOptimizationAlgorithm' config: anyOf: - $ref: '#/components/schemas/PromptimConfig' - $ref: '#/components/schemas/DemoConfig' title: Config prompt_name: type: string title: Prompt Name type: object required: - algorithm - config - prompt_name title: OptimizePromptJobRequest description: Request to optimize a prompt. EPromptOptimizationAlgorithm: type: string enum: - promptim - demo title: EPromptOptimizationAlgorithm RepoWithLookups: properties: repo_handle: type: string title: Repo Handle description: anyOf: - type: string - type: 'null' title: Description readme: anyOf: - type: string - type: 'null' title: Readme id: type: string format: uuid title: Id tenant_id: type: string format: uuid title: Tenant Id created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At is_public: type: boolean title: Is Public is_archived: type: boolean title: Is Archived restricted_mode: type: boolean title: Restricted Mode default: false tags: items: type: string type: array title: Tags original_repo_id: anyOf: - type: string format: uuid - type: 'null' title: Original Repo Id upstream_repo_id: anyOf: - type: string format: uuid - type: 'null' title: Upstream Repo Id commit_tags: items: type: string type: array title: Commit Tags default: [] repo_type: type: string enum: - prompt - file - agent - skill title: Repo Type owner: anyOf: - type: string - type: 'null' title: Owner full_name: type: string title: Full Name num_likes: type: integer title: Num Likes num_downloads: type: integer title: Num Downloads num_views: type: integer title: Num Views liked_by_auth_user: anyOf: - type: boolean - type: 'null' title: Liked By Auth User last_commit_hash: anyOf: - type: string - type: 'null' title: Last Commit Hash num_commits: type: integer title: Num Commits created_by: anyOf: - type: string - type: 'null' title: Created By original_repo_full_name: anyOf: - type: string - type: 'null' title: Original Repo Full Name upstream_repo_full_name: anyOf: - type: string - type: 'null' title: Upstream Repo Full Name latest_commit_manifest: anyOf: - $ref: '#/components/schemas/CommitManifestResponse' - type: 'null' type: object required: - repo_handle - id - tenant_id - created_at - updated_at - is_public - is_archived - tags - repo_type - owner - full_name - num_likes - num_downloads - num_views - num_commits title: RepoWithLookups description: All database fields for repos, plus helpful computed fields. securitySchemes: API Key: type: apiKey in: header name: X-API-Key Tenant ID: type: apiKey in: header name: X-Tenant-Id Bearer Auth: type: http description: Bearer tokens are used to authenticate from the UI. Must also specify x-tenant-id or x-organization-id (for org scoped apis). scheme: bearer Organization ID: type: apiKey in: header name: X-Organization-Id