Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/content/docs-es/choose-a-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Si no sabes cuál coger, busca en la primera columna lo que quieres hacer.
| Convertir texto en audio | `kokoro` | 67 voces, dos de ellas en español |
| Transcribir audio | `whisper` | Más de 99 idiomas, con detección automática |
| Generar o editar una imagen | `flux-2-klein` | Texto a imagen e imagen a imagen |
| Generar una imagen con texto legible | `qwen-image-2.1` | Texto a imagen |

## Todos los modelos

Expand All @@ -53,6 +54,7 @@ Si no sabes cuál coger, busca en la primera columna lo que quieres hacer.
| `kokoro` | Texto a voz | - | texto | sin contador |
| `whisper` | Voz a texto | - | audio | sin contador |
| `flux-2-klein` | Generar y editar imágenes | - | texto · imagen | 100 peticiones/mes |
| `qwen-image-2.1` | Generar imágenes (texto→imagen) | - | texto | 100 peticiones/mes (pool compartido) |

Las fichas completas, con parámetros, licencias y modos de razonamiento, están en [Modelos](/es/docs/models).

Expand Down
67 changes: 67 additions & 0 deletions src/content/docs-es/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,73 @@ console.log(image.data[0].url);

`/images/edits` acepta hasta cuatro imágenes de referencia (PNG, JPEG o WebP, de menos de 25 MB cada una) y no admite `mask`: mandar una devuelve `400`.

Las imágenes necesitan membresía de inferencia, `403` si no la tienes, y van por su propio presupuesto: 20 peticiones por minuto y 100 al mes, que no toca tu cuota de tokens.
## model: qwen-image-2.1

generación de texto a imagen

### curl

```bash
curl https://api.nan.builders/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key-here" \
-d '{
"model": "qwen-image-2.1",
"prompt": "Una pizarra con la palabra faro escrita en ella, rotulación limpia",
"size": "1024x1024",
"n": 1
}'
# → {"created":...,"data":[{"url":"https://..."}]}
```

Cada lado de `size` tiene que ser divisible entre 16 y estar entre 512 y 1280, con una relación de aspecto entre 1:3 y 3:1. `n` llega hasta 4. Sin imágenes de referencia: este modelo es solo texto a imagen. `seed` es un entero en 0..2147483647.

### python

```python
from openai import OpenAI

client = OpenAI(
api_key="sk-your-key-here",
base_url="https://api.nan.builders/v1"
)

image = client.images.generate(
model="flux-2-klein",
prompt="Una pizarra con la palabra faro escrita en ella, rotulación limpia",
size="1024x1024",
extra_body={"seed": 42}
)

print(image.data[0].url)
```

El enlace es temporal, alrededor de 60 minutos. Pide `response_format="b64_json"` y los bytes llegan en `data[0].b64_json`, en base64, en lugar de detrás de un enlace. `seed` y `guidance` son extensiones de NaN, así que el SDK de OpenAI las manda por `extra_body`.

### node.js (imagen a imagen)

```javascript
import OpenAI from "openai";
import fs from "fs";

const client = new OpenAI({
apiKey: "sk-your-key-here",
baseURL: "https://api.nan.builders/v1",
});

const image = await client.images.edit({
model: "flux-2-klein",
image: fs.createReadStream("referencia.png"),
prompt: "Convierte la escena en invierno, con nieve",
size: "1024x1024",
});

console.log(image.data[0].url);
```

`/images/edits` acepta hasta cuatro imágenes de referencia (PNG, JPEG o WebP, de menos de 25 MB cada una) y no admite `mask`: mandar una devuelve `400`.

Las imágenes necesitan membresía de inferencia, `403` si no la tienes, y van por su propio presupuesto: 20 peticiones por minuto y 100 al mes, que no toca tu cuota de tokens.

## Conectar tu editor o tu agente
Expand Down
20 changes: 20 additions & 0 deletions src/content/docs-es/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,26 @@ OpenAI y la misma `base URL`.
]}
/>

<ModelCard
id="qwen-image-2.1"
name="qwen-image-2.1"
leftLabel="generación de imágenes"
rightLabel="capacidades"
description="Modelo de imagen Qwen para texto a imagen con buena adherencia al prompt y texto legible dentro de la imagen. Compatible con la API de Images de OpenAI (/v1/images/generations). Requiere membresía del tier de inferencia."
specs={[
{ label: 'Tipo', value: 'Difusión (Qwen-Image)' },
{ label: 'Modalidades', value: 'texto→imagen' },
{ label: 'Resolución', value: '512–1280 px (múltiplos de 16)' },
{ label: 'Imágenes / petición', value: '1–4 (n)' },
{ label: 'Cuota mensual', value: '100 peticiones / miembro (compartidas con flux-2-klein)' },
]}
items={[
'Texto a imagen (<code>/v1/images/generations</code>)',
'Salida como URL temporal (R2, ~60 min) o base64',
'Reproducibilidad vía <code>seed</code> (0–2147483647)',
]}
/>

