intbanner-bg

2 billion parameter SD3 model with optimized performance and excels in areas where previous models struggled, such as photorealism and typography. The Stable Diffusion 3 API is provided by Stability and the model is powered by Cyfuture AI. Unlike other models on the Cyfuture AI playground, you'll need a Stability API key to use this model. To use the API directly, visit https://platform.stability.ai/docs/api-reference#tag/Generate/paths/~1v2beta~1stable-image~1generate~1sd3/post

Serverless API

Stable Diffusion 3 Mediumis available via partnership with Stability AI, in which Cyfuture AI powers the underlying API. You must use a Stability API key and will be billed by Stability for usage, instead of Cyfuture AI. See the API code example below or see the Stability API docs for full details.

API Examples

Generate a model response using the image endpoint of sd3-medium. API reference

import requests
import json

url = "https://api.cyfuture.ai/aiapi/inferencing/response"
payload = {
  "model": "Model Name",
  "max_tokens": 16384,
  "top_p": 1,
  "top_k": 40,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "temperature": 0.6,
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ]
}
headers = {
  "Accept": "application/json",
  "Content-Type": "application/json",
  "Authorization": "Bearer <API_KEY>"
}
requests.request("POST", url, headers=headers, data=json.dumps(payload))
await fetch("https://api.cyfuture.ai/aiapi/inferencing/response", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer <API_KEY>"
  },
  body: JSON.stringify({
    model: ""Model Name"",
    max_tokens: 16384,
    top_p: 1,
    top_k: 40,
    presence_penalty: 0,
    frequency_penalty: 0,
    temperature: 0.6,
    messages: [
        {
            role: "user",
            content: "Hello, how are you?"
        }
    ]
  })
});
URI uri = URI.create("https://api.cyfuture.ai/aiapi/inferencing/response");
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
  .uri(uri)
  .header("Accept", "application/json")
  .header("Content-Type", "application/json")
  .header("Authorization", "Bearer <API_KEY>")
  .POST(HttpRequest.BodyPublishers.ofString("""{
    "model": ""Model Name"",
    "max_tokens": 16384,
    "top_p": 1,
    "top_k": 40,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "temperature": 0.6,
    "messages": [
        {
            "role": "user",
            "content": "Hello, how are you?"
        }
    ]
  }"""))
  .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
  
package main

import (
  "bytes"
  "net/http"
  "fmt"
)

apiUrl := "https://api.cyfuture.ai/aiapi/inferencing/response"
var jsonData = []byte(`{
 "model": "Model Name",
  "max_tokens": 16384,
  "top_p": 1,
  "top_k": 40,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "temperature": 0.6,
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ]
}`)

req, err := http.NewRequest(POST, apiUrl, bytes.NewBuffer(jsonData))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <API_KEY>")

client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
  panic(err)
}
defer resp.Body.Close()

fmt.Println("response Status:", resp.Status)
curl --request POST \
  --url https://api.cyfuture.ai/aiapi/inferencing/response \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <API_KEY>' \
  --data '{
   "model": "Model Name",
    "max_tokens": 16384,
    "top_p": 1,
    "top_k": 40,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "temperature": 0.6,
    "messages": [
        {
            "role": "user",
            "content": "Hello, how are you?"
        }
    ]
  }'

Model Details

Created by
dev@cyfuture.ai
Created
12/30/2024
Visibility
Public
Kind
Base model
Model size
14B parameters