{ "opencollection": "1.0.0", "info": { "name": "Replicate Accounts Name API", "version": "1.0.0-a1" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Name", "type": "folder" }, "items": [ { "info": { "name": "Get a Deployment", "type": "http" }, "http": { "method": "GET", "url": "https://api.replicate.com/v1/deployments/:deployment_owner/:deployment_name", "params": [ { "name": "deployment_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the deployment.\n" }, { "name": "deployment_name", "value": "", "type": "path", "description": "The name of the deployment.\n" } ] }, "docs": "Get information about a deployment by name including the current release.\n\nExample cURL request:\n\n```console\ncurl -s \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/deployments/replicate/my-app-image-generator\n```\n\nThe response will be a JSON object describing the deployment:\n\n```json\n{\n \"owner\": \"acme\",\n \"name\": \"my-app-image-generator\",\n \"current_release\": {\n \"number\": 1,\n \"model\": \"stability-ai/sdxl\",\n \"version\": \"da77bc59ee60423279fd632efb4795" }, { "info": { "name": "Update a Deployment", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.replicate.com/v1/deployments/:deployment_owner/:deployment_name", "params": [ { "name": "deployment_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the deployment.\n" }, { "name": "deployment_name", "value": "", "type": "path", "description": "The name of the deployment.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update properties of an existing deployment, including hardware, min/max instances, and the deployment's underlying model [version](https://replicate.com/docs/how-does-replicate-work#versions).\n\nExample cURL request:\n\n```console\ncurl -s \\\n -X PATCH \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"min_instances\": 3, \"max_instances\": 10}' \\\n https://api.replicate.com/v1/deployments/acme/my-app-image-generator\n```\n\nThe response will be a JSON o" }, { "info": { "name": "Delete a Deployment", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.replicate.com/v1/deployments/:deployment_owner/:deployment_name", "params": [ { "name": "deployment_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the deployment.\n" }, { "name": "deployment_name", "value": "", "type": "path", "description": "The name of the deployment.\n" } ] }, "docs": "Delete a deployment\n\nDeployment deletion has some restrictions:\n\n- You can only delete deployments that have been offline and unused for at least 15 minutes.\n\nExample cURL request:\n\n```command\ncurl -s -X DELETE \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/deployments/acme/my-app-image-generator\n```\n\nThe response will be an empty 204, indicating the deployment has been deleted.\n" }, { "info": { "name": "Create a Prediction Using a Deployment", "type": "http" }, "http": { "method": "POST", "url": "https://api.replicate.com/v1/deployments/:deployment_owner/:deployment_name/predictions", "headers": [ { "name": "Prefer", "value": "" } ], "params": [ { "name": "deployment_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the deployment.\n" }, { "name": "deployment_name", "value": "", "type": "path", "description": "The name of the deployment.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create a prediction for the deployment and inputs you provide.\n\nExample cURL request:\n\n```console\ncurl -s -X POST -H 'Prefer: wait' \\\n -d '{\"input\": {\"prompt\": \"A photo of a bear riding a bicycle over the moon\"}}' \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n -H 'Content-Type: application/json' \\\n https://api.replicate.com/v1/deployments/acme/my-app-image-generator/predictions\n```\n\nThe request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction wi" }, { "info": { "name": "Get a Model", "type": "http" }, "http": { "method": "GET", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" } ] }, "docs": "Example cURL request:\n\n```console\ncurl -s \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/models/replicate/hello-world\n```\n\nThe response will be a model object in the following format:\n\n```json\n{\n \"url\": \"https://replicate.com/replicate/hello-world\",\n \"owner\": \"replicate\",\n \"name\": \"hello-world\",\n \"description\": \"A tiny model that says hello\",\n \"visibility\": \"public\",\n \"github_url\": \"https://github.com/replicate/cog-examples\",\n \"paper_url\": null,\n \"li" }, { "info": { "name": "Delete a Model", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" } ] }, "docs": "Delete a model\n\nModel deletion has some restrictions:\n\n- You can only delete models you own.\n- You can only delete private models.\n- You can only delete models that have no versions associated with them. Currently you'll need to [delete the model's versions](#models.versions.delete) before you can delete the model itself.\n\nExample cURL request:\n\n```command\ncurl -s -X DELETE \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/models/replicate/hello-world\n```\n\nThe " }, { "info": { "name": "Create a Prediction Using an Official Model", "type": "http" }, "http": { "method": "POST", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name/predictions", "headers": [ { "name": "Prefer", "value": "" } ], "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create a prediction for the deployment and inputs you provide.\n\nExample cURL request:\n\n```console\ncurl -s -X POST -H 'Prefer: wait' \\\n -d '{\"input\": {\"prompt\": \"Write a short poem about the weather.\"}}' \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n -H 'Content-Type: application/json' \\\n https://api.replicate.com/v1/models/meta/meta-llama-3-70b-instruct/predictions\n```\n\nThe request will wait up to 60 seconds for the model to run. If this time is exceeded the prediction will be returne" }, { "info": { "name": "List Model Versions", "type": "http" }, "http": { "method": "GET", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name/versions", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" } ] }, "docs": "Example cURL request:\n\n```console\ncurl -s \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/models/replicate/hello-world/versions\n```\n\nThe response will be a JSON array of model version objects, sorted with the most recent version first:\n\n```json\n{\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"id\": \"5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa\",\n \"created_at\": \"2022-04-26T19:29:04.418669Z\",\n \"cog_version\": \"0.3.0\"" }, { "info": { "name": "Get a Model Version", "type": "http" }, "http": { "method": "GET", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name/versions/:version_id", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" }, { "name": "version_id", "value": "", "type": "path", "description": "The ID of the version.\n" } ] }, "docs": "Example cURL request:\n\n```console\ncurl -s \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n https://api.replicate.com/v1/models/replicate/hello-world/versions/5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa\n```\n\nThe response will be the version object:\n\n```json\n{\n \"id\": \"5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa\",\n \"created_at\": \"2022-04-26T19:29:04.418669Z\",\n \"cog_version\": \"0.3.0\",\n \"openapi_schema\": {...}\n}\n```\n\nEvery model describes its input" }, { "info": { "name": "Delete a Model Version", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name/versions/:version_id", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" }, { "name": "version_id", "value": "", "type": "path", "description": "The ID of the version.\n" } ] }, "docs": "Delete a model version and all associated predictions, including all output files.\n\nModel version deletion has some restrictions:\n\n- You can only delete versions from models you own.\n- You can only delete versions from private models.\n- You cannot delete a version if someone other than you has run predictions with it.\n- You cannot delete a version if it is being used as the base model for a fine tune/training.\n- You cannot delete a version if it has an associated deployment.\n- You cannot delete " }, { "info": { "name": "Create a Training", "type": "http" }, "http": { "method": "POST", "url": "https://api.replicate.com/v1/models/:model_owner/:model_name/versions/:version_id/trainings", "params": [ { "name": "model_owner", "value": "", "type": "path", "description": "The name of the user or organization that owns the model.\n" }, { "name": "model_name", "value": "", "type": "path", "description": "The name of the model.\n" }, { "name": "version_id", "value": "", "type": "path", "description": "The ID of the version.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Start a new training of the model version you specify.\n\nExample request body:\n\n```json\n{\n \"destination\": \"{new_owner}/{new_name}\",\n \"input\": {\n \"train_data\": \"https://example.com/my-input-images.zip\",\n },\n \"webhook\": \"https://example.com/my-webhook\",\n}\n```\n\nExample cURL request:\n\n```console\ncurl -s -X POST \\\n -d '{\"destination\": \"{new_owner}/{new_name}\", \"input\": {\"input_images\": \"https://example.com/my-input-images.zip\"}}' \\\n -H \"Authorization: Bearer $REPLICATE_API_TOKEN\" \\\n -H 'Cont" } ] } ], "bundled": true }