Using Flan-T5 XL on Replicate API

Implementation guide · FLAN-T5 · Google DeepMind

ServerlessOpen Source

Replicate API exposes Flan-T5 XL through model ID replicate/flan-t5-xl. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.

Last refreshed 2026-09-29. Next refresh: weekly.

Quick Start

  1. 1
    Create an account at Replicate API and generate an API key.
  2. 2
    Use the Replicate API SDK or REST API to call replicate/flan-t5-xl — see the documentation for request format.

Code Examples

Install
pip install replicate
API key
REPLICATE_API_TOKEN
Model ID
replicate/flan-t5-xl

Replicate uses "owner/model-name" format (e.g. "meta/meta-llama-3-8b-instruct") for the latest version, or "owner/model-name:version-sha" to pin to a specific version. The REST endpoint splits owner and model-name into the path: /v1/models/{owner}/{model-name}/predictions.

import replicate

# reads REPLICATE_API_TOKEN from env
# replicate/flan-t5-xl format: "owner/model-name" (latest version) or "owner/model-name:version-hash"
output = replicate.run(
    "replicate/flan-t5-xl",
    input={"prompt": "Hello"}
)
# Output is a list or generator depending on the model
print("".join(output))

Pricing on Replicate API

Capabilities

No model capability flags are currently sourced.

About Flan-T5 XL

Flan-T5 XL is Google DeepMind's FLAN-T5 model. It was released 2022-10-03.

Model Specs

Released2022-10-03
Parameters3B
Context512
ArchitectureDecoder Only

Provider

Replicate API

Replicate

San Francisco, California, United States