civai-co Ads API
The ads API from civai-co — 13 operation(s) for ads.
The ads API from civai-co — 13 operation(s) for ads.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/civai-co:civai-co-ads-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Civai Co Ads API
version: 1.0.0
description: 'Operations tagged ads across 2 of this provider''s published API definitions: audience-resolver-api.civai.co-openapi.json, audience-resolver-api.civai.co-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Ads
paths:
/api/projects/{project_id}/ads/channels:
get:
tags:
- Ads
summary: Get Ad Channels
description: 'How each channel launches, plus the Upload-Post limit, as the side panels
render them. Served from the code''s own channel table so the panel can
never claim a transport the build does not have.'
operationId: get_ad_channels_api_projects__project_id__ads_channels_get
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/destination-default:
get:
tags:
- Ads
summary: Get Destination Default
description: 'Which destination to preselect on a new plan, and why.
The workspace''s connected social accounts are the one signal this side
holds; `ad_destination_default` documents the section 3 rules it cannot
evaluate and returns them as `unknown` rather than pretending otherwise.'
operationId: get_destination_default_api_projects__project_id__ads_destination_default_get
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/creative-assets:
get:
tags:
- Ads
summary: List Creative Assets
description: 'The project''s creatives, each resolved the way a launch would resolve it,
so the picker only offers files an ad platform can actually be handed.
`channels` is a comma separated list, because what counts as a creative is
a property of the channels: ChatGPT ads are a still image, while the Meta
and TikTok channels run video, which is usually the better ad there. With
no channels named, both are offered.'
operationId: list_creative_assets_api_projects__project_id__ads_creative_assets_get
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: channels
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Channels
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans:
get:
tags:
- Ads
summary: List Ad Plans
operationId: list_ad_plans_api_projects__project_id__ads_plans_get
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Ads
summary: Create Ad Plan
operationId: create_ad_plan_api_projects__project_id__ads_plans_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdPlanCreate'
responses:
'201':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}:
patch:
tags:
- Ads
summary: Update Ad Plan
operationId: update_ad_plan_api_projects__project_id__ads_plans__plan_id__patch
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdPlanUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/approve-creative:
post:
tags:
- Ads
summary: Approve Creative
description: Creative approval before submission, every creative, every time.
operationId: approve_creative_api_projects__project_id__ads_plans__plan_id__approve_creative_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/confirm:
post:
tags:
- Ads
summary: Confirm Ad Plan
description: 'The per-plan confirmation. This is the only thing that lets a plan be
activated, it names a cap, and it is spent on one plan: it does not become
a standing budget.'
operationId: confirm_ad_plan_api_projects__project_id__ads_plans__plan_id__confirm_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdPlanConfirm'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/launch:
post:
tags:
- Ads
summary: Launch Ad Plan
description: 'Build the campaign, ad group and ad on the platform, paused. This route
cannot create a live ad: there is no parameter for it.'
operationId: launch_ad_plan_api_projects__project_id__ads_plans__plan_id__launch_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/activate:
post:
tags:
- Ads
summary: Activate Ad Plan
description: The only route that can start spend, and it needs this plan's confirmation.
operationId: activate_ad_plan_api_projects__project_id__ads_plans__plan_id__activate_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/pause:
post:
tags:
- Ads
summary: Pause Ad Plan
operationId: pause_ad_plan_api_projects__project_id__ads_plans__plan_id__pause_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/ledger:
get:
tags:
- Ads
summary: Get Ad Spend Ledger
description: 'The spend ledger for one plan. Read from `ad_spend_ledger` only: ad money
and Nova message credits never share a balance, so this never reads credits.'
operationId: get_ad_spend_ledger_api_projects__project_id__ads_plans__plan_id__ledger_get
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/leads:
post:
tags:
- Ads
summary: Record Ad Lead
description: 'Attribute one lead to this plan, which is what makes cost per lead measured
rather than guessed.'
operationId: record_ad_lead_api_projects__project_id__ads_plans__plan_id__leads_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LeadEntry'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/projects/{project_id}/ads/plans/{plan_id}/refresh:
post:
tags:
- Ads
summary: Refresh Ad Plan
description: Pull measured spend in, then enforce the cap and the owner's stop rule.
operationId: refresh_ad_plan_api_projects__project_id__ads_plans__plan_id__refresh_post
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: plan_id
in: path
required: true
schema:
type: string
title: Plan Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AdPlanUpdate:
properties:
title:
anyOf:
- type: string
maxLength: 200
- type: 'null'
title: Title
channels:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Channels
spend_cap_minor:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Spend Cap Minor
currency:
anyOf:
- type: string
maxLength: 8
- type: 'null'
title: Currency
account_mode:
anyOf:
- type: string
enum:
- nova_account
- owner_account
- type: 'null'
title: Account Mode
cta_destination:
anyOf:
- type: string
enum:
- agent_chat
- website
- social_profile
- type: 'null'
title: Cta Destination
target_url:
anyOf:
- type: string
- type: 'null'
title: Target Url
headline:
anyOf:
- type: string
- type: 'null'
title: Headline
body_text:
anyOf:
- type: string
- type: 'null'
title: Body Text
asset_id:
anyOf:
- type: string
- type: 'null'
title: Asset Id
leads_target:
anyOf:
- type: integer
- type: 'null'
title: Leads Target
stop_rule_cpl_minor:
anyOf:
- type: integer
- type: 'null'
title: Stop Rule Cpl Minor
max_bid_minor:
anyOf:
- type: integer
- type: 'null'
title: Max Bid Minor
ends_at:
anyOf:
- type: string
- type: 'null'
title: Ends At
type: object
title: AdPlanUpdate
AdPlanConfirm:
properties:
spend_cap_minor:
type: integer
exclusiveMinimum: 0.0
title: Spend Cap Minor
confirm_cap:
type: boolean
title: Confirm Cap
confirm_stop_rule:
type: boolean
title: Confirm Stop Rule
default: true
type: object
required:
- spend_cap_minor
- confirm_cap
title: AdPlanConfirm
description: 'The owner echoes the cap they read. A mismatch means the cap moved between
the screen and the click, so the confirmation is refused rather than applied
to a number they never saw.'
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
AdPlanCreate:
properties:
title:
type: string
maxLength: 200
minLength: 1
title: Title
channels:
items:
type: string
type: array
title: Channels
spend_cap_minor:
type: integer
exclusiveMinimum: 0.0
title: Spend Cap Minor
currency:
type: string
maxLength: 8
title: Currency
default: USD
account_mode:
type: string
enum:
- nova_account
- owner_account
title: Account Mode
default: owner_account
cta_destination:
type: string
enum:
- agent_chat
- website
- social_profile
title: Cta Destination
default: agent_chat
target_url:
anyOf:
- type: string
- type: 'null'
title: Target Url
headline:
anyOf:
- type: string
- type: 'null'
title: Headline
body_text:
anyOf:
- type: string
- type: 'null'
title: Body Text
asset_id:
anyOf:
- type: string
- type: 'null'
title: Asset Id
calendar_row_id:
anyOf:
- type: string
- type: 'null'
title: Calendar Row Id
leads_target:
anyOf:
- type: integer
- type: 'null'
title: Leads Target
stop_rule_cpl_minor:
anyOf:
- type: integer
- type: 'null'
title: Stop Rule Cpl Minor
max_bid_minor:
anyOf:
- type: integer
- type: 'null'
title: Max Bid Minor
ends_at:
anyOf:
- type: string
- type: 'null'
title: Ends At
type: object
required:
- title
- spend_cap_minor
title: AdPlanCreate
LeadEntry:
properties:
reference_id:
anyOf:
- type: string
- type: 'null'
title: Reference Id
description:
anyOf:
- type: string
- type: 'null'
title: Description
type: object
title: LeadEntry
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
x-refined-from:
- audience-resolver-api.civai.co-openapi.json
- audience-resolver-api.civai.co-openapi.json