How-to

Translate YouTube Transcripts into Clean Notes

Last updated 2026-11-25. Facts are checked against the live registry.

Overview

Fikra API is an OpenAI-compatible AI inference API for developers and growing AI teams who need production inference without a credit-card gate. You can use its chat completions endpoint to turn raw YouTube transcripts into clean, well-structured notes, including translation when needed. The endpoint accepts OpenAI-style requests and responses, and streaming is supported.

Prerequisites

  • A Fikra API key stored in an environment variable named FIKRA_API_KEY.
  • Python with the openai SDK installed.
  • The raw YouTube transcript text you want to translate and clean up.

Step-by-step

  1. Configure the OpenAI SDK to use Fikra API's base URL: https://api.fikraapi.co.ke/v1.
  2. Send a chat completion request to POST https://api.fikraapi.co.ke/v1/chat/completions.
  3. Use a model from your pricing plan, for example deepseek-v4-flash-0731.
  4. Provide a prompt that asks for translation and clean notes, then include the transcript.
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.environ["FIKRA_API_KEY"],
)

transcript = "Your raw YouTube transcript here"

response = client.chat.completions.create(
    model="deepseek-v4-flash-0731",
    messages=[
        {
            "role": "system",
            "content": "Translate the transcript into clean, well-organized notes.",
        },
        {"role": "user", "content": transcript},
    ],
)

print(response.choices[0].message.content)

Verify it works

The response is returned in the standard OpenAI chat completion format. Check response.choices[0].message.content for the cleaned notes. If the request fails, confirm your API key is active, that the model name is supported, and that you are within your rate limits.

Costs

Pricing is per 1M tokens and varies by model. For example, deepseek-v4-flash-0731 costs $0.05625 per 1M input tokens and $0.17 per 1M output tokens. Other models such as deepseek-v4.1-flash, deepseek-v4.1-flash-1017, and deepseek-v4.1-flash-1017 have different rates. Payment is handled through a token-credit wallet with M-Pesa and card top-ups via Paystack, and x402 USDC on Base for agents. For exact current rates, check the pricing page.

Common errors

  • 401 , The API key is invalid, inactive, or missing.
  • 400 , The requested model is unsupported or the request format is invalid.
  • 429 , You have hit the rate limit: 30 requests/min for unverified accounts, 3,000 requests/min for trusted accounts.
  • 503 , The upstream service is busy. Retry the request with backoff.

Live prices -> · Agent account -> · SDKs ->