The New Black AI

Text to Textile API

Text to Textile — workflow

A seamless, print-ready fabric pattern from a few words: describe the motif and the fabric, get a repeat that tiles in every direction.

POST/v1/generateworkflow: text_to_textile-v1

One endpoint serves every workflow — this page documents text_to_textile-v1, the current version. Credits are debited at submission (1 cr standard, 3 cr pro); a failed generation is refunded automatically. Earlier versions of this endpoint, if any, keep being served under their own names.

ParameterValue for this workflow
workflow"text_to_textile-v1" required
fields.patternDescribe the pattern. The motif, its colours and its mood — e.g. "hand-painted watercolour peonies on ivory".required
fields.techniqueFabric and scale. The fabric it is printed or woven on, and the size of the repeat.Defaults to “printed cotton poplin, medium-scale repeat”.
ratio21:9 · 16:9 · 3:2 · 4:3 · 5:4 · 1:1 · 4:5 · 3:4 · 2:3 · 9:16
tier"standard" (1 cr) or "pro" (3 cr)
webhook_urlOptional — we POST the outcome here when the generation settles. Without it, poll the URL returned in the response until the status settles.

Example request

curl -X POST https://thenewblack.ai/api/v1/generate \
  -H "Authorization: Bearer tnb_live_XXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "text_to_textile-v1",
    "fields": {
      "pattern": "hand-painted watercolour peonies on ivory",
      "technique": "printed cotton poplin, medium-scale repeat"
    },
    "ratio": "1:1",
    "tier": "standard"
  }'
// 202 Accepted
{
  "generation_id": "3f1c9a6e-...",
  "status": "running",
  "poll": "/api/v1/generations/3f1c9a6e-..."
}

Example response

Poll /v1/generations/{id} (or receive the webhook) until the generation settles:

// 200 OK
{
  "generation_id": "3f1c9a6e-...",
  "workflow": "text_to_textile",
  "status": "succeeded",
  "result": {
    "type": "image",
    "url": "https://.../result.webp",
    "thumbnail": "https://.../thumb.webp"
  }
}

Results are stored for 48 hours — copy them to your own storage. Authentication, errors and webhooks are documented in the full API reference.

Frequently asked questions

What is a text-to-textile API?

An endpoint that generates an original textile design from a description — florals, geometrics, ikats — as a flat, seamless repeat ready for print.

Does it need an image?

No. The pattern field is the whole input; the technique field says which fabric it is printed on and how large the repeat is.

How much does it cost?

1 credit on the standard tier, 3 on pro. Credits come with plans and packs; a failed generation is always refunded.

Other endpoints: Virtual Try-On API · AI Fashion Models API · Fashion Design API · Reimagine Model API · Swap Model API · AI Stylist API · all endpoints