{"id":22675585,"url":"https://github.com/stability-ai/api-interfaces","last_synced_at":"2025-04-12T19:46:15.099Z","repository":{"id":59047176,"uuid":"521055731","full_name":"Stability-AI/api-interfaces","owner":"Stability-AI","description":"Interface definitions for API interactions between components","archived":false,"fork":false,"pushed_at":"2024-12-11T19:32:44.000Z","size":5476,"stargazers_count":143,"open_issues_count":26,"forks_count":76,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-04-03T22:11:13.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stability-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T22:56:44.000Z","updated_at":"2025-02-13T20:59:10.000Z","dependencies_parsed_at":"2024-07-23T19:34:16.895Z","dependency_job_id":"0cc7aefb-3411-4b54-942c-7cb9c7201487","html_url":"https://github.com/Stability-AI/api-interfaces","commit_stats":{"total_commits":373,"total_committers":15,"mean_commits":"24.866666666666667","dds":0.6380697050938338,"last_synced_commit":"57bdc2f88d63a4a08e6ffcf26ea330cd0faca276"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stability-AI%2Fapi-interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stability-AI%2Fapi-interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stability-AI%2Fapi-interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stability-AI%2Fapi-interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stability-AI","download_url":"https://codeload.github.com/Stability-AI/api-interfaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T17:57:42.268Z","updated_at":"2025-04-12T19:46:15.071Z","avatar_url":"https://github.com/Stability-AI.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 📝 Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nApi-Interfaces is the gRPC protocol for communication between the \n[api-bridge](https://github.com/Stability-AI/api-bridge), the [api-web](https://github.com/Stability-AI/api-web),\nand the [generator_server](https://github.com/Stability-AI/generator_server). Additionally, any \nother client application communicating directly with `api-web` also use the interfaces generated \nfrom this repository.\n\nSee [here](https://www.notion.so/stabilityai/Protocol-Buffer-Development-Guidelines-94c6a5b9082d4aa6a2d6bf50b86fe0ac) for some development guides.\n\n## Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\nThese instructions will get you an environment setup to build the interface files from the proto source files.\n\n### Prerequisites\n\nThe following items are needed to develop api-interfaces:\n- [golang](https://go.dev/) \u003e= 1.18\n- [nodejs](https://nodejs.org/en/) \u003e= 16.16.0\n- [cmake](https://cmake.org/) \u003e= 3.14\n- [protoc](https://github.com/protocolbuffers/protobuf#protocol-compiler-installation)\n- [grpc](https://grpc.io/)\n\nIt is recommended to use ssh cloning with this project for `git` and for `go get`, although `https` \ndoes appear to work.  To force ssh (for github) put the following in your `.gitconfig`:\n\n```ini\n[url \"ssh://git@github.com/\"]\n  insteadOf = https://github.com/\n```\n\n### Setup and building\n\nAfter all the prerequisites are installed and available, this project can be setup by the following:\n\n```shell\ngit clone --recurse-submodules git@github.com:Stability-AI/api-interfaces.git\ncd api-interfaces\ncmake .\ncmake --build .\n```\n\nThis will produce files for the various languages in [gooseai](./gooseai) to support the proto \nfiles in [src](./src).  *When rebuilding the files it is recommended to do a clean before as there \nhave been instances of not all files being regenerated without it.*\n\n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nThe generated files are all output in [gooseai](./gooseai).  How to use these files depends on the \nprogramming language being used.  The following sections provide details for each of the supported \nlanguages.\n\nThe files have different usages and not all are required depending on the situation:\n| Suffix      | Client | Server |\n|-------------|--------|--------|\n| _grpc_pb    | ✔️1    | ✔️     |\n| _pb_service | ✔️2    |        |\n| _pb         | ✔️     | ✔️     |\n\n\n1. Not needed for typescript/javascript clients.\n2. Only needed for typscript/javascripts clients.\n\n\n### Golang\n\nFor Golang the interfaces can be added to the project as a normal module require.  To add them run:\n\n```shell\ngo get github.com/Stability-AI/api-interfaces@latest\n```\n\nSimilarly to update them just run the same command with the short sha of the version to update to. \nUse them as you would a normal module.\n\n### Python\n\nWith the current output, the best way to consume these is to add them as a git submodule to your \nproject.  It is recommended to use ssh clone when adding the submodule.  To update them just\ncheckout the newer version from within the submodule (and remember to commit the submodule change\nto your project).\n\nTo use them make sure the files are on the python path.\n\n\n### Typescript / Javascript\n\nWith the current output, the best way to consume these is to add them as a git submodule to your \nproject.  It is recommended to use ssh clone when adding the submodule.  To update them just\ncheckout the newer version from within the submodule (and remember to commit the submodule change\nto your project).\n\nTo use them make sure they are in a location that can be found by your typescript/javascript files.\n\n*NOTE: Typescript requires both the typescript and javascript files to be available.*\n\n### Other Languages / Custom Build\n\nIf not using the CMake defined builds to generate make sure when building from the source proto \nfiles that the following proto include paths are set:\n- `src/proto`\n- `src/tensorizer/proto`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstability-ai%2Fapi-interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstability-ai%2Fapi-interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstability-ai%2Fapi-interfaces/lists"}