Dokumentation
ReferenceHTTP APIPredictionsCreate a prediction

Create a prediction

POST
/v1/models/{owner}/{model}/predictions

Authorization

bearerAuth
AuthorizationBearer <token>

Authenticate using an API Key:

Authorization: Bearer rk_live_your-api-key

In: header

Path Parameters

owner*string

Model owner (e.g., google, openai)

model*string

Model name (e.g., veo-3.1, sora-2)

Request Body

application/json

input*

Generation input parameters. Different models support different parameters. Unsupported parameters are silently ignored.

webhook?string

Webhook callback URL

Formaturi
webhook_events_filter?array<>

Only receive webhooks for specified events (default all)

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.routeany.com/v1/models/google/veo-3.1/predictions" \  -H "Content-Type: application/json" \  -d '{    "input": {      "prompt": "A cat walking on the beach at sunset",      "aspect_ratio": "16:9",      "duration": 5    }  }'
{
  "id": "pred_01HXYZ...",
  "model": "google/veo-3.1",
  "capability": "text-to-video",
  "input": {},
  "logs": "string",
  "output": "string",
  "data_removed": true,
  "error": {
    "code": "string",
    "message": "string"
  },
  "source": "api",
  "status": "starting",
  "metrics": {
    "predict_time": 0,
    "total_time": 0
  },
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z",
  "urls": {
    "cancel": "http://example.com",
    "get": "http://example.com",
    "web": "http://example.com"
  }
}
{
  "type": "https://api.routeany.com/errors/validation-error",
  "title": "Validation Error",
  "status": 400,
  "detail": "The 'prompt' field is required",
  "code": "VALIDATION_INVALID_ARGUMENT",
  "errors": [
    {
      "field": "input.prompt",
      "code": "VALIDATION_MISSING_FIELD",
      "message": "prompt is required"
    }
  ]
}
{
  "type": "https://api.routeany.com/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing API key",
  "code": "AUTH_INVALID_TOKEN"
}
{
  "type": "https://api.routeany.com/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "detail": "The requested resource was not found",
  "code": "RESOURCE_NOT_FOUND"
}
{
  "type": "https://api.routeany.com/errors/rate-limit",
  "title": "Rate Limit Exceeded",
  "status": 429,
  "detail": "You have exceeded the rate limit. Please retry after 60 seconds.",
  "code": "RATE_LIMIT_EXCEEDED"
}
{
  "type": "https://api.routeany.com/errors/internal",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An unexpected error occurred",
  "code": "INTERNAL"
}