Replicate API
    Replicate API
    • List collections of models
      GET
    • Get a collection of models
      GET
    • List available hardware for models
      GET
    • List public models
      GET
    • Create a model
      POST
    • Get a model
      GET
    • List model versions
      GET
    • Delete a model version
      DELETE
    • Get a model version
      GET
    • Create a training
      POST
    • List predictions
      GET
    • Create a prediction
      POST
    • Get a prediction
      GET
    • Cancel a prediction
      POST
    • List trainings
      GET
    • Get a training
      GET
    • Cancel a training
      POST

      Create a model

      POST
      /v1/models
      Create a model.
      Example cURL request:
      curl -s -X POST \
        -H "Authorization: Token <paste-your-token-here>" \
        -d '{"owner": "alice" "name": "my-model", "description": "An example model", "visibility": "public", "hardware": "cpu"}' \
        https://api.replicate.com/v1/models
      The response will be a model object in the following format:
      {
        "url": "https://replicate.com/alice/my-model",
        "owner": "alice",
        "name": "my-model",
        "description": "An example model",
        "visibility": "public",
        "github_url": null,
        "paper_url": null,
        "license_url": null,
        "run_count": 0,
        "cover_image_url": null,
        "default_example": null,
        "latest_version": null,
      }
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.replicate.com/v1/models' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "cover_image_url": "string",
          "description": "string",
          "github_url": "string",
          "hardware": "string",
          "license_url": "string",
          "name": "string",
          "owner": "string",
          "paper_url": "string",
          "visibility": "public"
      }'
      Response Response Example
      {}

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params application/json

      Examples

      Responses

      🟢201Success
      application/json
      Body

      Modified at 2023-12-22 03:33:22
      Previous
      List public models
      Next
      Get a model
      Built with