Fikra API Reference
The Fikra API provides a blazing-fast REST interface to access frontier open-source models. By utilizing standard HTTP POST requests, you can easily integrate our API into any language, framework, or application without needing to install heavy third-party SDKs.
All API requests must include your Fikra API key in an HTTP Authorization header. You can generate and manage your keys securely in the Developer Dashboard.
Authorization: Bearer fk-live-YOUR_API_KEY
Chat Completions
Given a list of messages comprising a conversation, the model will return a generated response. This is the primary endpoint for conversational AI, RAG pipelines, and agentic workflows.
HTTP Request
POST https://lacesse.co.ke/api/v1/chat/completions
Example: Using Python
Use the native requests library to send a payload directly to the Fikra endpoint.
import requests response = requests.post( "https://lacesse.co.ke/api/v1/chat/completions", headers={ "Authorization": "Bearer fk-live-your-key-here" }, json={ "model": "llama-3.3-70b-versatile", "messages": [ {"role": "system", "content": "You are a helpful coding assistant."}, {"role": "user", "content": "Write a python script to scrape a website."} ] } ) data = response.json() print(data['choices'][0]['message']['content'])
Example: Using Node.js
Use native fetch to execute the request asynchronously.
async function main() { const response = await fetch("https://lacesse.co.ke/api/v1/chat/completions", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer fk-live-your-key-here" }, body: JSON.stringify({ model: "llama-3.3-70b-versatile", messages: [ { role: "system", content: "You are a helpful coding assistant." }, { role: "user", content: "Say hello world" } ] }) }); const data = await response.json(); console.log(data.choices[0].message.content); } main();
Example: Using cURL
curl -X POST https://lacesse.co.ke/api/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer fk-live-your-key-here" \ -d '{ "model": "llama-3.3-70b-versatile", "messages": [ { "role": "user", "content": "Hello!" } ] }'