## Controlar el razonamiento.

Todos los modelos de chat de arriba razonan antes de responder, y el
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/choose-a-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ If you do not know which one to pick, look for what you want to do in the first
| Turn text into audio | `kokoro` | 67 voices, two of them Spanish |
| Transcribe audio | `whisper` | More than 99 languages, with automatic detection |
| Generate or edit an image | `flux-2-klein` | Text to image and image to image |
| Generate an image with clean text rendering | `qwen-image-2.1` | Text to image |

## Every model

Expand All @@ -53,6 +54,7 @@ If you do not know which one to pick, look for what you want to do in the first
| `kokoro` | Text to speech | - | text | no counter |
| `whisper` | Speech to text | - | audio | no counter |
| `flux-2-klein` | Generate and edit images | - | text · image | 100 requests/month |
| `qwen-image-2.1` | Generate images (text→image) | - | text | 100 requests/month (shared pool) |

The full spec sheets, with parameters, licenses and reasoning modes, are in [Models](/docs/models).

Expand Down
67 changes: 67 additions & 0 deletions src/content/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,73 @@ console.log(image.data[0].url);

`/images/edits` takes up to four reference images (PNG, JPEG or WebP, under 25 MB each) and does not support `mask`: sending one returns `400`.

Images need inference membership, `403` otherwise, and they run on their own budget: 20 requests per minute and 100 per month, which does not touch your token quota.
## model: qwen-image-2.1

text-to-image generation

### curl

```bash
curl https://api.nan.builders/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key-here" \
-d '{
"model": "qwen-image-2.1",
"prompt": "A chalkboard with the word lighthouse written on it, clean lettering",
"size": "1024x1024",
"n": 1
}'
# → {"created":...,"data":[{"url":"https://..."}]}
```

Each side of `size` has to be divisible by 16 and between 512 and 1280, with an aspect ratio between 1:3 and 3:1. `n` goes up to 4. No reference images: this model is text-to-image only. `seed` is an integer in 0..2147483647.

### python

```python
from openai import OpenAI

client = OpenAI(
api_key="sk-your-key-here",
base_url="https://api.nan.builders/v1"
)

image = client.images.generate(
model="flux-2-klein",
prompt="A chalkboard with the word lighthouse written on it, clean lettering",
size="1024x1024",
extra_body={"seed": 42}
)

print(image.data[0].url)
```

The link is temporary, about 60 minutes. Ask for `response_format="b64_json"` and the bytes arrive inline in `data[0].b64_json` instead, base64-encoded. `seed` and `guidance` are NaN extensions, so the OpenAI SDK sends them through `extra_body`.

### node.js (image to image)

```javascript
import OpenAI from "openai";
import fs from "fs";

const client = new OpenAI({
apiKey: "sk-your-key-here",
baseURL: "https://api.nan.builders/v1",
});

const image = await client.images.edit({
model: "flux-2-klein",
image: fs.createReadStream("reference.png"),
prompt: "Turn the scene into winter, with snow",
size: "1024x1024",
});

console.log(image.data[0].url);
```

`/images/edits` takes up to four reference images (PNG, JPEG or WebP, under 25 MB each) and does not support `mask`: sending one returns `400`.

Images need inference membership, `403` otherwise, and they run on their own budget: 20 requests per minute and 100 per month, which does not touch your token quota.

## Connect your editor or your agent
Expand Down
20 changes: 20 additions & 0 deletions src/content/docs/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,26 @@ with the same `base URL`.
]}
/>

<ModelCard
id="qwen-image-2.1"
name="qwen-image-2.1"
leftLabel="image generation"
rightLabel="capabilities"
description="Qwen image model for text-to-image with strong prompt adherence and clean text rendering inside the image. Compatible with OpenAI's Images API (/v1/images/generations). Requires inference-tier membership."
specs={[
{ label: 'Type', value: 'Diffusion (Qwen-Image)' },
{ label: 'Modalities', value: 'text→image' },
{ label: 'Resolution', value: '512–1280 px (multiples of 16)' },
{ label: 'Images / request', value: '1–4 (n)' },
{ label: 'Monthly quota', value: '100 requests / member (shared with flux-2-klein)' },
]}
items={[
'Text-to-image (<code>/v1/images/generations</code>)',
'Output as temporary URL (R2, ~60 min) or base64',
'Reproducibility via <code>seed</code> (0–2147483647)',
]}
/>

## Controlling reasoning.

Every chat model above thinks before it answers, and the reasoning trace
Expand Down
9 changes: 8 additions & 1 deletion src/data/modelos.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@
"specs": "FLUX diffusion · text→image · image→image · 256-1536 px · 1-4 per request",
"cuota": "100 req/mes",
"frontier": false
},
{
"id": "qwen-image-2.1",
"by": "Alibaba",
"specs": "Qwen diffusion · text→image · 512-1280 px · 1-4 per request",
"cuota": "100 req/mes",
"frontier": false
}
]
}
]
}
}
Loading
Loading