---
title: m2m100-1.2b
description: Multilingual encoder-decoder (seq-to-seq) model trained for Many-to-Many multilingual translation
image: https://edgetunnel-b2h.pages.dev/dev-products-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/workers-ai/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

![Meta logo](https://edgetunnel-b2h.pages.dev/_astro/meta.BR4nfp35.svg) 

#  m2m100-1.2b 

Translation • Meta 

`@cf/meta/m2m100-1.2b` 

Multilingual encoder-decoder (seq-to-seq) model trained for Many-to-Many multilingual translation

| Model Info        |                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------- |
| Terms and License | [link ↗](https://github.com/facebookresearch/fairseq/blob/main/LICENSE)            |
| More information  | [link ↗](https://github.com/facebookresearch/fairseq/tree/main/examples/m2m%5F100) |
| Batch             | Yes                                                                                |
| Unit Pricing      | $0.34 per M input tokens, $0.34 per M output tokens                                |

## Usage

* [  TypeScript ](#tab-panel-5479)
* [  Python ](#tab-panel-5480)
* [  curl ](#tab-panel-5481)

```ts
export interface Env {
  AI: Ai;
}


export default {
  async fetch(request, env): Promise<Response> {


    const response = await env.AI.run(
      "@cf/meta/m2m100-1.2b",
      {
        text: "I'll have an order of the moule frites",
        source_lang: "english", // defaults to english
        target_lang: "french",
      }
    );


    return new Response(JSON.stringify(response));
  },
} satisfies ExportedHandler<Env>;
```

```py
import requests


API_BASE_URL = "https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/"
headers = {"Authorization": "Bearer {API_TOKEN}"}


def run(model, input):
    response = requests.post(f"{API_BASE_URL}{model}", headers=headers, json=input)
    return response.json()


output = run('@cf/meta/m2m100-1.2b', {
  "text": "I'll have an order of the moule frites",
  "source_lang": "english",
  "target_lang": "french"
})


print(output)
```

```sh
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/meta/m2m100-1.2b  \
    -X POST  \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"  \
    -d '{ "text": "Ill have an order of the moule frites", "source_lang": "english", "target_lang": "french" }'
```

## Parameters

Synchronous — Send a request and receive a complete response 

* [ Input ](#tab-panel-5482)
* [ Output ](#tab-panel-5483)

text

`string`requiredminLength: 1The text to be translated

source\_lang

`string`default: enThe language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified

target\_lang

`string`requiredThe language code to translate the text into (e.g., 'es' for Spanish)

request\_id

`string`The async request id that can be used to obtain the results.

Batch — Send multiple requests in a single API call 

* [ Input ](#tab-panel-5484)
* [ Output ](#tab-panel-5485)

▶requests\[\]

`array`requiredBatch of the embeddings requests to run using async-queue

request\_id

`string`The async request id that can be used to obtain the results.

## API Schemas (Raw)

 Synchronous Input [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/sync-input.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/sync-input.json "Download") 

 Synchronous Output [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/sync-output.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/sync-output.json "Download") 

 Batch Input [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/batch-input.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/batch-input.json "Download") 

 Batch Output [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/batch-output.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/batch-output.json "Download")

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/#page","headline":"m2m100-1.2b (Meta) · Cloudflare AI docs · Cloudflare Workers AI docs","description":"Multilingual encoder-decoder (seq-to-seq) model trained for Many-to-Many multilingual translation","url":"https://edgetunnel-b2h.pages.dev/workers-ai/models/m2m100-1.2b/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/dev-products-preview.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/workers-ai/","name":"Workers AI"}},{"@type":"ListItem","position":3,"item":{"@id":"/workers-ai/models/","name":"Models"}}]}
```
