{"openapi":"3.1.0","info":{"title":"Civitai (BYOK) API","version":"0.1.0","description":"Civitai (BYOK) lets an AI assistant read your own Civitai data through the Civitai API with a key you supply (Civitai API key). Read-only: 11 tools (get_me, list_models, get_model, get_model_version, get_model_version_by_hash, list_images, list_creators, list_tags, list_articles, find_users, get_enums). The BYOK key travels with each request, is used for that one call only and is never stored,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-civitai.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-civitai/docs"},"termsOfService":"https://connectorbay.com/byok-civitai/terms"},"servers":[{"url":"https://byok-civitai.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-civitai/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_me":{"post":{"operationId":"get_me","summary":"Show the Civitai account the token belongs to: user id, username, membership tier, status and active subscriptions. Use ","description":"Show the Civitai account the token belongs to: user id, username, membership tier, status and active subscriptions. Use for \"Which Civitai account is my token for and what tier is it\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_meArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_models":{"post":{"operationId":"list_models","summary":"List or search Civitai models (checkpoints, LoRAs and so on) with type, creator, tags and download and like counts. Full","description":"List or search Civitai models (checkpoints, LoRAs and so on) with type, creator, tags and download and like counts. Full-text search with query needs cursor paging, not page. page times limit may not exceed 1000. Use for \"What are the most downloaded SDXL LoRAs on Civitai\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Full-text search over model names. Cannot be combined with page.","title":"Query"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number starting at 1 (not allowed together with query).","title":"Page"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from metadata.nextCursor of the previous answer.","title":"Cursor"},"tag":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only models carrying this tag name.","title":"Tag"},"username":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only models by this creator username.","title":"Username"},"types":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"One model type, for example Checkpoint, LORA, TextualInversion, VAE, Controlnet or Upscaler (see get_enums).","title":"Types"},"base_models":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"One base model name, for example 'SDXL 1.0' or 'Flux.1 D' (see get_enums).","title":"Base Models"},"sort":{"anyOf":[{"enum":["Highest Rated","Most Downloaded","Most Liked","Most Discussed","Most Collected","Most Images","Newest","Oldest"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order.","title":"Sort"},"period":{"anyOf":[{"enum":["AllTime","Year","Month","Week","Day"],"type":"string"},{"type":"null"}],"default":null,"description":"Time window for the sort metric.","title":"Period"},"nsfw":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Include mature content when true.","title":"Nsfw"}},"title":"list_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model":{"post":{"operationId":"get_model","summary":"Get one model by id with description, type, creator, tags, statistics and its versions including file names and sizes. U","description":"Get one model by id with description, type, creator, tags, statistics and its versions including file names and sizes. Use for \"Show Civitai model 827184 with its versions\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"model_id":{"description":"Civitai model id (integer).","title":"Model Id","type":"integer"}},"required":["model_id"],"title":"get_modelArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model_version":{"post":{"operationId":"get_model_version","summary":"Get one model version by id: base model, AIR identifier, trigger words, statistics, files and download link. Use for \"Sh","description":"Get one model version by id: base model, AIR identifier, trigger words, statistics, files and download link. Use for \"Show Civitai model version 2514310\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"version_id":{"description":"Civitai model version id (integer).","title":"Version Id","type":"integer"}},"required":["version_id"],"title":"get_model_versionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_model_version_by_hash":{"post":{"operationId":"get_model_version_by_hash","summary":"Identify a model version from a file hash (AutoV1, AutoV2, AutoV3, SHA256, BLAKE3 or CRC32). Returns the same fields as ","description":"Identify a model version from a file hash (AutoV1, AutoV2, AutoV3, SHA256, BLAKE3 or CRC32). Returns the same fields as get_model_version. Use for \"Which Civitai model does this SHA256 file hash belong to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"hash":{"description":"File hash in hex, any of the hash types Civitai records; case-insensitive.","maxLength":128,"title":"Hash","type":"string"}},"required":["hash"],"title":"get_model_version_by_hashArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_images":{"post":{"operationId":"list_images","summary":"List images posted to Civitai, filtered by model, model version, post or creator, with size, creator, reactions and base","description":"List images posted to Civitai, filtered by model, model version, post or creator, with size, creator, reactions and base model. Generation metadata is not returned. Use for \"Show the newest images made with Civitai model version 2514310\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 200).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from metadata.nextCursor of the previous answer.","title":"Cursor"},"model_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only images that use this model id.","title":"Model Id"},"model_version_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only images that use this model version id.","title":"Model Version Id"},"post_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only images of this post id.","title":"Post Id"},"username":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only images by this creator username.","title":"Username"},"sort":{"anyOf":[{"enum":["Most Reactions","Most Comments","Most Collected","Newest","Oldest","Random"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order.","title":"Sort"},"period":{"anyOf":[{"enum":["AllTime","Year","Month","Week","Day"],"type":"string"},{"type":"null"}],"default":null,"description":"Time window for the sort metric.","title":"Period"}},"title":"list_imagesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_creators":{"post":{"operationId":"list_creators","summary":"List Civitai creators alphabetically with their published model count, optionally searching by username. Use for \"Find C","description":"List Civitai creators alphabetically with their published model count, optionally searching by username. Use for \"Find Civitai creators whose name starts with JustMaier\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Search text for the username.","title":"Query"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 200).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number starting at 1.","title":"Page"}},"title":"list_creatorsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tags":{"post":{"operationId":"list_tags","summary":"List Civitai model tags, optionally searching by name. Use a tag name as the tag filter of list_models. Use for \"What Ci","description":"List Civitai model tags, optionally searching by name. Use a tag name as the tag filter of list_models. Use for \"What Civitai model tags match anime\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Search text for the tag name.","title":"Query"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 200).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number starting at 1.","title":"Page"}},"title":"list_tagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_articles":{"post":{"operationId":"list_articles","summary":"List or search Civitai articles (guides, write-ups, announcements) with author, tags and statistics. Cursor paging only.","description":"List or search Civitai articles (guides, write-ups, announcements) with author, tags and statistics. Cursor paging only. Use for \"Find popular Civitai articles about ComfyUI\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text over article titles.","title":"Query"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from metadata.nextCursor of the previous answer.","title":"Cursor"},"username":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only articles by this author username.","title":"Username"},"sort":{"anyOf":[{"enum":["Newest","Recently Updated","Most Reactions","Most Comments","Most Bookmarks","Most Collected"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order.","title":"Sort"}},"title":"list_articlesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/find_users":{"post":{"operationId":"find_users","summary":"Look up Civitai users by id list or username prefix; returns id and username only. Use for \"Which Civitai user has id 12","description":"Look up Civitai users by id list or username prefix; returns id and username only. Use for \"Which Civitai user has id 12345\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"ids":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated user ids, for example '12345,67890'.","title":"Ids"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Username prefix to match.","title":"Query"}},"title":"find_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_enums":{"post":{"operationId":"get_enums","summary":"List the valid values Civitai uses for model types, file types, base models and base model sub-types. Use for \"What mode","description":"List the valid values Civitai uses for model types, file types, base models and base model sub-types. Use for \"What model types and base models does Civitai support\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_enumsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}