Migration Guide from the Legacy predictions Endpoint
Before you begin
Migrate text generation
2
Restructure the request body
{
"type": "prediction",
"properties": {
"input": "Please give me 5 domain suggestions for a flower shop in Berlin. Provide for each domain name a paragraph explaining the domain name and why it is valuable.",
"options": {
"max_length": "1000",
"temperature": "0.5"
}
}
}{
"model": "openai/gpt-oss-120b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Please give me 5 domain suggestions for a flower shop in Berlin. Provide for each domain name a paragraph explaining the domain name and why it is valuable."
}
],
"max_tokens": 2000,
"temperature": 0.5
}Migrate image generation
2
Restructure the request body
{
"type": "prediction",
"properties": {
"input": "Draw an image of a futuristic city skyline at sunset, digital art.",
"options": {
"size": "1024x1024"
}
}
}{
"model": "black-forest-labs/FLUX.1-schnell",
"prompt": "A futuristic city skyline at sunset, digital art.",
"n": 1,
"size": "1024x1024"
}Migrate retrieval augmented generation
Last updated
Was this helpful?