v1Checking status…

AI Ad Clone API documentation

The AI Ad Clone API is a private REST API over HTTPS. Every request must carry an API key, and every response is JSON.

To start using it, get an API key, then make your first request to /status. The endpoint reference lists every endpoint and lets you try each one from this page.

Base URL{{BASE}}
AuthAPI key in X-API-Key or Authorization: Bearer
FormatJSON request and response bodies, UTF-8
Machine-readable spec/openapi.json · Swagger UI · ReDoc

Get an API key

Keys are issued by request, so we know who is calling the API and can contact you about changes. Here's the whole process:

  1. Request access Email the API owner with:
    • Your name and company or project
    • What you'll use the API for
    • Roughly how many requests per day you expect
    • Which environment the key is for (production, staging or development)

    Email a key request →

  2. We review your request We check the use case and reply by email, asking for more detail if we need it.
  3. Receive your key privately Once approved, your key is sent through a private channel such as a one-time secret link, never in a plain email body or chat message. Save it right away and treat it like a password.
  4. Store it on your server Put the key in an environment variable or secret manager on the server that calls the API, then make your first request to check it works.
i

One key per app and environment. Ask for separate keys for production and staging. You can then rotate or revoke one without touching the others.

Make your first request

Save your key as the API_KEY environment variable, then call GET /status. It does nothing except confirm that your key works.

export API_KEY="your-key-here"

curl {{BASE}}/status \
  -H "X-API-Key: $API_KEY"

A working key returns 200 OK:

{
  "message": "AI Ad Clone API is running",
  "authenticated": true
}

If you get 401 instead, see Errors. The most common cause is a missing header or extra spaces copied with the key.

Authentication

Send your key on every request, in either of these headers. Both work the same; use whichever your HTTP client makes easier.

HeaderExample
X-API-KeyX-API-Key: 3f9a…c21e
AuthorizationAuthorization: Bearer 3f9a…c21e

What needs a key

PathKey needed?What it is
All API endpointsYesEverything listed in the endpoint reference
/, /documentationNoThis website
/docs, /redoc, /openapi.jsonNoInteractive docs and the API spec. They describe the API but can't call it without a key.
!

Keep keys on your server. Never put a key in browser JavaScript, a mobile app, a public repo or a URL query string. Anyone who can see the key can use it.

Base URL & conventions

  • Base URL: {{BASE}}. All paths in these docs are relative to it.
  • HTTPS only. Plain HTTP requests are redirected to HTTPS. Send your key over HTTPS from the start.
  • JSON. Send request bodies as JSON with Content-Type: application/json. Responses are JSON.
  • Request IDs. Every response has an x-request-id header. You can send your own x-request-id to trace a call end to end; we echo it back.
  • Body size. Request bodies are limited to 1 MB.

Endpoint reference

This list is generated from the live API spec, so it's always current. Paste your key below to send real requests from this page.

Your key stays in this browser tab and is sent only to {{BASE}}.

Loading endpoints…

Errors

Errors use standard HTTP status codes. Authentication errors have this body:

{
  "error": "invalid_api_key",
  "message": "Invalid API key."
}
StatusMeaningWhat to do
401The key is missing ("Missing API key…") or not recognised ("Invalid API key.")Check the header name, and that the key has no extra spaces or line breaks. If it was revoked, request a new one.
404No such endpointCheck the path against the endpoint reference.
413Request body over 1 MBSend a smaller body.
422The request body or parameters failed validation. The body is {"detail": [...]} and lists each problem.Fix the fields named in detail.
5xxSomething went wrong on our sideRetry with backoff. If it continues, contact support with the x-request-id.

Key security & rotation

Do

  • Store keys in environment variables or a secret manager (AWS Secrets Manager, Doppler, 1Password and so on).
  • Use a separate key for each app and environment.
  • Call the API only from servers you control.

Don't

  • Commit keys to git, even to private repos.
  • Put keys in front-end code, mobile apps, URLs or logs.
  • Share one key between teams or customers.

Rotating a key

  1. Ask for a new keyEmail the API owner and say which key it replaces. Your old key keeps working for now.
  2. Deploy the new keyUpdate your server's environment variable and deploy. Both keys work during the switch, so no requests fail.
  3. Confirm, then retire the old keyTell us when you've switched, and we'll revoke the old key.
!

Key leaked? Contact us straight away. We'll revoke it and issue a new one. Revoking a key stops it working immediately.

Support

For access requests, questions or problems, email the API owner. When reporting a problem, include:

  • The x-request-id from the response
  • The endpoint, the time (with time zone) and the status code you got
  • Never your full API key. The first 4 characters are enough to identify it.