stability_ai 1.0.0 copy "stability_ai: ^1.0.0" to clipboard
stability_ai: ^1.0.0 copied to clipboard

A simple gRPC client for StabilityAI

A simple gRPC client for StabilityAI. Most of the heavy lifting is done by auto generated code from Stability-AI's Protocol Buffer Definitions.

Features #

It can access the following APIs:

Getting started #

To install this package, run:

dart pub add stability_ai

Usage #

import 'package:stability_ai/stability_ai.dart';

// initialize client with API Key.
// get it from https://beta.dreamstudio.ai/membership and navigate to API Key.
var client = StabilityAIClient(apiKey);

// This is the text-to-image generation service
var generationService = client.generation;

// create a text prompt request. Let's generate some cats!
var req = Request(prompt: [Prompt(text: "lol cats")]);

// send the request. The response is a stream.
var rsp = client.generation.generate(req);

// we just print out all response answers.
rsp.listen((answer) {
  print(answer);
});
2
likes
130
points
21
downloads

Publisher

verified publisheryeet.io

Weekly Downloads

A simple gRPC client for StabilityAI

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

fixnum, grpc, protobuf

More

Packages that depend on stability_ai