ClipToks
Login auto_awesome Start now
REST API

ClipToks API for Developers

Automate video creation from your own apps, scripts, or n8n streams with a simple REST API.

Base URL: https://cliptoks.com/api/v1

lock Authentication

Include your key in the Authorization header of each request:

Authorization: Bearer tk_TU_CLAVE

You can also use the X-API-Key: tk_TU_CLAVE

api Endpoints header

MethodEndpointDescription
GET /me Your account details and remaining minutes.
GET /voices List of available voices (including cloned).
POST /generate Create a video or audio. Consumes minutes.
GET /jobs/{id} State of a job and its result.
GET /assets List your library of generated files.
GET /assets/{id}/download Downloads the file from a resource.
DELETE /assets/{id} Delete a resource from your library.

terminal Generate a video

Queue a job. The response returns a job_id that you can query until it is ready.

curl -X POST https://cliptoks.com/api/v1/generate \
  -H "Authorization: Bearer tk_TU_CLAVE" \
  -H "Content-Type: application/json" \
  -d '{"tool":"idea2video","params":{"idea":"5 curiosidades sobre el espacio","lang":"es"}}'
import requests

r = requests.post(
    "https://cliptoks.com/api/v1/generate",
    headers={"Authorization": "Bearer tk_TU_CLAVE"},
    json={"tool": "idea2video",
          "params": {"idea": "5 curiosidades sobre el espacio", "lang": "es"}},
)
print(r.json())  # {'job_id': 123, 'status': 'queued'}
const res = await fetch("https://cliptoks.com/api/v1/generate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer tk_TU_CLAVE",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    tool: "idea2video",
    params: { idea: "5 curiosidades sobre el espacio", lang: "es" },
  }),
});
console.log(await res.json());
<?php
$ch = curl_init("https://cliptoks.com/api/v1/generate");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer tk_TU_CLAVE",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "tool"   => "idea2video",
        "params" => ["idea" => "5 curiosidades sobre el espacio", "lang" => "es"],
    ]),
]);
echo curl_exec($ch);
var client = java.net.http.HttpClient.newHttpClient();
var req = java.net.http.HttpRequest.newBuilder()
    .uri(java.net.URI.create("https://cliptoks.com/api/v1/generate"))
    .header("Authorization", "Bearer tk_TU_CLAVE")
    .header("Content-Type", "application/json")
    .POST(java.net.http.HttpRequest.BodyPublishers.ofString(
        "{\"tool\":\"idea2video\",\"params\":{\"idea\":\"...\"}}"))
    .build();
var res = client.send(req, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
Use an “HTTP Request” node with this configuration:

Método:   POST
URL:      https://cliptoks.com/api/v1/generate
Headers:
  Authorization = Bearer tk_TU_CLAVE
  Content-Type  = application/json
Body (JSON):
  {"tool":"idea2video","params":{"idea":"5 curiosidades sobre el espacio","lang":"es"}}

downloading Query the job and download

Queries the job_id until the status is “done”. Then you will have the download URL.

curl https://cliptoks.com/api/v1/jobs/123 -H "Authorization: Bearer tk_TU_CLAVE"

# Response when finished:
{
  "job_id": 123,
  "tool": "idea2video",
  "status": "done",
  "progress": 100,
  "asset": {
    "id": 987,
    "type": "video",
    "duration": 42.5,
    "download_url": "https://cliptoks.com/api/v1/assets/987/download"
  }
}

error_outline Error codes

CodeMeaning
401Missing or invalid API key.
402No minutes available. Improve your plan.
403Your plan does not include access to the API.
422Parameters are missing or incorrect.
429You have exceeded the limit of requests per minute.

Ready to automate your videos?

Create a free account